Skip to content

Realign %seed widgets to fix truncated descriptions #531

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Starting with v1.31.6, this file will contain a record of major features and upd
- Fixed unit test workflows failing on type check assertion ([Link to PR](https://git.1-hub.cnaws/graph-notebook/pull/514))
- Fixed bad queries in openCypher Language Tutorial samples ([PR #1](https://git.1-hub.cnaws/graph-notebook/pull/525)) ([PR #2](https://git.1-hub.cnaws/graph-notebook/pull/526))
- Fixed kernel crashing with ZMQ errors on magic execution ([Link to PR](https://git.1-hub.cnaws/graph-notebook/pull/517))
- Fixed truncated descriptions for some `%seed` fields ([Link to PR](https://git.1-hub.cnaws/graph-notebook/pull/531))
- Unpinned `boto3` and `botocore` to support NeptuneData SDK ([Link to PR](https://git.1-hub.cnaws/graph-notebook/pull/528))

## Release 3.8.2 (June 5, 2023)
Expand Down
25 changes: 17 additions & 8 deletions src/graph_notebook/magics/graph_magic.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
SEED_LANGUAGE_OPTIONS = ['', 'gremlin', 'opencypher', 'sparql']
SEED_SOURCE_OPTIONS = ['', 'samples', 'custom']
SEED_NO_DATASETS_FOUND_MSG = "(No datasets available)"
SEED_WIDGET_STYLE = {'description_width': '95px'}

LOADER_FORMAT_CHOICES = ['']
LOADER_FORMAT_CHOICES.extend(VALID_FORMATS)
Expand Down Expand Up @@ -2044,56 +2045,64 @@ def seed(self, line, local_ns: dict = None):
source_dropdown = widgets.Dropdown(
options=SEED_SOURCE_OPTIONS,
description='Source type:',
disabled=False
disabled=False,
style=SEED_WIDGET_STYLE
)

model_dropdown = widgets.Dropdown(
options=SEED_MODEL_OPTIONS,
description='Data model:',
disabled=False,
layout=widgets.Layout(display='none')
layout=widgets.Layout(display='none'),
style=SEED_WIDGET_STYLE
)

custom_language_dropdown = widgets.Dropdown(
options=SEED_LANGUAGE_OPTIONS,
description='Language:',
disabled=False,
layout=widgets.Layout(display='none')
layout=widgets.Layout(display='none'),
style=SEED_WIDGET_STYLE
)

samples_pg_language_dropdown = widgets.Dropdown(
options=SEED_LANGUAGE_OPTIONS[:3],
description='Language:',
disabled=False,
layout=widgets.Layout(display='none')
layout=widgets.Layout(display='none'),
style=SEED_WIDGET_STYLE
)

data_set_drop_down = widgets.Dropdown(
description='Data set:',
disabled=False,
layout=widgets.Layout(display='none')
layout=widgets.Layout(display='none'),
style=SEED_WIDGET_STYLE
)

fullfile_option_dropdown = widgets.Dropdown(
description='Full File Query:',
options=[True, False],
value=args.full_file_query,
disabled=False,
layout=widgets.Layout(display='none')
layout=widgets.Layout(display='none'),
style=SEED_WIDGET_STYLE
)

location_option_dropdown = widgets.Dropdown(
description='Location:',
options=['Local', 'S3'],
value='Local',
disabled=False,
layout=widgets.Layout(display='none')
layout=widgets.Layout(display='none'),
style=SEED_WIDGET_STYLE
)

seed_file_location_text = widgets.Text(
description='Source:',
placeholder='path/to/seedfiles/directory',
disabled=False
disabled=False,
style=SEED_WIDGET_STYLE
)

seed_file_location = FileChooser()
Expand Down