ONE Data Python project utilities - templates, tools, and workflows
Project description
bblocks-projects
A CLI for creating, updating, and auditing Python projects against a shared Copier template.
bblocks-projects is the ONE Campaign's tool for keeping its Python projects consistent. It scaffolds new repos, pulls template improvements into existing ones, and adds individual pieces (pre-commit, CI, ruff config) to projects that didn't start from the template.
Why this exists
Every Python project starts with the same decisions and boilerplate: which linter, which type checker, how to wire CI, where tests live, how publishing works. bblocks-projects keeps the choices in one place (the template repo) and gives you four commands to apply them: create, update, add, and doctor.
Install
Requires Python 3.11+, git, and uv on PATH.
# One-off, no install (recommended)
uvx bblocks-projects create my-project
# Install with uv
uv tool install bblocks-projects
# Or pipx / pip
pipx install bblocks-projects
pip install bblocks-projects
If you're signed into the GitHub CLI (gh auth login), create prefills your name, email, and username from your GitHub profile.
Usage
Create a new project. Interactive by default — answer a handful of questions about name, license, and project type:
bblocks-projects create my-analysis # new subdirectory
bblocks-projects create --here # current directory
You'll be asked to pick package (publishable to PyPI; src layout, pytest, py.typed) or project (analysis, pipeline, internal tool — adds data/raw/, data/processed/, optional notebooks, and ruff/ty configs that tolerate pandas/numpy stub gaps). To skip the prompts:
bblocks-projects create my-package --type package --defaults
Update an existing project when the template changes upstream:
cd my-analysis
uvx bblocks-projects update
git diff # review what changed
uv sync
Previously-answered questions are reused silently. Pass --no-skip-answered to re-prompt for any of them, or --ref v1.2.0 to update to a specific template version instead of main.
Add a single component to any Python project — including ones that didn't start from the template:
uvx bblocks-projects add --list # see what's available
uvx bblocks-projects add pre-commit # one component
uvx bblocks-projects add ruff ci pytest # several at once
Available components: pre-commit, ruff, ci, pytest, and pypi-publish (packages only). add merges into your existing pyproject.toml rather than overwriting it, and shows the diff before applying.
Run the doctor to check a project against the current standards:
uvx bblocks-projects doctor # diagnose the current directory
uvx bblocks-projects doctor --strict # exit non-zero on findings (CI-friendly)
uvx bblocks-projects doctor --check-updates # is the template newer upstream?
When not to use this
- You're not at ONE Data. The template encodes our specific choices (uv, ruff, ty, GitHub Actions, src-layout). If your team has different ones, fork the template repo — don't fight ours.
- You don't want a Copier-managed project.
createandupdaterely on.copier-answers.ymlto track which template version generated the project. If you'd rather not have that file, useaddto take a one-shot copy of the components you want and walk away. - Your project predates Copier and you want full template adoption.
updaterequires.copier-answers.yml. Either start fromaddfor the pieces you need, or follow the adoption guide.
What you get
Every generated project includes uv, ruff, ty, pre-commit, and a GitHub Actions CI workflow. Packages also get pytest with coverage, a py.typed marker, and a PyPI trusted-publishing workflow. Projects also get a data/ tree (raw/ gitignored, processed/ tracked) and an optional notebooks/ directory.
Next
- Getting Started — a 15-minute walkthrough from zero to a generated project you've made a real change to.
Project details
Release history Release notifications | RSS feed
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 bblocks_projects-1.0.2.tar.gz.
File metadata
- Download URL: bblocks_projects-1.0.2.tar.gz
- Upload date:
- Size: 18.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a1ec87669297ba7c0db72acd150b968062d515b7882132e978345241ed82965
|
|
| MD5 |
854fe85c57f6abccebc5e483d245bdf5
|
|
| BLAKE2b-256 |
488a62d6fa3243427df2bfdfbbcba0a281124d2d6662c5da246e46e450c3b17f
|
Provenance
The following attestation bundles were made for bblocks_projects-1.0.2.tar.gz:
Publisher:
publish.yml on ONEcampaign/bblocks-projects
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bblocks_projects-1.0.2.tar.gz -
Subject digest:
9a1ec87669297ba7c0db72acd150b968062d515b7882132e978345241ed82965 - Sigstore transparency entry: 1434832763
- Sigstore integration time:
-
Permalink:
ONEcampaign/bblocks-projects@22c0aa6abc4acb083663b817bb58202193e9c3ef -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/ONEcampaign
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@22c0aa6abc4acb083663b817bb58202193e9c3ef -
Trigger Event:
push
-
Statement type:
File details
Details for the file bblocks_projects-1.0.2-py3-none-any.whl.
File metadata
- Download URL: bblocks_projects-1.0.2-py3-none-any.whl
- Upload date:
- Size: 22.5 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 |
bbf17c6e6121d56c33a919810a60125cb468ac602356d2f79f78fd0fe5e6e41f
|
|
| MD5 |
efdd1782650d92535a30df96e7fd701d
|
|
| BLAKE2b-256 |
e5eaa7dc5536e2fe1efdb3d749cf51db6f7aac7eb5eb0e571025fc13a5f54bbd
|
Provenance
The following attestation bundles were made for bblocks_projects-1.0.2-py3-none-any.whl:
Publisher:
publish.yml on ONEcampaign/bblocks-projects
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bblocks_projects-1.0.2-py3-none-any.whl -
Subject digest:
bbf17c6e6121d56c33a919810a60125cb468ac602356d2f79f78fd0fe5e6e41f - Sigstore transparency entry: 1434832873
- Sigstore integration time:
-
Permalink:
ONEcampaign/bblocks-projects@22c0aa6abc4acb083663b817bb58202193e9c3ef -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/ONEcampaign
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@22c0aa6abc4acb083663b817bb58202193e9c3ef -
Trigger Event:
push
-
Statement type: