Contributing
Contributions are very welcome. Please file issues or submit pull requests in our GitHub repository. All contributors will be acknowledged, but must abide by our Code of Conduct.
Please
- Use Conventional Commits.
- Open an issue before creating a pull request.
Setup
- Fork or clone the repository.
- `uv sync --extra dev" to install an editable version of this package along with all its dependencies (including developer dependencies).
- Use
uv run COMMANDto run commands in the virtual environments. In particular, useuv run doit listto see available commands anduv run doit COMMANDto run a command.
Alternatively:
- Create a fresh Python environment:
uv venv - Activate that environment:
source .venv/bin/activate - Install dependencies and editable version of package:
uv pip install -e '.[dev]'
Actions
uv run doit list prints a list of available commands.
| Command | Action |
|---|---|
| all | Regenerate all data using example parameters. |
| assays | Generate sample assays file. |
| build | Build the Python package in the current directory. |
| coverage | Run tests with coverage. |
| docs | Generate documentation using MkDocs. |
| format | Reformat code. |
| grid | Generate sample grid file. |
| init | Regenerate default parameters. |
| lint | Check the code format. |
| mangle | Mangle generated assay files. |
| people | Generate sample people file. |
| specimens | Generate sample specimens file. |
| test | Run tests. |
| tidy | Clean all build artifacts. |
| typing | Check types with pyright. |
Publishing
Use twine upload --verbose -u __token__ -p pypi-your-access-token dist/*.
Tooling
-
The command-line interface to Claude. I'm disgusted by the amorality of the AI industry, but am now convinced that the coding tools are here to stay: writing tests and refactoring code with Claude's help was much faster than doing it by hand.
-
uvfor managing the packages and virtual environment and for running commands. It's the first time I've used it as itself rather than runninguv pip whatever; never going back. -
ruffandpyrightfor checking the code.ruffis a joy, but checking type annotations withpyrightcost me a couple of hours. It's not the tool's fault, though: figuring out how to annotate the last 5% of the code led to me writing my first protocol and then throwing up my hands and replacing it withAny. -
pydanticfor storing and validating records, including the data thatsnailzgenerates and the parameters used in generation. I started withdataclasses, but switched as soon as I found myself1 adding methods thatpydanticalready had. -
doitto run commands instead of Make. I'm more comfortable with the latter, but I recognize that writing Makefiles is a dying art. -
mkdocsfor documentation instead of Sphinx orpdoc2. I findmkdocseasier to work with than Sphinx, andpdocdoesn't support "extra" Markdown pages as well asmkdocs. (If the folks at Astral are looking for new product ideas, a better documentation generator would have at least one paying customer the day it launched…) -
pytest,pyfakefs, andfakerfor testing andclickfor building the command-line interface instead ofargparse.