Shared infrastructure for the coop-*-review standards linters: progress, diagnostics, severity/fingerprint, inline + baseline suppressions, self-update, and the rules.yml config layer.
Project description
coop-review-core
Shared infrastructure for the coop-*-review family of offline, advisory standards linters
(coop-sql-review,
coop-dax-review, and future siblings).
It holds the tool-agnostic building blocks that were otherwise duplicated across each linter, so an
infrastructure fix lands once instead of being copy-pasted (and silently drifting) between repos.
Each linter keeps its own parsers, rules, Finding/Result model, and standards.md; it
parameterizes the core with its own package name, tool name, and standards file.
What's in it
| Module | What it provides |
|---|---|
coop_review_core.progress |
Stderr-only, TTY-gated scan progress (Progress, should_enable). |
coop_review_core.diagnostics |
The Diagnostic model + processing-problem category constants. |
coop_review_core.severity |
Severity ordering (SEVERITIES, severity_rank, at_or_above) + the stable, line-independent fingerprint. |
coop_review_core.suppressions |
Inline <tool>:ignore directives + a fingerprint baseline (scan_directives, is_inline_suppressed, write_baseline, load_baseline). |
coop_review_core.upgrade |
Self-update planning — the only networked part (build_plan, upgrade_command, apply_plan). |
coop_review_core.config |
The rules.yml config layer + standards resolution (RuleConfig, apply_config, resolve_standards_path, standards_info). |
Everything is deterministic and offline except upgrade (PyPI metadata / git fetch), and
nothing here ever blocks a build.
How a linter uses it
from coop_review_core.config import RuleConfig, apply_config, resolve_standards_path
from coop_review_core.suppressions import scan_directives, is_inline_suppressed
from coop_review_core.upgrade import build_plan, upgrade_command
std = resolve_standards_path(user_path, BUNDLED_STANDARDS) # tool passes its own bundled copy
rules = apply_config(all_rules(), RuleConfig.load(config_path)) # works on the tool's own Rule type
directives = scan_directives(file_text, tool="coop-sql-review") # tool passes its own marker
plan = build_plan("coop-sql-review", __version__) # tool passes its name + version
apply_config is structural: it works on any rule dataclass with id / severity /
default_enabled / params fields, so each linter keeps its own Rule.
Develop
python -m venv .venv && .venv/bin/pip install -e ".[dev]"
.venv/bin/pytest -q
.venv/bin/ruff check . && .venv/bin/ruff format --check .
Release = bump __version__ in src/coop_review_core/__init__.py (the single source — pyproject
derives it), then tag vX.Y.Z; publish.yml builds, publishes to PyPI via trusted publishing, and
cuts a GitHub Release.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file coop_review_core-0.1.1.tar.gz.
File metadata
- Download URL: coop_review_core-0.1.1.tar.gz
- Upload date:
- Size: 18.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0252b79381b06012b61389e204cc390a942f36b2b4585fd8e0a433d8057ecac0
|
|
| MD5 |
2a31383d67f128a762b60adc2a59585c
|
|
| BLAKE2b-256 |
ec902f4d6e8c8b5e250cc96b13a50953337d0ef045932abfda42854800214531
|
Provenance
The following attestation bundles were made for coop_review_core-0.1.1.tar.gz:
Publisher:
publish.yml on kabukisensei/coop-review-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
coop_review_core-0.1.1.tar.gz -
Subject digest:
0252b79381b06012b61389e204cc390a942f36b2b4585fd8e0a433d8057ecac0 - Sigstore transparency entry: 1956645371
- Sigstore integration time:
-
Permalink:
kabukisensei/coop-review-core@e51ecfefd01015e5964d5b1c2af348ccea19c152 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/kabukisensei
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e51ecfefd01015e5964d5b1c2af348ccea19c152 -
Trigger Event:
push
-
Statement type:
File details
Details for the file coop_review_core-0.1.1-py3-none-any.whl.
File metadata
- Download URL: coop_review_core-0.1.1-py3-none-any.whl
- Upload date:
- Size: 16.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a42e9081cdc5685f61b8721943112ebb155631dc053703c1660711f66155d298
|
|
| MD5 |
fafced51423e322da481d573e1a5cc50
|
|
| BLAKE2b-256 |
8982887ec699b08e2a18a4319ec05b4cec73d612b487566ff94dabc70c3247f6
|
Provenance
The following attestation bundles were made for coop_review_core-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on kabukisensei/coop-review-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
coop_review_core-0.1.1-py3-none-any.whl -
Subject digest:
a42e9081cdc5685f61b8721943112ebb155631dc053703c1660711f66155d298 - Sigstore transparency entry: 1956645472
- Sigstore integration time:
-
Permalink:
kabukisensei/coop-review-core@e51ecfefd01015e5964d5b1c2af348ccea19c152 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/kabukisensei
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e51ecfefd01015e5964d5b1c2af348ccea19c152 -
Trigger Event:
push
-
Statement type: