Skip to content

Commit d215583

Browse files
committed
added cmd arg for runtime version
1 parent 591e999 commit d215583

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

update_items.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@
3636
NB_PORTAL_TYPE_KEYWORDS = "Notebook, Python"
3737
NB_ITEM_PROPERTIES_RUNTIME_STAMP_ADVANCED = \
3838
{'notebookRuntimeName': 'ArcGIS Notebook Python 3 Advanced',
39-
'notebookRuntimeVersion': '5.0'}
39+
'notebookRuntimeVersion': ''}
4040
NB_ITEM_PROPERTIES_RUNTIME_STAMP_ADVANCED_GPU = \
4141
{'notebookRuntimeName': 'ArcGIS Notebook Python 3 Advanced with GPU support',
42-
'notebookRuntimeVersion': '5.0'}
42+
'notebookRuntimeVersion': ''}
4343
NB_ITEM_PROPERTIES_RUNTIME_STAMP_STANDARD = \
4444
{'notebookRuntimeName': 'ArcGIS Notebook Python 3 Standard',
45-
'notebookRuntimeVersion': '5.0'}
45+
'notebookRuntimeVersion': ''}
4646
NB_ITEM_FOLDER = "Notebook Samples"
4747

4848

@@ -52,6 +52,9 @@ def _main():
5252
_setup_logging(args)
5353
gis = GIS(args.portal_url, args.username,
5454
args.password, verify_cert=False)
55+
if args.version:
56+
NB_ITEM_PROPERTIES_RUNTIME_STAMP_ADVANCED["notebookRuntimeVersion"] = args.version
57+
NB_ITEM_PROPERTIES_RUNTIME_STAMP_STANDARD["notebookRuntimeVersion"] = args.version
5558
items_metadata_yaml = _read_items_metadata_yaml()
5659
if args.replace_profiles:
5760
_replace_profiles()
@@ -73,8 +76,12 @@ def _parse_cmd_line_args():
7376
parser.add_argument("--password", "-p", type=str,
7477
help="Required password for the portal/org")
7578
parser.add_argument("--portal-url", "-r", type=str,
76-
help="The portal to connect to (Default:geosaurus.maps.arcgis.com)",
79+
help="The portal to connect to (default: geosaurus.maps.arcgis.com)",
7780
default="https://geosaurus.maps.arcgis.com/")
81+
parser.add_argument("--version", "-ver", type=str,
82+
help="The version of notebook runtime to set on sample notebooks "
83+
"(default: the latest version)",
84+
default="")
7885
parser.add_argument("--verbose", "-v", action="store_true",
7986
help="Print all DEBUG log messages instead of just INFO")
8087
parser.add_argument("--replace-profiles", "-c", action="store_true",

0 commit comments

Comments
 (0)