Skip to content

Fix argument help messages for query magics #593

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 1 commit into from
May 14, 2024
Merged
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
14 changes: 7 additions & 7 deletions src/graph_notebook/magics/graph_magic.py
Original file line number Diff line number Diff line change
@@ -669,7 +669,7 @@ def sparql(self, line='', cell='', local_ns: dict = None):
parser.add_argument('--expand-all', action='store_true')
parser.add_argument('--explain-type', type=str.lower, default='dynamic',
help=f'Explain mode to use when using the explain query mode. '
f'Expected values: ${SPARQL_EXPLAIN_MODES}')
f'Expected values: {SPARQL_EXPLAIN_MODES}')
parser.add_argument('--explain-format', default='text/html', help='response format for explain query mode',
choices=['text/csv', 'text/html'])
parser.add_argument('-m', '--media-type', type=str, default='',
@@ -697,7 +697,7 @@ def sparql(self, line='', cell='', local_ns: dict = None):
parser.add_argument('--store-to', type=str, default='', help='store query result to this variable')
parser.add_argument('--store-format', type=str.lower, default='json',
help=f'Configures export type when using --store-to with base query mode. '
f'Valid inputs: ${QUERY_STORE_TO_FORMATS}. Default is JSON')
f'Valid inputs: {QUERY_STORE_TO_FORMATS}. Default is JSON')
parser.add_argument('--export-to', type=str, default='',
help='Export the base query mode CSV result to the provided file path.')
parser.add_argument('--ignore-groups', action='store_true', default=False, help="Ignore all grouping options")
@@ -1014,7 +1014,7 @@ def gremlin(self, line, cell, local_ns: dict = None):
parser.add_argument('--store-to', type=str, default='', help='store query result to this variable')
parser.add_argument('--store-format', type=str.lower, default='json',
help=f'Configures export type when using --store-to with base query mode. '
f'Valid inputs: ${QUERY_STORE_TO_FORMATS}. Default is JSON')
f'Valid inputs: {QUERY_STORE_TO_FORMATS}. Default is JSON')
parser.add_argument('--export-to', type=str, default='',
help='Export the base query mode CSV result to the provided file path.')
parser.add_argument('--ignore-groups', action='store_true', default=False, help="Ignore all grouping options")
@@ -3036,12 +3036,12 @@ def handle_opencypher_query(self, line, cell, local_ns):
"""
parser = argparse.ArgumentParser()
parser.add_argument('-pc', '--plan-cache', type=str.lower, default='auto',
help=f'Plan cache mode to use. Accepted values: ${OPENCYPHER_PLAN_CACHE_MODES}')
help=f'Plan cache mode to use. Accepted values: {OPENCYPHER_PLAN_CACHE_MODES}')
parser.add_argument('-qt', '--query-timeout', type=int, default=None,
help=f'Maximum query timeout in milliseconds.')
parser.add_argument('--explain-type', type=str.lower, default='dynamic',
help=f'Explain mode to use when using the explain query mode. '
f'Accepted values: ${OPENCYPHER_EXPLAIN_MODES}')
f'Accepted values: {OPENCYPHER_EXPLAIN_MODES}')
parser.add_argument('-qp', '--query-parameters', type=str, default='',
help='Parameter definitions to apply to the query. This option can accept a local variable '
'name, or a string representation of the map.')
@@ -3070,7 +3070,7 @@ def handle_opencypher_query(self, line, cell, local_ns):
parser.add_argument('--store-to', type=str, default='', help='store query result to this variable')
parser.add_argument('--store-format', type=str.lower, default='json',
help=f'Configures export type when using --store-to with base query mode. '
f'Valid inputs: ${QUERY_STORE_TO_FORMATS}. Default is JSON')
f'Valid inputs: {QUERY_STORE_TO_FORMATS}. Default is JSON')
parser.add_argument('--export-to', type=str, default='',
help='Export the base query mode CSV result to the provided file path.')
parser.add_argument('--ignore-groups', action='store_true', default=False, help="Ignore all grouping options")
@@ -3301,7 +3301,7 @@ def handle_opencypher_status(self, line, local_ns):
'queries. This parameter does not take a value.')
parser.add_argument('--state', type=str.upper, default='ALL',
help=f'Neptune Analytics only. Specifies what subset of query states to retrieve the '
f'status of. Default is ALL. Accepted values: ${OPENCYPHER_STATUS_STATE_MODES}')
f'status of. Default is ALL. Accepted values: {OPENCYPHER_STATUS_STATE_MODES}')
parser.add_argument('-m', '--maxResults', type=int, default=200,
help=f'Neptune Analytics only. Sets an upper limit on the set of returned queries whose '
f'status matches --state. Default is 200.')
Loading