You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""Loads a notebook from source_notebook_path, adds a cell to load the data, and then saves it to source_notebook_path.
1898
+
"""Loads a notebook from source_notebook_path, adds a cell to load the data, and then saves it to source_notebook_path. Will also try to register the notebook with the IPS Portal, if available.
1897
1899
1898
1900
Does not modify the source notebook.
1899
1901
1900
1902
Params:
1901
1903
- dest_notebook_name: name of the JupyterNotebook you want to write (do not include file paths).
1902
1904
- source_notebook_path: location you want to load the source notebook from
1903
-
- tags: list of state files you want to load in the notebook.
1904
1905
- variable_name: name of the variable you want to load files from (default: "FILES")
1905
1906
- cell_to_modify: which cell in the JupyterNotebook you want to add the data call to (0-indexed).
1906
1907
(This will not overwrite any cells, just appends.)
This function assumes that a notebook has already been created with intialize_jupyter_notebook. Using this function does not call the IPS Portal.
1938
+
1939
+
Params:
1940
+
- notebook_name: name of notebook which will be modified. Note that this path is relative to the JupyterHub directory.
1941
+
- data_file: data file we add to the notebook (simple string). This value should almost always be the return value from "self.services.jupyterhub_make_state".
1942
+
- index: optional index of the IPS notebook cell. If not provided, the IPS Framework will attempt to automatically find the cell it created,
1943
+
which should work for every usecase where you don't anticipate modifying the notebook until after the run is complete.
1944
+
"""
1945
+
ifnotself._jupyterhub_dir:
1946
+
ifnotself._init_jupyter():
1947
+
raiseException('Unable to initialize base JupyterHub dir')
0 commit comments