Starting v4.0.0 jupyter_firefly_extensions is distributed as a prebuilt JupyterLab extension. This means that it is configured in a way to deploy the frontend and the backend simultaneously - the frontend NPM package gets built and inserted in the Python package. So there's no need to publish a Javascript package on NPM, we only need to publish Python package on PyPI.
-
To push a new release you must be a maintainer in pypi (see pypi below)
-
Bump version in package.json - this step might be done in the PR (Note:
_version.py
is auto-generated and will pick version specified inpackage.json
) -
Clean out old distribution
rm dist/*
-
Create the distribution
- From the root directory of package, run:
pip install --upgrade build python -m build
- check it:
ls dist
should show two files a.tar.gz
file and a.whl
file
- From the root directory of package, run:
-
Optional - At this point you could do an optional test installation (see below)
-
Upload to PYPI
-
One-time-only auth setup: Login to pypi and then in your account settings, go to the API tokens section and select "Add API token". Give it any name and select scope to project:jupyter-firefly-extensions and create token. To save this token for later uses, make sure to create a
$HOME/.pypirc
file (or update it if you already have it) with the following:[distutils] index-servers = jupyter-firefly-extensions [jupyter-firefly-extensions] repository = https://upload.pypi.org/legacy/ username = __token__ password = pypi-token-you-created
-
Upload dist to pypi using twine (with the auth setup in previous step)
pip install --upgrade twine twine upload dist/* --repository jupyter-firefly-extensions
-
-
If any files were edited (i.e
package.json
):git commit -a
git push origin master
-
Tag
git tag -a version-#.#.#
(replace version number with the current version frompackage.json
)
-
Push tags
git push --tags
-
After this you can install
pip install jupyter_firefly_extensions
- Make a release with github, using the tag above
- https://pypi.org/project/jupyter_firefly_extensions/
- Currently 3 maintainers
- Testing site: https://test.pypi.org/project/jupyter_firefly_extensions/
- To create a test release you must be a mainainer on testpypi
- Create the distribution (see above)
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
pip uninstall jupyter_firefly_extensions
pip install --verbose --index-url https://testpypi.python.org/pypi jupyter_firefly_extensions