Valkyrja Ruff
Shared Ruff configuration and the copyright header injector for Valkyrja Python repositories.
Ruff enforces the copyright header through CPY001, and it reports a file that
does not match. It corrects nothing. Every other language in the organization has
a formatter that writes the header: PHP CS Fixer, Spotless, goheader, and the
ESLint rule all replace a wrong header. Python had no such tool, so a person added
each header by hand.
This package supplies that tool. valkyrja-ruff-header writes the header into
every Python file, and it replaces a header that names the wrong package.
The header text lives in this package and nowhere else. A repository supplies only
its own package identifier, which it already declares in
.github/ci/copyright-header/config. COPYRIGHT_HEADER.md in the .github
repository maps every repository to its identifier.
Usage
Write the header into every Python file
valkyrja-ruff-header
The command reads src and tests by default. Give it a path to read another
one. It reads the identifier from .github/ci/copyright-header/config, so the
repository declares its name once.
Report a file that needs the header, and write nothing
valkyrja-ruff-header --check
The command reports a failure when a file needs the header, so a gate can run it.
Options
| Option | Effect |
|---|---|
--check |
report a file that needs the header, and write nothing |
--identifier |
name the package, instead of reading the repository config |
--root |
name the repository root |
--print-ruff-config |
print the Ruff --config override, and write nothing |
What the command does not touch
The command puts the header at the top of the file, below a shebang and below a PEP 263 coding declaration. A shebang that moves off the first line stops working, and a coding declaration that moves below the second line stops being read.
Warning: the command replaces a license header, and it replaces nothing else. A tool that replaces the first comment block removes a comment that explains the code, and the gate then passes because the file carries a correct header. This command reads the leading comment block and requires every marker of a license header in it. A file whose first comment explains the code keeps that comment, and the header goes above it.
What's Included
- Full CI pipeline — the same Ruff, mypy, Bandit, import-linter, and pytest
configuration used across every Valkyrjaio Python repo, each isolated under
.github/ci/<tool>/with its ownpyproject.toml+uv.lock - uv configuration — a root
pyproject.tomlwhose[tool.poe.tasks]expose a shortcut for each CI tool, matching the org convention - Repository conventions — aligned with
REPOSITORY_NAMING.mdandVOCABULARY.md
Running the CI Tools
Every tool is isolated under .github/ci/<tool>/ with its own pyproject.toml
and uv.lock. Drive them through the root poe tasks — each runs the
tool from its isolated environment (uv run --project …) against the repo root:
uv run poe ci # run the full CI gate
uv run poe ruff-format # auto-format
uv run poe ruff # lint
uv run poe mypy # type-check
uv run poe import-linter # architecture / import boundaries
uv run poe bandit # security
uv run poe pytest-coverage # tests + 100% coverage
Versioning and Release Process
This package follows semantic versioning with a major release every year, and support for each major version for 2 years from the date of release.
For more information see our Versioning and Release Process documentation.
Supported Versions
Bug fixes are provided until 3 months after the next major release. Security fixes are provided for 2 years after the initial release.
| Version | Python | Release | Bug Fixes Until | Security Fixes Until |
|---|---|---|---|---|
| 26 | 3.14+ | March 31, 2026 | Q2 2027 | Q1 2028 |
Contributing
This package is an open-source, community-driven project. Improvements to this package itself — refinements to the included CI configuration, uv setup, or documentation — are welcome.
See CONTRIBUTING.md for the submission process and
VOCABULARY.md for the terminology used across Valkyrja.
Security Issues
If you discover a security vulnerability, please follow our disclosure procedure.
License
This package is open-source software licensed under the
MIT license. See LICENSE.md.
Metadata
Release files for valkyrja-ci-ruff 26.0.36
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| valkyrja_ci_ruff-26.0.36.tar.gz | 63.1 kB | Without provenance | Details for valkyrja_ci_ruff-26.0.36.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| valkyrja_ci_ruff-26.0.36-py3-none-any.whl | Python 3 | none | any | Details for valkyrja_ci_ruff-26.0.36-py3-none-any.whl |
Total release size: 78.2 kB
Release files / valkyrja_ci_ruff-26.0.36.tar.gz
| Download URL | valkyrja_ci_ruff-26.0.36.tar.gz |
|---|---|
| Size | 63.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a7a69340634307d075fdaee3f62160be1783b5554c011155fe9f0125b6a79343
|
|
BLAKE2b-256 checksum How to use checksums |
5ca7deb601107fb45eaf85a4a0bbd976bee3984467871241212e1653bdbe230c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / valkyrja_ci_ruff-26.0.36-py3-none-any.whl
| Download URL | valkyrja_ci_ruff-26.0.36-py3-none-any.whl |
|---|---|
| Size | 15.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fc92f7d938978b1ca46b6f48cd92108f508328193fac610061d89bf4c0fbf0c6
|
|
BLAKE2b-256 checksum How to use checksums |
b1bce321b7dbb0319ec6539061f037ba17345bb502ff4a22f8d187d788a94dab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for valkyrja-ci-ruff 26.0.36
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.