Development Guidelines#

Install#

  1. Clone this repository with git:

git clone git@github.com:crusaderky/pathfinder2e_stats.git
cd pathfinder2e_stats
  1. Install pixi

  2. To keep a fork in sync with the upstream source:

cd pathfinder2e_stats
git remote add upstream git@github.com:crusaderky/pathfinder2e_stats.git
git remote -v
git fetch -a upstream
git checkout main
git pull upstream main
git push origin main

Test#

Test using pixi:

pixi run tests

Test with coverage:

pixi run coverage

Test with coverage and open HTML report in your browser:

pixi run open-coverage

Code Formatting#

This project uses several code linters (ruff, mypy, etc.), which are enforced by CI. Developers should run them locally before they submit a PR, through the single command

pixi run lint

Optionally, you may wish to run the linters automatically every time you make a git commit. This can be done by running:

pixi run install-git-hooks

Now the code linters will be run each time you commit changes. You can skip these checks with git commit --no-verify or with the short version git commit -n.

Documentation#

Build the documentation in build/html using pixi:

pixi run docs

Build the documentation and open it in your browser:

pixi run open-docs