36
36
NB_PORTAL_TYPE_KEYWORDS = "Notebook, Python"
37
37
NB_ITEM_PROPERTIES_RUNTIME_STAMP_ADVANCED = \
38
38
{'notebookRuntimeName' : 'ArcGIS Notebook Python 3 Advanced' ,
39
- 'notebookRuntimeVersion' : '5.0 ' }
39
+ 'notebookRuntimeVersion' : '' }
40
40
NB_ITEM_PROPERTIES_RUNTIME_STAMP_ADVANCED_GPU = \
41
41
{'notebookRuntimeName' : 'ArcGIS Notebook Python 3 Advanced with GPU support' ,
42
- 'notebookRuntimeVersion' : '5.0 ' }
42
+ 'notebookRuntimeVersion' : '' }
43
43
NB_ITEM_PROPERTIES_RUNTIME_STAMP_STANDARD = \
44
44
{'notebookRuntimeName' : 'ArcGIS Notebook Python 3 Standard' ,
45
- 'notebookRuntimeVersion' : '5.0 ' }
45
+ 'notebookRuntimeVersion' : '' }
46
46
NB_ITEM_FOLDER = "Notebook Samples"
47
47
48
48
@@ -52,6 +52,9 @@ def _main():
52
52
_setup_logging (args )
53
53
gis = GIS (args .portal_url , args .username ,
54
54
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
55
58
items_metadata_yaml = _read_items_metadata_yaml ()
56
59
if args .replace_profiles :
57
60
_replace_profiles ()
@@ -73,8 +76,12 @@ def _parse_cmd_line_args():
73
76
parser .add_argument ("--password" , "-p" , type = str ,
74
77
help = "Required password for the portal/org" )
75
78
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)" ,
77
80
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 = "" )
78
85
parser .add_argument ("--verbose" , "-v" , action = "store_true" ,
79
86
help = "Print all DEBUG log messages instead of just INFO" )
80
87
parser .add_argument ("--replace-profiles" , "-c" , action = "store_true" ,
0 commit comments