Development notes
Install the development version from Github
Development version can be installed with pip or uv from Github with:
# With pip
pip install git+https://github.com/Lifemap-ToL/pylifemap.git@bundle
# Add to a project with uv
uv add git+https://github.com/Lifemap-ToL/pylifemap.git@bundle
# Run python with uv
uv run --with git+https://github.com/Lifemap-ToL/pylifemap.git@bundle pythonInstall the development version from source
If you want to install pylifemap from source, you’ll have to follow these steps:
Widget JavaScript modification and bundling
Each time the widget JavaScript or CSS code is modified in src/js/ or src/css, it must be bundled with one of the following commands:
# Bundle and minify both deck and no_deck versions
npm run bundle
# Bundle with deck.gl without minifying and watch for code change
npm run dev_deck
# Bundle with deck.gl without minifying and watch for code change
npm run dev_nodeckTwo bundles are created:
- A bundle including deck.gl, in
src/pylifemap/static/deck - A smaller bundle without deck.gl, in
src/pylifemap/static/nodeck
One bundle or the other is used by the widget depending on the presence of deck.gl layers.
Tests
Python tests are in the tests directory and can be run with:
npm run testDocumentation
The package documentation is in doc/. It is managed by quarto and quartodoc.
To build it in HTML format in doc/_site/you can run:
npm run docDocker image
To build the docker image manually, run the following at the root of the repository:
docker build . -t pylifemapRelease notes
- Change version in
NEWS.mdandpyproject.toml - Run
uv syncto update lock file - Cleanup the previous builds in
dist/ - Bundle and minify JS and CSS and build package with
npm run build - Release the Python package with
uv publishinpylifemap - Tag the version in git
- Create a release on Github
- Bump to dev version in
pyproject.tomlandNEWS.md