Initial port to JupyterLab v4
This commit is contained in:
Родитель
19c8efb4e0
Коммит
2beb34b7a2
|
@ -0,0 +1,4 @@
|
|||
/.yarn/** linguist-vendored
|
||||
/.yarn/releases/* binary
|
||||
/.yarn/plugins/**/* binary
|
||||
/.pnp.* binary linguist-generated
|
|
@ -1,5 +1,6 @@
|
|||
/.vs/
|
||||
/.yarn/
|
||||
__pycache__/
|
||||
dist/
|
||||
node_modules/
|
||||
tsconfig.tsbuildinfo
|
||||
|
|
|
@ -1,2 +1,5 @@
|
|||
enableImmutableInstalls: false
|
||||
|
||||
nodeLinker: node-modules
|
||||
|
||||
yarnPath: .yarn/releases/yarn-3.6.2.cjs
|
||||
|
|
53
README.md
53
README.md
|
@ -14,18 +14,18 @@ about WWT [here][wwt-home].
|
|||
|
||||
This extension supports:
|
||||
|
||||
- The JupyterLab 2.x series
|
||||
- The JupyterLab 3.x series
|
||||
- The JupyterLab 4.x series
|
||||
|
||||
Older releases support the 2.x and 3.x series of JupyterLab.
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
There are two main ways you can install this extension. Both of them require
|
||||
that you already have JupyterLab set up.
|
||||
To install this extension, you must first install JupyterLab. Currently this
|
||||
extensions only supports the JupyterLab 4.x version series.
|
||||
|
||||
If you have JupyterLab >= 3.0 installed, you can install this extension in
|
||||
"prebuilt" mode, by installing its corresponding Python package,
|
||||
[`wwt_jupyterlab_extension`]. On the command line this might be done with:
|
||||
Next, install this extension’s Python package, [`wwt_jupyterlab_extension`]. On
|
||||
the command line this might be done with:
|
||||
|
||||
[`wwt_jupyterlab_extension`]: https://pypi.org/project/wwt-jupyterlab-extension/
|
||||
|
||||
|
@ -33,24 +33,8 @@ If you have JupyterLab >= 3.0 installed, you can install this extension in
|
|||
$ pip install wwt_jupyterlab_extension
|
||||
```
|
||||
|
||||
The prebuilt approach is the one that is generally recommended.
|
||||
**Alternatively**, you can also install this extension in "source" mode, using
|
||||
its NPM package [`@wwtelescope/jupyterlab`]. You can do this from JupyterLab
|
||||
itself, using its [Extension Manager], or from the command line with:
|
||||
|
||||
[`@wwtelescope/jupyterlab`]: https://www.npmjs.com/package/@wwtelescope/jupyterlab
|
||||
[Extension Manager]: https://jupyterlab.readthedocs.io/en/stable/user/extensions.html#managing-extensions-using-the-extension-manager
|
||||
|
||||
```bash
|
||||
$ jupyter labextension install @wwtelescope/jupyterlab
|
||||
```
|
||||
|
||||
There is a `jupyter labextension uninstall` command to remove the extension if
|
||||
you install it this way. This installation mode requires a "rebuild" of the
|
||||
JupyterLab app assets, which is somewhat slow and requires the [Node.js] system
|
||||
to be available on your system.
|
||||
|
||||
[Node.js]: https://nodejs.org/
|
||||
This is known as a “prebuilt” extension installation is strongly preferred in
|
||||
current versions of JupyterLab.
|
||||
|
||||
In concert with this extension we recommend that you install:
|
||||
|
||||
|
@ -60,7 +44,7 @@ In concert with this extension we recommend that you install:
|
|||
|
||||
[jupyterlab_widgets]: https://pypi.org/project/jupyterlab-widgets/
|
||||
[pywwt]: https://pywwt.readthedocs.io/
|
||||
[server extension]: https://jupyter-notebook.readthedocs.io/en/stable/extending/handlers.html#writing-a-notebook-server-extension
|
||||
[server extension]: https://jupyter-server.readthedocs.io/en/stable/developers/extensions.html
|
||||
[wwt_kernel_data_relay]: https://wwt-kernel-data-relay.readthedocs.io/
|
||||
|
||||
|
||||
|
@ -106,18 +90,15 @@ using the [jlpm] command, which is JupyterLab’s bundled version of [yarn].
|
|||
Some useful commands are as follows:
|
||||
|
||||
```bash
|
||||
$ jupyter labextension install . # link your development version of the extension with JupyterLab
|
||||
$ jupyter lab build # Rebuild JupyterLab after making any changes
|
||||
$ jlpm run build # compile TS -> JS
|
||||
$ jupyter labextension build # create wwt_jupyterlab_extension/wwt_jupyterlab_extension/labextension
|
||||
$ cd wwt_jupyterlab_extension && python -m build # create dists of the Python package
|
||||
|
||||
$ jlpm add ${npm_package_name} # add a dep
|
||||
$ jlpm eslint # detect *and fix* ESLint complaints
|
||||
|
||||
$ jlpm watch # Auto-rebuild sources (long-running)
|
||||
$ jupyter lab --watch # Run JupyterLab, auto-reloading changed extensions (long-running)
|
||||
|
||||
$ jlpm run build # build locally
|
||||
$ jlpm add ${npm_package_name} # add a dep
|
||||
|
||||
$ jupyter labextension build # build the prebuilt version of the extension
|
||||
$ cd wwt_jupyterlab_extension && python -m build # build dists of the prebuild Python module
|
||||
|
||||
$ jlpm eslint # detect and fix ESLint complaints
|
||||
```
|
||||
|
||||
|
||||
|
|
42
package.json
42
package.json
|
@ -8,31 +8,29 @@
|
|||
"url": "https://github.com/WorldWideTelescope/wwt-jupyterlab/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"@jupyterlab/application": "^2.2.6 || ^3.0.0",
|
||||
"@jupyterlab/apputils": "^2.2.6 || ^3.0.0",
|
||||
"@jupyterlab/launcher": "^2.2.6 || ^3.0.0",
|
||||
"@jupyterlab/notebook": "^2.2.6 || ^3.0.0",
|
||||
"@jupyterlab/services": "^5.2.5 || ^6.0.0",
|
||||
"@jupyterlab/settingregistry": "^3.1.0",
|
||||
"@jupyterlab/ui-components": "^2.2.4 || ^3.0.0",
|
||||
"@lumino/algorithm": "^1.3.3",
|
||||
"@lumino/messaging": "^1.4.3",
|
||||
"@lumino/widgets": "^1.14.0",
|
||||
"@wwtelescope/research-app-messages": "^0.15",
|
||||
"node2nix": "^1.11.0"
|
||||
"@jupyterlab/application": "^4.0.0",
|
||||
"@jupyterlab/apputils": "^4.0.0",
|
||||
"@jupyterlab/launcher": "^4.0.0",
|
||||
"@jupyterlab/notebook": "^4.0.0",
|
||||
"@jupyterlab/services": "^7.0.0",
|
||||
"@jupyterlab/settingregistry": "^4.0.0",
|
||||
"@jupyterlab/ui-components": "^4.0.0",
|
||||
"@lumino/algorithm": "^2.0.0",
|
||||
"@lumino/messaging": "^2.0.0",
|
||||
"@lumino/widgets": "^2.0.0",
|
||||
"@wwtelescope/research-app-messages": "^0.15"
|
||||
},
|
||||
"description": "WorldWide Telescope in JupyterLab",
|
||||
"devDependencies": {
|
||||
"@babel/polyfill": "^7.7.0",
|
||||
"@jupyterlab/builder": "^3.1.0",
|
||||
"@typescript-eslint/eslint-plugin": "^4.8.1",
|
||||
"@typescript-eslint/parser": "^4.8.1",
|
||||
"eslint": "^7.14.0",
|
||||
"eslint-config-prettier": "^6.15.0",
|
||||
"eslint-plugin-prettier": "^3.1.2",
|
||||
"prettier": "^2.1.1",
|
||||
"rimraf": "^3.0.2",
|
||||
"typescript": "~4.1.3"
|
||||
"@jupyterlab/builder": "^4.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.55.0",
|
||||
"@typescript-eslint/parser": "^5.55.0",
|
||||
"eslint": "^8.36.0",
|
||||
"eslint-config-prettier": "^8.7.0",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"prettier": "^2.8.7",
|
||||
"rimraf": "^4.4.1",
|
||||
"typescript": "~5.0.2"
|
||||
},
|
||||
"files": [
|
||||
"dist/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"title": "AAS WorldWide Telescope",
|
||||
"description": "Settings for the AAS WorldWide Telescope JupyterLab integration.",
|
||||
"title": "WorldWide Telescope",
|
||||
"description": "Settings for the WorldWide Telescope JupyterLab integration.",
|
||||
"jupyter.lab.setting-icon": "@wwtelescope/jupyterlab:research:wwt",
|
||||
"jupyter.lab.setting-icon-label": "AAS WorldWide Telescope",
|
||||
"jupyter.lab.setting-icon-label": "WorldWide Telescope",
|
||||
"properties": {
|
||||
"appUrl": {
|
||||
"title": "WWT research application URL",
|
||||
|
@ -13,4 +13,4 @@
|
|||
},
|
||||
"additionalProperties": false,
|
||||
"type": "object"
|
||||
}
|
||||
}
|
|
@ -16,9 +16,11 @@
|
|||
"outDir": "dist",
|
||||
"rootDir": "src",
|
||||
"strict": true,
|
||||
"strictNullChecks": false,
|
||||
"target": "es2017",
|
||||
"strictNullChecks": true,
|
||||
"target": "ES2018",
|
||||
"types": []
|
||||
},
|
||||
"include": ["src/*"]
|
||||
}
|
||||
"include": [
|
||||
"src/*"
|
||||
]
|
||||
}
|
|
@ -1,20 +1,66 @@
|
|||
[build-system]
|
||||
requires = ["jupyter_packaging~=0.10,<2", "jupyterlab~=3.1"]
|
||||
build-backend = "jupyter_packaging.build_api"
|
||||
requires = ["hatchling>=1.5.0", "jupyterlab>=4.0.0,<5", "hatch-nodejs-version"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[tool.jupyter-packaging.options]
|
||||
[project]
|
||||
name = "wwt_jupyterlab_extension"
|
||||
readme = "README.md"
|
||||
license = { text = "MIT License" }
|
||||
requires-python = ">=3.8"
|
||||
classifiers = [
|
||||
"Framework :: Jupyter",
|
||||
"Framework :: Jupyter :: JupyterLab",
|
||||
"Framework :: Jupyter :: JupyterLab :: 4",
|
||||
"Framework :: Jupyter :: JupyterLab :: Extensions",
|
||||
"Framework :: Jupyter :: JupyterLab :: Extensions :: Prebuilt",
|
||||
"License :: OSI Approved :: BSD License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
]
|
||||
dependencies = []
|
||||
dynamic = ["version"]
|
||||
|
||||
[tool.hatch.version]
|
||||
path = "wwt_jupyterlab_extension/_version.py"
|
||||
|
||||
[tool.hatch.build.targets.sdist]
|
||||
artifacts = ["wwt_jupyterlab_extension/labextension"]
|
||||
|
||||
[tool.hatch.build.targets.wheel.shared-data]
|
||||
"wwt_jupyterlab_extension/labextension" = "share/jupyter/labextensions/@wwtelescope/jupyterlab"
|
||||
"install.json" = "share/jupyter/labextensions/@wwtelescope/jupyterlab/install.json"
|
||||
|
||||
[tool.hatch.build.hooks.jupyter-builder]
|
||||
dependencies = ["hatch-jupyter-builder>=0.5"]
|
||||
build-function = "hatch_jupyter_builder.npm_builder"
|
||||
skip-if-exists = ["wwt_jupyterlab_extension/labextension/static/style.js"]
|
||||
ensured-targets = ["wwt_jupyterlab_extension/labextension/static/style.js", "wwt_jupyterlab_extension/labextension/package.json"]
|
||||
ensured-targets = [
|
||||
"wwt_jupyterlab_extension/labextension/static/style.js",
|
||||
"wwt_jupyterlab_extension/labextension/package.json",
|
||||
]
|
||||
|
||||
[tool.jupyter-packaging.builder]
|
||||
factory = "jupyter_packaging.npm_builder"
|
||||
|
||||
[tool.jupyter-packaging.build-args]
|
||||
[tool.hatch.build.hooks.jupyter-builder.build-kwargs]
|
||||
build_cmd = "build:prod"
|
||||
npm = ["jlpm"]
|
||||
|
||||
[tool.hatch.build.hooks.jupyter-builder.editable-build-kwargs]
|
||||
build_cmd = "install:extension"
|
||||
npm = ["jlpm"]
|
||||
source_dir = "src"
|
||||
build_dir = "wwt_jupyterlab_examples/labextension"
|
||||
|
||||
[tool.check-manifest]
|
||||
ignore = ["wwt_jupyterlab_extension/labextension/**", ".*"]
|
||||
|
||||
[tool.check-wheel-contents]
|
||||
ignore = ["W002"]
|
||||
|
||||
[tool.cranko]
|
||||
main_version_file = "wwt_jupyterlab_extension/_version.py"
|
||||
|
|
|
@ -1,18 +1 @@
|
|||
version_info = (0, 0, 0, "dev", 0) # cranko project-version tuple
|
||||
|
||||
_specifier_ = {
|
||||
"alpha": ".a",
|
||||
"beta": ".b",
|
||||
"candidate": ".rc",
|
||||
"final": "",
|
||||
"dev": ".dev",
|
||||
}
|
||||
|
||||
__version__ = "%s.%s.%s%s" % (
|
||||
version_info[0],
|
||||
version_info[1],
|
||||
version_info[2],
|
||||
""
|
||||
if version_info[3] == "final"
|
||||
else _specifier_[version_info[3]] + str(version_info[4]),
|
||||
)
|
||||
__version__ = "0.dev0" # cranko project-version
|
||||
|
|
8583
yarn.lock
8583
yarn.lock
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче