This repo has three distinct concerns: a cookiecutter/copier template for
new Python projects ({{cookiecutter.project_name}}/), a repo-review plugin
(src/sp_repo_review/), and a MyST/MystMD-based developer guide (docs/).
- Run tests:
uv run pytest(oruvx nox -s rr_tests) - Run linting (pre-commit via prek):
uvx nox -s rr_lint - Run pylint:
uvx nox -s rr_pylint - Run the CLI:
uvx nox -s rr_run -- <path> - Regenerate README check list via cog:
uvx nox -s readme - Build wheel/sdist:
uvx nox -s rr_build
Important: tests run with PYTHONWARNDEFAULTENCODING=1.
The noxfile generates temporary projects for all 9 backends × vcs on/off × 3 docs engines (sphinx/mkdocs/zensical). These are slow.
nox -s "tests(hatch)"— run generated project tests for a single backendnox -s "lint(hatch)"— run pre-commit (prek) on generated projectnox -s "dist(hatch)"— verify build output includes LICENSEnox -s "native(hatch)"— test hatch/pdm/poetry native test runnersnox -s compare_copier— verify cookiecutter and copier produce identical filesnox -s compare_cruft— verify cookiecutter and cruft produce identical filesnox -s gha_bump— bump GitHub Actions versions across docs and templatesnox -s pc_bump— bump pre-commit hook versions across docs and templates
- Template directory:
{{cookiecutter.project_name}}/contains the cookiecuttter template. Copier readscopier.yml; cookiecutter readscookiecutter.json. Keep them in sync;compare_copierchecks this. - Entry points:
sp_repo_reviewregistersrepo-reviewchecks/families/fixtures via[project.entry-points]inpyproject.toml. - Generated docs: The README check list (line ~300+) is a cog block. Do not
edit it by hand; run
nox -s readmeor cog will fail in CI. - Cookie template
.pre-commit-config.yamlusesprek(a Rust-based pre-commit alternative), notpre-commit. - Ruff hook ID:
.pre-commit-config.yamlusesruff-checkas the hook id (notruff), for pre-commit 4.x compatibility.
tool.pytest.ini_options.norecursedirsexcludes{{cookiecutter.project_name}}so pytest does not descend into the template directory.tool.ruff.extend-excludealso excludes\{\{cookiecutter.project_name\}\}(double-escaped in TOML).tool.mypy.python_version = "3.10"; thesp_repo_review.*override enforcesdisallow_untyped_defs=True.tool.pylint.master.ignore-pathsignoressrc/sp_repo_review/_version.py(auto-generated by hatch-vcs).- Ruff selects
ALLwith many ignores; notable:S101(assert) andD(docstrings) are globally disabled.
- CI uses change detection to decide whether to run cookie tests or rr-tests.
Both are required to pass for the
passjob. - rr-tests matrix runs on Python 3.10, 3.12, 3.14 across ubuntu/macos/windows.
- Cookie tests reuse the same
reusable-cookie.ymlworkflow.
- Migrated from Jekyll to MyST (JupyterBook 2.0) using the
scientific-python-myst-theme. - Node/Bun-based; from the repo root, run
bun installthenbun run buildto build the site. - Config:
docs/myst.yml(TOC, project settings),docs/config/scientific-python.yml(theme options). - Custom plugin:
docs/rr-role.mjs— provides{rr}inline role for repo-review badge spans. - Custom CSS:
docs/assets/css/site.css— only.rr-btnbadge styling remains. - Docs pages in
docs/pages/contain cog blocks that auto-generate config examples from the template. - The repo-review interactive page is embedded using an
{anywidget}directive (seedocs/pages/guides/repo_review.md). - Tab-sets use
:sync: <tab-name>for cross-page tab synchronization, where the sync key is the tab label itself (e.g.,sphinx,mkdocs,trusted-publishing,scikit-build-core). - TOML code blocks in the docs use "ini" to get syntax highlighting for now.
This is applied only at the docs layer (the
code_fencecog helper inhelpers/cog_helpers.pyrewritestoml→ini); do not change thetomlfences in thesrc/sp_repo_review/checks/*.pydocstrings, which are rendered by repo-review itself, not this site.