diff --git a/CHANGELOG.md b/CHANGELOG.md index c433eb7f..9807cbbc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * **Fixed** for any bug fixes. * **Security** in case of vulnerabilities. +## [0.2.6] + +### Fixed + +* fix deprecated npm_install jupyter module and replaced by hatch_jupyter_builder.npm_builder + +### Changed + +* The corresponding Aladin-lite version is now pinned instead of pointing to the latest version. +* There is no dependency to jquery anymore + ## [0.2.5] ### Fixed diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index 7322989f..fb208dee 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -1,5 +1,5 @@ {% set name = "ipyaladin" %} -{% set version = "0.2.5" %} +{% set version = "0.2.6" %} package: name: "{{ name|lower }}" diff --git a/conda-recipe/readme b/conda-recipe/readme index e5151677..5f8b6c36 100644 --- a/conda-recipe/readme +++ b/conda-recipe/readme @@ -18,9 +18,9 @@ conda skeleton pypi --extra-specs jupyter-packaging ipyaladin // change the meta.yaml in ipyaladin/ cp post-link.* pre-unlink.* ipyaladin conda build ipyaladin --output-folder distrib -conda convert --platform all distrib/linux-64/ipyaladin-0.2.5-py39_0.tar.bz2 -o distrib +conda convert --platform all distrib/linux-64/ipyaladin-0.2.6-py39_0.tar.bz2 -o distrib anaconda login -anaconda upload distrib/osx-64/ipyaladin-0.2.5-py39_0.tar.bz2 -anaconda upload distrib/linux-64/ipyaladin-0.2.5-py39_0.tar.bz2 +anaconda upload distrib/osx-64/ipyaladin-0.2.6-py39_0.tar.bz2 +anaconda upload distrib/linux-64/ipyaladin-0.2.6-py39_0.tar.bz2 rm -r distrib ipyaladin diff --git a/ipyaladin/_version.py b/ipyaladin/_version.py index d1b5e50b..632f5678 100644 --- a/ipyaladin/_version.py +++ b/ipyaladin/_version.py @@ -1,4 +1,4 @@ # Module version -__version__ = '0.2.5' +__version__ = '0.2.6' -NPM_PACKAGE_RANGE='^0.2.5' \ No newline at end of file +NPM_PACKAGE_RANGE='^0.2.6' \ No newline at end of file diff --git a/js/lib/jupyter-aladin.js b/js/lib/jupyter-aladin.js index ab6dcd41..6b891209 100644 --- a/js/lib/jupyter-aladin.js +++ b/js/lib/jupyter-aladin.js @@ -32,8 +32,7 @@ const loadScript = (FILE_URL, async = true, type = "text/javascript") => { } }); }; -let AladinLiteJS_Loader = loadScript("https://code.jquery.com/jquery-3.6.1.min.js") - .then(() => { return loadScript("https://aladin.u-strasbg.fr/AladinLite/api/v3/latest/aladin.js") }) +let AladinLiteJS_Loader = loadScript("https://aladin.cds.unistra.fr/AladinLite/api/v3/3.2.0/aladin.js") .then(async () => { await A.init; }); diff --git a/js/package.json b/js/package.json index 13470693..9e5c6ccd 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "ipyaladin", - "version": "0.2.5", + "version": "0.2.6", "description": "ipyaladin", "author": "Thomas Boch, Jerome Desroziers and Matthieu Baumann", "license": "BSD-3-Clause", diff --git a/pyproject.toml b/pyproject.toml index eee6fa5a..382cb734 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,45 @@ [build-system] requires = ["jupyter_packaging>=0.7.9", "jupyterlab>=3.0", "setuptools>=40.8.0", "wheel", "traitlets>=5.9.0", "traitlets>=5.9.0"] -build-backend = "setuptools.build_meta" \ No newline at end of file +build-backend = "setuptools.build_meta" + + + +[tool.hatch.metadata] +allow-direct-references = true + +[tool.hatch.build] +artifacts = [ + "ipyaladin/nbextension/index.*", + "ipyaladin/labextension/*.tgz", + "ipyaladin/labextension", +] + +[tool.hatch.build.targets.wheel.shared-data] +"ipyaladin/nbextension" = "share/jupyter/nbextensions/ipyaladin" +"ipyaladin/labextension" = "share/jupyter/labextensions/ipyaladin" +"./install.json" = "share/jupyter/labextensions/ipyaladin/install.json" +"./ipyaladin.json" = "etc/jupyter/nbconfig/notebook.d/ipyaladin.json" + +[tool.hatch.build.targets.sdist] +exclude = [ + ".github", +] + +[tool.hatch.build.hooks.jupyter-builder] +build-function = "hatch_jupyter_builder.npm_builder" +ensured-targets = [ + "ipyaladin/nbextension/index.js", + "ipyaladin/labextension/package.json", +] +skip-if-exists = [ + "ipyaladin/nbextension/index.js", + "ipyaladin/labextension/package.json", +] +dependencies = [ + "hatch-jupyter-builder>=0.8.3", +] + +[tool.hatch.build.hooks.jupyter-builder.build-kwargs] +path = "." +build_cmd = "build:prod" +npm = ["jlpm"] \ No newline at end of file diff --git a/setup.py b/setup.py index b3d5db48..b6c66813 100644 --- a/setup.py +++ b/setup.py @@ -1,30 +1,2 @@ -from setuptools import setup -from pathlib import Path - -from jupyter_packaging import ( - create_cmdclass, - install_npm, - ensure_targets, - combine_commands, -) - -JS_DIR = Path(__file__).resolve().parent / 'js' - -# Representative files that should exist after a successful build -jstargets = [JS_DIR / 'dist' / 'index.js'] - -data_files_spec = [ - ('share/jupyter/nbextensions/ipyaladin', 'ipyaladin/nbextension', '*.*'), - ('share/jupyter/labextensions/ipyaladin', 'ipyaladin/labextension', '**'), - ('share/jupyter/labextensions/ipyaladin', '.', 'install.json'), - ('etc/jupyter/nbconfig/notebook.d', '.', 'ipyaladin.json'), -] - -cmdclass = create_cmdclass('jsdeps', data_files_spec=data_files_spec) -cmdclass['jsdeps'] = combine_commands( - install_npm(JS_DIR, npm=['yarn'], build_cmd='build:prod'), - ensure_targets(jstargets), -) - -# See setup.cfg for other parameters -setup(cmdclass=cmdclass) +# setup.py shim for use with applications that require it. +__import__("setuptools").setup()