From 1288158f6e7dc13d6e3a88e04b6d12891e4c6054 Mon Sep 17 00:00:00 2001 From: Devin Cowan Date: Thu, 16 Jan 2025 11:25:06 -0500 Subject: [PATCH 1/4] Update notebook dependency to 6.5.4 and adjust static files import for compatibility --- nbfetch/__init__.py | 5 ++++- setup.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/nbfetch/__init__.py b/nbfetch/__init__.py index a8d3e982..43c02331 100644 --- a/nbfetch/__init__.py +++ b/nbfetch/__init__.py @@ -6,7 +6,8 @@ import jupyter_server from jupyter_server.extension.application import ExtensionApp -from notebook import DEFAULT_STATIC_FILES_PATH, DEFAULT_TEMPLATE_PATH_LIST +from notebook import DEFAULT_TEMPLATE_PATH_LIST +from notebook.notebookapp import DEFAULT_STATIC_FILES_PATH import jinja2 import gettext @@ -21,6 +22,8 @@ class NbFetchApp(ExtensionApp): load_other_extensions = True file_url_prefix = "/" + # Default static files path changed in 6.5.0: + # https://github.com/jupyter/notebook/releases/tag/v6.5.0 # Local path to static files directory. static_paths = [ os.path.join(HERE, "static"), diff --git a/setup.py b/setup.py index 23759eed..8f089dad 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ packages=find_packages(), include_package_data=True, platforms="any", - install_requires=["notebook==6.4.6", "tornado", "hsclient", "jupyter_server"], + install_requires=["notebook==6.5.4", "tornado", "hsclient", "jupyter_server"], extras_require={"develop": ["pytest", "pytest-jupyter"]}, data_files=[ ( From 2f49e527f11f1cf9c12bf8c27108c3895425c617 Mon Sep 17 00:00:00 2001 From: Devin Cowan Date: Mon, 17 Feb 2025 15:13:13 -0500 Subject: [PATCH 2/4] Update example URL in README for nbfetch --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8adc1532..a1369615 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ jupyter server extension enable --py nbfetch jupyter lab # to test fetching, visit the `/nbfetch` url, for example: -http://127.0.0.1:8888/nbfetch/hs-pull?id=432d503a507e493581d25beb3379471a&res_id=432d503a507e493581d25beb3379471a +http://127.0.0.1:8888/nbfetch/hs-pull?id=96310f82dd5247ba8201955750093923&res_id=96310f82dd5247ba8201955750093923 ``` `nbfetch` requires HydroShare user authentication (username, password) or authorization (OAuth2) to From b6bbea7981702d0b4ce091d1870f41aa2670689f Mon Sep 17 00:00:00 2001 From: Devin Cowan Date: Mon, 17 Feb 2025 15:16:47 -0500 Subject: [PATCH 3/4] Add setuptools to install_requires in setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 3d97be5a..b94c0840 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ packages=find_packages(), include_package_data=True, platforms="any", - install_requires=["notebook==6.5.4", "tornado", "hsclient>=1.1.2", "jupyter_server"], + install_requires=["notebook==6.5.4", "tornado", "hsclient>=1.1.2", "jupyter_server", "setuptools"], extras_require={"develop": ["pytest", "pytest-jupyter"]}, data_files=[ ( From 6b54c2db421bb1dff0deddcb0d94792ebac81fcf Mon Sep 17 00:00:00 2001 From: Devin Cowan Date: Wed, 19 Feb 2025 19:33:25 -0500 Subject: [PATCH 4/4] Update hsclient dependency to require version 1.1.3 or higher --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index b94c0840..9cc4d106 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ packages=find_packages(), include_package_data=True, platforms="any", - install_requires=["notebook==6.5.4", "tornado", "hsclient>=1.1.2", "jupyter_server", "setuptools"], + install_requires=["notebook==6.5.4", "tornado", "hsclient>=1.1.3", "jupyter_server", "setuptools"], extras_require={"develop": ["pytest", "pytest-jupyter"]}, data_files=[ (