Developer Guide

Warning

To create new processes look at examples in Emu.

Building the docs

First install dependencies for the documentation:

$ make develop

Run the Sphinx docs generator:

$ make docs

Running tests

Run tests using pytest.

First activate the rook Conda environment and install pytest.

$ source activate rook
$ pip install -r requirements_dev.txt  # if not already installed
OR
$ make develop

Run default local tests (skip smoke and online):

$ pytest -v -m "not smoke and not online"

Run smoke tests against a deployed production service only:

$ pytest -v -m "smoke" tests/smoke

Run all tests:

$ pytest -v

Run lint checks:

$ ruff check src/rook tests

Run tests the lazy way

Do the same as above using the Makefile.

$ make test
$ make smoke
$ make lint

Prepare a release

Update the Conda specification file to build identical environments on a specific OS.

Note

You should run this on your target OS, in our case Linux.

$ conda env create -f environment.yml
$ source activate rook
$ make clean
$ make install
$ conda list -n rook --explicit > linux-64.spec

For backward compatibility during migration, spec-file.txt is kept as a symlink alias to linux-64.spec.

Bump a new version

Make a new version of rook in the following steps:

  • Make sure everything is committed to GitHub.

  • Update CHANGELOG.rst with the next version.

  • Dry Run: bump-my-version bump --dry-run --verbose --new-version 1.2.1 patch

  • Do it: bump-my-version bump --new-version 1.2.1 patch

  • … or: bump-my-version bump --new-version 1.3.0 minor

  • Push it: git push

  • Push tag: git push --tags

See the bump-my-version documentation for details.