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
Install 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 dev
The result is put into src/pylifemap/static
.
Tests
Python tests are in the tests
directory and can be run with:
just test
Documentation
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:
just doc
Docker image
To build the docker image manually, run the following at the root of the repisotory:
docker build . -t pylifemap
Maintenance notes
Releases
- Change version in
NEWS.md
andsrc/pylifemap/__about__.py
- Release the Python package with
uv build
anduv publish
inpylifemap
- Tag the version in git
- Create a release on Github
- Bump to dev version in
pyproject.toml
andNEWS.md