Add your description here
Project description
Smallsteps - improve your codebase in small steps
Smallsteps allows you to declare ratchets – metrics that must increase over time – and to enforce them via testing or CI pipelines.
A typical situation: you want to add test coverage as a health check. Initially your coverage is at 42% so you create a CI gate that fails if it falls under 40%. Now you have your baseline secured – so far so good. You make a resolution to yourself: you will increase your coverage and bump up the minimum percentage frequently. Somehow that never happens and your coverage stays at 42%.
With smallsteps you declare your goal of 80% coverage and that you want to reach it in 100 days. Smallsteps computes the necessary percentage that must be met for each day (e.g. after 50 days you need 60% coverage) and fails if the goal is not met.
Example
We are using this repository itself as an example. We want to enforce our test coverage to go up. So we create a ratchet:
uvx smallsteps add \
--name="Pytest Coverage" \
--command="uv run pytest --cov --cov-report=json > /dev/null && jq -r '.totals.percent_covered' coverage.json" \
--goal=80 \
--end="2026-10-01"
This created a new file – smallsteps.toml – which holds the configuration of our ratchet:
# Smallsteps Configuration
[[ratchets]]
name = "Pytest Coverage"
start = 2026-06-25
end = 2026-10-01
initial_value = 57.142857142857146
goal_value = 80
command = "uv run pytest --cov --cov-report=json > /dev/null 2>&1 && jq -r '.totals.percent_covered' coverage.json"
Note
- You don't need to memorize the command parameters,
smallsteps addwalks you through them interactively. - Ratchets can be increasing or decreasing. Percentages (56% with explicit "%") are parsed as floats (.56). So make sure that your goal format matches the command output: if the output is plain 56, the goal should also be 56. If its 56%, the goal must be 56% or .56.
- It's allways a good idea to mute your original commands output (using
> /dev/null 2>&1) and write the value into a file to make the result parsing easier.
You can inspect, add or modify the ratchets using the toml file. There will find also another example using basedpyright.
Checking your Ratchets
Run uvx smallsteps check to check the status of your ratchets. To simulate the future you can run with --date, e.g.:
uv smallsteps check --date 2026-10-31
Evaluating 1 ratchet(s)...
Pytest Coverage: BEHIND (Current: 57.14, Expected Min: 80.00)
Progress check failed.
shows that on the goal date the check will fail if we do not achieve 80% test coverage.
CI and reading values from env
By default, running smallsteps check executes the underlying shell commands to gather active metrics. In modern CI/CD, you may prefer to compute metrics once during separate pipeline steps rather than using Smallsteps as a heavy task orchestrator.
By default smallsteps looks for environment variables matching the ratchets before running the command. E.g. if SMALLSTEPS_PYTEST_COVERAGE is present, the coverage is not re-computed. You can use this in CI to pass outputs from test workflow into the smallsteps action. To get a scaffolding github action with the required input vars for your ratchets run uvx smallsteps ci.
Have a look at the action and the whole workflow (not provided by a command because too specific for your setup) to see how the plumbing can work.
Installation
This documentation assumes you are using uv, hence you don't need to do anything despite using the uv tool command (uvx) to install and run smallsteps.
License
MIT
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 smallsteps-0.1.4.tar.gz.
File metadata
- Download URL: smallsteps-0.1.4.tar.gz
- Upload date:
- Size: 37.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 |
9618814921a369fddd86f77609239ee6893986a4abcdbb41271e119c71796aa9
|
|
| MD5 |
2792730f2cae9ade525d30d42dd86199
|
|
| BLAKE2b-256 |
31b74377bd91a12d946074883f04794c4c80030e30df56b9e361f5260a185a10
|
Provenance
The following attestation bundles were made for smallsteps-0.1.4.tar.gz:
Publisher:
ci.yaml on aehm03/smallsteps
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
smallsteps-0.1.4.tar.gz -
Subject digest:
9618814921a369fddd86f77609239ee6893986a4abcdbb41271e119c71796aa9 - Sigstore transparency entry: 1954025366
- Sigstore integration time:
-
Permalink:
aehm03/smallsteps@30ebcf817a2da1ddd7aa456896f1b20c7a6da057 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/aehm03
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yaml@30ebcf817a2da1ddd7aa456896f1b20c7a6da057 -
Trigger Event:
push
-
Statement type:
File details
Details for the file smallsteps-0.1.4-py3-none-any.whl.
File metadata
- Download URL: smallsteps-0.1.4-py3-none-any.whl
- Upload date:
- Size: 11.6 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 |
d2a7ba8fdb81dafec9d82538a7187d62998433d638150fe96d124c8e5fab8348
|
|
| MD5 |
9da45045faaf3d0a65711bad51a70ec4
|
|
| BLAKE2b-256 |
3aff7b044cdb75da81611f59f980958b576a06cb8284b1b7e0efbeaa25e00f2c
|
Provenance
The following attestation bundles were made for smallsteps-0.1.4-py3-none-any.whl:
Publisher:
ci.yaml on aehm03/smallsteps
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
smallsteps-0.1.4-py3-none-any.whl -
Subject digest:
d2a7ba8fdb81dafec9d82538a7187d62998433d638150fe96d124c8e5fab8348 - Sigstore transparency entry: 1954025608
- Sigstore integration time:
-
Permalink:
aehm03/smallsteps@30ebcf817a2da1ddd7aa456896f1b20c7a6da057 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/aehm03
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yaml@30ebcf817a2da1ddd7aa456896f1b20c7a6da057 -
Trigger Event:
push
-
Statement type: