Developing PyImageJο
This document describes how to do development-related tasks, if you want to hack on the PyImageJ code itself. If your goal is only to use PyImageJ to call ImageJ and friends from Python, you do not need to follow any of these instructions.
Testing local changesο
This project is designed to work with uv
for package management, which automatically manages cached virtual environments. uv is invoked as a wrapper around processes, reusing the cached libraries as needed.
If you have local pyimagej changes you wanted to test, you can simply start a python interpreter from the project root:
uv run python
All of the following make commands implicitly use uv in their tasks.
Local changes in downstream projectsο
If you are testing a project that uses pyimagej and need to see how changes in pyimagej impact your code, you have two options. Either way, you will need to install pyimagej in editable mode into the virtual environment of your choice:
A
uv-managed virual environment, e.g.uv venvA mamba-managed environment
Building the reference documentationο
PyImageJ documentation is built as a Sphinx-built ReadTheDocs site.
You can either use the documentationβs own Makefile in the /docs directory:
make html
Alternatively, from the project root Makefile:
make docs
Results are generated to doc/_build/html.
Production documentation is available online at
https://py.imagej.net/.
Running the automated testsο
make test
Formatting the codeο
make lint
Building distribution bundlesο
make dist