From 16bb77cc1ab62e818e3e2bb6a6676549c2873404 Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Mon, 25 Sep 2023 13:29:53 +0200 Subject: [PATCH 1/4] Declare metadata in pyproject.toml, remove hatch-nodejs-version plugin --- jupyter_server_proxy/__init__.py | 1 + jupyter_server_proxy/_version.py | 4 ++++ labextension/package.json | 17 ---------------- pyproject.toml | 33 +++++++++++++++++--------------- 4 files changed, 23 insertions(+), 32 deletions(-) create mode 100644 jupyter_server_proxy/_version.py diff --git a/jupyter_server_proxy/__init__.py b/jupyter_server_proxy/__init__.py index bb3d0f00..cbce0d5f 100644 --- a/jupyter_server_proxy/__init__.py +++ b/jupyter_server_proxy/__init__.py @@ -1,5 +1,6 @@ from jupyter_server.utils import url_path_join as ujoin +from ._version import __version__ # noqa from .api import IconHandler, ServersInfoHandler from .config import ServerProxy as ServerProxyConfig from .config import get_entrypoint_server_processes, make_handlers, make_server_process diff --git a/jupyter_server_proxy/_version.py b/jupyter_server_proxy/_version.py new file mode 100644 index 00000000..87af4adc --- /dev/null +++ b/jupyter_server_proxy/_version.py @@ -0,0 +1,4 @@ +# __version__ should be updated using tbump, based on configuration in +# pyproject.toml, according to instructions in RELEASE.md. +# +__version__ = "4.1.1-0.dev" diff --git a/labextension/package.json b/labextension/package.json index 320a8ce5..b74471d1 100644 --- a/labextension/package.json +++ b/labextension/package.json @@ -1,31 +1,14 @@ { "name": "@jupyterhub/jupyter-server-proxy", "version": "4.1.1-0.dev", - "description": "A JupyterLab extension accompanying the PyPI package jupyter-server-proxy adding launcher items for configured server processes.", - "keywords": [ - "jupyter", - "jupyterlab", - "jupyterlab-extension" - ], "homepage": "https://github.com/jupyterhub/jupyter-server-proxy", - "bugs": { - "url": "https://github.com/jupyterhub/jupyter-server-proxy/issues" - }, "license": "BSD-3-Clause", - "author": { - "name": "Ryan Lovett & Yuvi Panda", - "email": "rylo@berkeley.edu" - }, "files": [ "LICENSE", "lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}" ], "main": "lib/index.js", "types": "lib/index.d.ts", - "repository": { - "type": "git", - "url": "https://github.com/jupyterhub/jupyter-server-proxy.git" - }, "scripts": { "build": "jlpm run build:lib && jlpm run build:labextension:dev", "build:prod": "jlpm clean && jlpm run build:lib && jlpm run build:labextension", diff --git a/pyproject.toml b/pyproject.toml index 4a4d35ec..33c2f225 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,9 +4,8 @@ [build-system] build-backend = "hatchling.build" requires = [ - "hatch-jupyter-builder >=0.5", - "hatch-nodejs-version", - "hatchling >=1.4.0", + "hatch-jupyter-builder >=0.8.3", + "hatchling >=1.18.0", "jupyterlab >=4.0.6,<5.0.0a0", ] @@ -17,13 +16,14 @@ requires = [ # [project] name = "jupyter_server_proxy" -dynamic = [ - "authors", - "description", - "keywords", - "urls", - "version", +description = "A JupyterLab extension accompanying the PyPI package jupyter-server-proxy adding launcher items for configured server processes." +keywords = ["jupyter", "jupyterlab", "jupyterlab-extension"] +authors = [ + { name = "Ryan Lovett", email = "rylo@berkeley.edu" }, + { name = "Yuvi Panda", email = "yuvipanda@gmail.com" }, + { name = "Jupyter Development Team", email = "jupyter@googlegroups.com" }, ] +dynamic = ["version"] readme = "README.md" license = { file = "LICENSE" } requires-python = ">=3.8" @@ -75,9 +75,16 @@ lab = [ "notebook >=7", ] +[project.urls] +Documentation = "https://jupyter-server-proxy.readthedocs.io" +Source = "https://github.com/jupyterhub/jupyter-server-proxy" +Tracker = "https://github.com/jupyterhub/jupyter-server-proxy/issues" + + +# hatch ref: https://hatch.pypa.io/latest/ +# [tool.hatch.version] -source = "nodejs" -path = "labextension/package.json" +path = "jupyter_server_proxy/_version.py" [tool.hatch.build.targets.sdist] artifacts = [ @@ -101,10 +108,6 @@ exclude = [ # Set to true to allow testing of git+https://github.com/user/repo@sha dependencies allow-direct-references = false -[tool.hatch.metadata.hooks.nodejs] -path = "labextension/package.json" -fields = ["description", "authors", "urls"] - [tool.hatch.build.hooks.jupyter-builder] build-function = "hatch_jupyter_builder.npm_builder" ensured-targets = [ From 09e6279e5ae3395a0902a4426ecab998e2d56397 Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Wed, 1 Nov 2023 15:57:27 +0100 Subject: [PATCH 2/4] Add back all metadata to labextension/package.json --- labextension/package.json | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/labextension/package.json b/labextension/package.json index b74471d1..320a8ce5 100644 --- a/labextension/package.json +++ b/labextension/package.json @@ -1,14 +1,31 @@ { "name": "@jupyterhub/jupyter-server-proxy", "version": "4.1.1-0.dev", + "description": "A JupyterLab extension accompanying the PyPI package jupyter-server-proxy adding launcher items for configured server processes.", + "keywords": [ + "jupyter", + "jupyterlab", + "jupyterlab-extension" + ], "homepage": "https://github.com/jupyterhub/jupyter-server-proxy", + "bugs": { + "url": "https://github.com/jupyterhub/jupyter-server-proxy/issues" + }, "license": "BSD-3-Clause", + "author": { + "name": "Ryan Lovett & Yuvi Panda", + "email": "rylo@berkeley.edu" + }, "files": [ "LICENSE", "lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}" ], "main": "lib/index.js", "types": "lib/index.d.ts", + "repository": { + "type": "git", + "url": "https://github.com/jupyterhub/jupyter-server-proxy.git" + }, "scripts": { "build": "jlpm run build:lib && jlpm run build:labextension:dev", "build:prod": "jlpm clean && jlpm run build:lib && jlpm run build:labextension", From 821036a3edccd62a053e3ffef4bec6681d72073d Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Wed, 1 Nov 2023 16:04:49 +0100 Subject: [PATCH 3/4] Define python package specific description in pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 33c2f225..163e1a44 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,7 @@ requires = [ # [project] name = "jupyter_server_proxy" -description = "A JupyterLab extension accompanying the PyPI package jupyter-server-proxy adding launcher items for configured server processes." +description = "A Jupyter server extension to run additional processes and proxy to them that comes bundled JupyterLab extension to launch pre-defined processes." keywords = ["jupyter", "jupyterlab", "jupyterlab-extension"] authors = [ { name = "Ryan Lovett", email = "rylo@berkeley.edu" }, From 1234bab7e7ea17b6e7a4d7717ed21f551117f62e Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Wed, 1 Nov 2023 16:06:36 +0100 Subject: [PATCH 4/4] Stop declaring version dynamically in pyproject.toml --- pyproject.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 163e1a44..37fe1119 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,6 +16,7 @@ requires = [ # [project] name = "jupyter_server_proxy" +version = "4.1.1-0.dev" description = "A Jupyter server extension to run additional processes and proxy to them that comes bundled JupyterLab extension to launch pre-defined processes." keywords = ["jupyter", "jupyterlab", "jupyterlab-extension"] authors = [ @@ -23,7 +24,6 @@ authors = [ { name = "Yuvi Panda", email = "yuvipanda@gmail.com" }, { name = "Jupyter Development Team", email = "jupyter@googlegroups.com" }, ] -dynamic = ["version"] readme = "README.md" license = { file = "LICENSE" } requires-python = ">=3.8" @@ -83,9 +83,6 @@ Tracker = "https://github.com/jupyterhub/jupyter-server-proxy/issues" # hatch ref: https://hatch.pypa.io/latest/ # -[tool.hatch.version] -path = "jupyter_server_proxy/_version.py" - [tool.hatch.build.targets.sdist] artifacts = [ "jupyter_server_proxy/labextension", @@ -190,6 +187,9 @@ regex = ''' message_template = "Bump to {new_version}" tag_template = "v{new_version}" +[[tool.tbump.file]] +src = "pyproject.toml" + [[tool.tbump.file]] src = "labextension/package.json"