Skip to content

Latest commit

 

History

History
92 lines (58 loc) · 1.77 KB

File metadata and controls

92 lines (58 loc) · 1.77 KB

Development Guide

Setup Hatch

See Hatch docs for a general walkthrough.

  1. Install hatch globally with pipx

    pipx install hatch
    hatch --version
  2. (Optional) Create hatch environments. You can skip this step since environments are automatically created when you run hatch commands in general

    hatch env create
  3. Spawn a shell in the default hatch environment

    hatch shell

    or spawn a shell in a specific environment, e.g. dev for local development

    hatch shell dev

    Use exit to exit the shell environment.

Local development environment

TBD

Running hatch scripts

See the scripts in pyproject.toml to see the configured commands available to hatch run <env>:<command>.

Build/serve documentation

To run a live server:

hatch run docs:serve

To build html:

hatch run docs:build

Run tests

To run all tests on all python versions use:

hatch run test:run

To run the tests on a single python version use:

hatch run test.py3.14:run

To open a shell with the test environment for python 3.14, run

hatch shell test.py3.14

Linting and code style

Pre-commit

We use pre-commit to automatically apply linting and code style checks when a git commit is made. See the configuration in the .pre-commit-config.yaml file.

In the dev shell, you can install the hooks and run with

pre-commit install

and optionally, you can manually run this against all files with

pre-commit run --all-files