Skip to main content

A maintainability ratchet for AI-assisted Python.

Project description

riskratchet

A maintainability ratchet for AI-assisted Python.

riskratchet computes a function-level risk score from coverage gaps, cyclomatic complexity, churn, public surface, and sprawl signals, then fails when a change pushes risk upward without adding tests. Use it as a CLI, in pre-commit, or in CI so AI-assisted commits can land working code without ratcheting up untested complexity.

Quickstart

uvx riskratchet scan src --coverage coverage.json
uvx riskratchet baseline src --coverage coverage.json --output .riskratchet.json
uvx riskratchet check src --coverage coverage.json --baseline .riskratchet.json

Local development

uv sync
uv run pytest
uv run riskratchet scan src --coverage coverage.json

This package is in early development. See PLAN.md for the v1 roadmap.

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

riskratchet-0.1.0.tar.gz (79.2 kB view details)

Uploaded Source

Built Distribution

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

riskratchet-0.1.0-py3-none-any.whl (22.4 kB view details)

Uploaded Python 3

File details

Details for the file riskratchet-0.1.0.tar.gz.

File metadata

  • Download URL: riskratchet-0.1.0.tar.gz
  • Upload date:
  • Size: 79.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for riskratchet-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8807e6086242fefeefb4816d18edb126e096ef5bbc61e3361781de0e9c20a5c1
MD5 686eb0be5c715a1e06473203cb9cc5fc
BLAKE2b-256 b748115df3add64692eca0e5dc71e712214c5a8260d7f24c8462e13590e725d1

See more details on using hashes here.

File details

Details for the file riskratchet-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: riskratchet-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 22.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for riskratchet-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6d12edbfd4e4fa372f4d600cf6f4d49a0106d68600bdd342d36ff5a580aa8e67
MD5 8f77eb3c8adf5ab86281ca869f918088
BLAKE2b-256 86e363f55fdeeab87e87bbadf585089dea3241598f92b5504fb5e11504c8ea19

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page