Skip to main content

baseline-py

Structural linter and config scaffolder for Python: atomic files, placement, size caps, no inline SQL. Brings the same discipline as @busirocket/eslint-config and cargo-baseline to Python projects.

Install

uv add --dev busirocket-baseline-py

Usage

baseline-py init [--check|--apply|--force]  # scaffold ruff, mypy, deptry,
                                            # pytest, coverage and CI config
baseline-py check [PATH...]                 # run the structural rules
baseline-py gate                            # run the whole quality chain
baseline-py baseline create|update|check    # track migration debt

init never overwrites: it merges into existing configuration, or reports a conflict. check never writes. gate fails when a required tool is absent rather than skipping it.

Rules

Code Rule Enforces
BPY000 parse-error A file that fails to parse is a finding, never a silent skip.
BPY001 one-primary-unit Exactly one primary declaration per ordinary module.
BPY002 file-matches-unit File name is the snake_case of its primary declaration.
BPY003 no-grab-bag-names No utils, helpers, misc or common in any path segment.
BPY004 max-file-lines Code-line cap per file; tests get their own, looser cap.
BPY005 barrel-only-init __init__.py holds imports, __all__ and nothing else.
BPY006 no-inline-sql SQL lives in resource files, not in string literals.

Exit codes

Code Meaning
0 All blocking checks passed.
1 Policy findings.
2 Invalid usage or invalid configuration.
3 Infrastructure failure: a required tool is missing or unusable.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

busirocket_baseline_py-0.1.3.tar.gz (125.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

busirocket_baseline_py-0.1.3-py3-none-any.whl (86.0 kB view details)

Uploaded Python 3

File details

Details for the file busirocket_baseline_py-0.1.3.tar.gz.

File metadata

  • Download URL: busirocket_baseline_py-0.1.3.tar.gz
  • Upload date:
  • Size: 125.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for busirocket_baseline_py-0.1.3.tar.gz
Algorithm Hash digest
SHA256 21aaf4f6f805c3f49e0adec67910273ff5feeecaa68a9c221cefe3bc6dc01847
MD5 9207ebb9ce7021b363c8fcb1b38c0d2c
BLAKE2b-256 e718d84fd71d464e96fd54eb2e821708db4c97b360983a9542b46824f7377cd6

See more details on using hashes here.

Provenance

The following attestation bundles were made for busirocket_baseline_py-0.1.3.tar.gz:

Publisher: publish-python.yml on BusiRocket/baseline

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file busirocket_baseline_py-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for busirocket_baseline_py-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 97758cb7e6f189e677c0b7d78742f089846d889231e80371bf3f6d2a6a29f4e2
MD5 0922a785b6d358908e0382f7f77b0f33
BLAKE2b-256 eea0b0c65b72e93efd1afd099ec4cfc5d23f216cf31a2dba8ff6e515776f4938

See more details on using hashes here.

Provenance

The following attestation bundles were made for busirocket_baseline_py-0.1.3-py3-none-any.whl:

Publisher: publish-python.yml on BusiRocket/baseline

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.12

2 files

0.1.11

2 files

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

This release

0.1.3 This release

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page