git clone https://github.com/CellMigrationLab/Fast4DRegPy
cd Fast4DRegPy
python -m pip install -e ".[dev]"
python -m ruff check src tests benchmarks validation lc_tests
python -m pytest -qThe test suite runs on Python 3.10–3.13 in about 10 seconds. NanoPyx (pinned to 2.1.4) is a real dependency of the tests: it is never mocked. Rules for changes to the registration code are in AGENTS.md.
The full comparison on the published movie is separate because it downloads a 1.5 GB archive: validation/README.md and Validation.
src/fast4dreg_lc_tools/ declares the tools with
LabConstrictor Tools:
typed functions whose forms napari and Fiji generate. They only call the
public API of fast4dreg. To test them, install labconstrictor-tools (the
version the installer pins, LC_TOOLS_PIN in
app/bash_bat_scripts/post_install.sh) and pandas:
pin=$(sed -n 's/^ *LC_TOOLS_PIN="\(.*\)"$/\1/p' app/bash_bat_scripts/post_install.sh)
python -m pip install pandas "https://github.com/CellMigrationLab/LabConstrictor-Tools/archive/refs/tags/${pin}.zip"
python -m pytest -q tests/test_lc_tools.py
cd lc_tests && python make_fixtures.py fixtures && labconstrictor-tools test --module fast4dreg_lc_tools --cases cases.jsonThe tests workflow runs both. What the cases check: lc_tests/README.md. How to write tools: the authoring guide.
The files that build the app come from the
LabConstrictor template:
app/, .tools/, .template_sync/, construct.yaml, environment.yaml,
setup.py, requirements*.txt and the workflows release_constructor.yml,
publish_pypi.yml, update_on_*, sync_template.yml and
check_app_manifest.yml. The weekly template-sync pull request keeps them up
to date; do not edit them by hand. Two files are this repository's own:
setup.pyis what the installer uses (it ships onlysetup.pyandsrc/). It has nopython_requiresorinstall_requires, which would overridepyproject.tomlin the package on PyPI.labconstrictor-app.yamldescribes the app for the App Centre: summary, hosts (notebook,napari,fiji), icon,distribution.pip. Guide: Describe your app.
The app's Python environment is pinned in
notebooks/Fast4DRegApp/requirements.yaml. When it changes on main, a
workflow regenerates requirements.txt and the lock files. The installer
images and the icon are in app/logo/ (from the Fast4DReg logo).
The template's own guides are in .tools/docs and on the LabConstrictor website.
A release builds the installers for Windows, macOS and Linux and, once publishing is switched on, uploads the package to PyPI, with the version of the release tag.
- Set
version = "X.Y.Z"inpyproject.tomland add the release notes toCHANGELOG.md. Commit tomain. - Publish a GitHub release with the tag
vX.Y.Z. - The Build Release Installers workflow writes the version into
setup.pyandconstruct.yamland attaches the installers to the release. The Publish the Python package to PyPI workflow uploadsfast4dregpyX.Y.Z. It stops, without uploading anything, if the version inpyproject.tomldiffers from the tag.
Details: Create executable installers.
- On pypi.org, add a pending
trusted publisher: owner
CellMigrationLab, repositoryFast4DRegPy, workflowpublish_pypi.yml, environmentpypi. - In the repository settings, Secrets and variables > Actions > Variables,
add
PYPI_PUBLISHwith the valuetrue(testpypifor a trial on TestPyPI).
No token is stored. Step by step: .tools/docs/external_code_upload.md.
After the first release with installers, submit the repository to the LabConstrictor App Centre. Later releases appear there by themselves.