This document provides guidelines for contributing to the grz-tools monorepo.
Please follow below steps to set up your development environment and contribute effectively.
Please also refer to the individual package READMEs for any package-specific development setup instructions.
- This monorepo uses uv to manage Python virtual environments for development.
- The
grz-checkpackage additionally requires the Rust toolchain to be installed. - The
grz-dbpackage additionally requires the PostgreSQL database server to be installed.
The simplest way to set up a development environment is to setup a conda environment with these dependencies:
You can use either conda, mamba or micromamba for this, e.g.:
mamba env create -n grz-tools -f environment-dev.yaml
mamba activate grz-toolsNext, install the virtual environment using uv:
uv sync --all-packages --all-groups --all-extrasTo run integration tests for all packages in this monorepo, run the following from the repository root:
uv run toxSome packages have their own unit tests.
Run uv run tox while inside a specific package directory to run that package's unit tests.
This project uses ruff for code formatting and linting.
To check code formatting and linting, run the following from the repository root:
uv run ruff checkSome errors can automatically be fixed by ruff:
uv run ruff check --fixTo auto-format the code, run:
uv run ruff formatThis project uses mypy for static type checking. To run type checking, run the following from the repository root:
uv run mypyDependencies are specified in each package's pyproject.toml file.
After changing dependencies, use uv sync to update the virtual environment for a specific package.
uv will only update the environment if the dependencies cannot be satisfied with the existing packages in the
environment (see also uv.lock file).
To update dependencies to their latest versions, use the --upgrade flag:
uv sync --all-packages --all-groups --all-extras --upgradeStart the remote Textual debugging console on the machine you will use to debug the Textual app.
uv run textual console
Use the TEXTUAL=devtools environment variable to instruct Textual to connect to the remote debug console.
TEXTUAL=devtools uv run grzctl db --config-file config.db.yaml tui