A template repo for python projects that is set up using pixi.
This has basic setup for
- ruff (formatting and linting)
- pytest
- codecov
- git-lfs
- basic github actions ci
- pulling updates from this template
Ruff is pinned once, as ruff==X.Y.Z in pyproject.toml. Everything else runs that ruff from the pixi environment:
pixi run lintandpixi run cirunruff check .andruff format --check .- the prek hooks in
.pre-commit-config.yamlarerepo: localhooks that runpixi run --locked ruff ..., so they carry no version of their own - CI (
ci.ymlandprek.yaml) installs the pixi environment withsetup-pixiandlocked: true, so CI fails whenpixi.lockdoes not matchpyproject.toml. It does not run a stale ruff.
To change the ruff version, edit the pin in pyproject.toml and run pixi lock. Dependabot changes only pyproject.toml, so run pixi lock on its PR before you merge it. Do not add a rev: for ruff to .pre-commit-config.yaml or a version: to a ruff GitHub action.
There are three methods of using this project.
- Use github to use this project as a template
- Clone the project and run, scripts/update_from_template.sh and then scripts/rename_project.sh to rename the project.
- In your existing git project run this command: