From db4851184c1ea4f2c1fed8fa99c118ccb906afd2 Mon Sep 17 00:00:00 2001 From: Tim Paine <3105306+timkpaine@users.noreply.github.com> Date: Thu, 19 Jun 2025 11:04:06 -0400 Subject: [PATCH 1/2] Add extension json --- jupyter/pyproject.toml.jinja | 2 ++ jupyter/{{module}}/extension/install.json.jinja | 5 +++++ .../extension/{{project_name_formatted}}.json.jinja | 7 +++++++ 3 files changed, 14 insertions(+) create mode 100644 jupyter/{{module}}/extension/install.json.jinja create mode 100644 jupyter/{{module}}/extension/{{project_name_formatted}}.json.jinja diff --git a/jupyter/pyproject.toml.jinja b/jupyter/pyproject.toml.jinja index 92215da..41a1a1b 100644 --- a/jupyter/pyproject.toml.jinja +++ b/jupyter/pyproject.toml.jinja @@ -122,6 +122,8 @@ exclude = ["js"] [tool.hatch.build.targets.wheel.shared-data] "{{module}}/labextension" = "share/jupyter/labextensions/{{module}}" +"{{module}}/extension/install.json" = "share/jupyter/labextensions/{{module}}/install.json" +"{{module}}/extension/{{module}}.json" = "etc/jupyter/jupyter_server_config.d/{{module}}.json" [tool.hatch.build.hooks.jupyter-builder] build-function = "hatch_jupyter_builder.npm_builder" diff --git a/jupyter/{{module}}/extension/install.json.jinja b/jupyter/{{module}}/extension/install.json.jinja new file mode 100644 index 0000000..99f0462 --- /dev/null +++ b/jupyter/{{module}}/extension/install.json.jinja @@ -0,0 +1,5 @@ +{ + "packageManager": "python", + "packageName": "{{project_name_formatted}}", + "uninstallInstructions": "Use your Python package manager (pip, conda, etc.) to uninstall the package {{project_name_formatted}}" +} \ No newline at end of file diff --git a/jupyter/{{module}}/extension/{{project_name_formatted}}.json.jinja b/jupyter/{{module}}/extension/{{project_name_formatted}}.json.jinja new file mode 100644 index 0000000..2286256 --- /dev/null +++ b/jupyter/{{module}}/extension/{{project_name_formatted}}.json.jinja @@ -0,0 +1,7 @@ +{ + "ServerApp": { + "jpserver_extensions": { + "{{module}}": true + } + } +} From 841756cadd14d13e0e3d08d786937d1918d6839b Mon Sep 17 00:00:00 2001 From: Tim Paine <3105306+timkpaine@users.noreply.github.com> Date: Thu, 19 Jun 2025 11:11:56 -0400 Subject: [PATCH 2/2] Rename {{project_name_formatted}}.json.jinja to {{module}}.json.jinja --- ...{project_name_formatted}}.json.jinja => {{module}}.json.jinja} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename jupyter/{{module}}/extension/{{{project_name_formatted}}.json.jinja => {{module}}.json.jinja} (100%) diff --git a/jupyter/{{module}}/extension/{{project_name_formatted}}.json.jinja b/jupyter/{{module}}/extension/{{module}}.json.jinja similarity index 100% rename from jupyter/{{module}}/extension/{{project_name_formatted}}.json.jinja rename to jupyter/{{module}}/extension/{{module}}.json.jinja