Development notes
Install from git
To install pylifemap from git:
# With pip
pip install git+https://github.com/Lifemap-ToL/pylifemap.git
# Add to a project with uv
uv add git+https://github.com/Lifemap-ToL/pylifemap.gitInstall fom source
If you want to build 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 the src/js/ or packages/lifemapjs/ directories, it must be bundled with one of the following commands in pylifemap:
# Bundle
npm run bundle
# Build (bundle + minify)
npm run build
# Bundle and watch for code change
npm run devThe result is put into src/pylifemap/static.
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 repisotory:
docker build . -t pylifemapMaintenance notes
Releases
- Change version in
NEWS.mdandsrc/pylifemap/__about__.py - Release the Python package with
uv buildanduv publishinpylifemap - Tag the version in git
- Create a release on Github
- Bump to dev version in
pyproject.tomlandNEWS.md