CLI to create repos
Project description
๐ qCradle
๐ ๏ธ qcradle is a command line tool to create repos based on a group of templates. It has been created to speed up, simplify, and to harmonize the development of experiments and quantitative strategies.
Assuming the presence of uvx you can start the tool with
uvx qcradle
qcradle is a tool inspired by Cookiecutter, but more biased towards quants, researchers, and academics.
Whether you're building entire Python packages or financial models, running simulations, or writing academic papers, qcradle helps you hit the ground running with a structured and efficient setup following the most recent standards set in 2025.
We use uv, hatch, marimo and Tectonic. We support Renovate and take full advantage of GitHub Workflows.
Each template comes with curated pre-commit hooks. We collect test reports, API documentation, and notebooks.
Letโs make project setup as rigorous as your research!
๐ Examples
Users can interact with qcradle by either creating templates or by using existing templates to create projects. We would be delighted to list your public work here:
๐ User projects
We would like to encourage our users to point to public repositories created with the qcradle. We start with
- cvxball. We created badges for you
๐งฉ User templates
Please share your templates with the world!
๐ Install uv and uvx
๐ uv is a modern, high-performance Python package manager and installer written in Rust. It serves as a drop-in replacement for traditional tools like pip and pipx. For macOS and Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh
For Windows follow the official instructions
๐ง Understanding uvx
๐ uvx is a command provided by uv to run tools published as Python packages without installing them permanently. It creates temporary, isolated environments for these tools:
uvx qcradle
This command will:
- Resolve and install the qcradle package in a temporary environment.
- Execute the qcradle command.
Note: If you plan to use a tool frequently, consider installing it permanently using uv:
uv tool install qcradle
Once the tool is permanently installed it is enough to start it with
qcradle
๐ Templates
โจ You could create your own templates and standardize project structures across your team or organization. It's essentially a project scaffolding tool that helps maintain consistency in Python projects.
We currently offer $3$ standard templates out of the box
- ๐ The document template
- ๐งช The experiments template
- ๐ฆ The package template
๐ Standard Templates
We follow the one template, one repository policy. You are encouraged to create your own templates and we give $4$ examples that may serve as inspiration
๐ The document template
The template supports the fast creation of repositories of LaTeX documents. The repo can compile your LaTeX documents with every commit and put them on a dedicated branch.
๐งช The experiments template
Here we support the creation of notebooks without the ambition to release software. The repo is not minimalistic but comes with a curated set of pre-commit hooks and follows modern and established guidelines. The notebooks are based on Marimo.
๐ฆ The package template
The package template is most useful when the final goal is the release of software to a registry, e.g. pypi. It offers full uv support and compiles documentation into a Jupyter Book.
๐ Proprietary templates
๐ ๏ธ Creation
You can create your very own templates and we recommend to start with forking the dedicated repo for the job.
Templates rely on Jinja. At the root level the repo needs a 'copier.yml' file and a 'template' folder.
๐ Usage
We essentially expose the copier interface directly with minor modifications, e.g. if the user is not submitting a source template we offer to choose one of the standard templates.
Any cradle template could be used directly as the first 'template' argument
uvx qcradle --template=git@github.com:tschm/paper.git
By default, Copier (and hence the cradle) will copy from the last release found in template Git tags, sorted as PEP 440.
๐ Update existing projects
Templates are moving targets in most professional setups. It is possible to update projects created with the help of the qcradle by specifying an existing path instead of a template.
uvx qcradle --dst_path=/Users/thomasschmelzer/projects/my_marimo_experiments
The tool expects a full path. Your repo should contain your previous answers in a file '.copier-answers.yml' which serve as default arguments for the questions you have been asked before. All standard templates create the file.
๐ GitHub Actions
โ๏ธ This repository provides a collection of reusable
GitHub Actions that can be used by other repositories.
These actions are defined in the actions directory and
can be referenced in your workflows.
๐ ๏ธ Available Actions
- ๐ book: Builds and publishes a Jupyter Book
- ๐ฆ build: Builds a Python package and uploads artifacts
- ๐ coverage: Generates and uploads code coverage reports
- ๐ deptry: Checks for dependency issues using deptry
- ๐ณ docker: Builds and pushes Docker images
- ๐ง environment: Sets up Python environment with dependencies
- ๐ latex: Compiles LaTeX documents
- ๐ pdoc: Generates API documentation using pdoc
- โ pre-commit: Runs pre-commit hooks
- ๐ท๏ธ tag: Bumps version, creates a tag, and publishes a release
- ๐งช test: Runs tests with pytest
๐ How to Use These Actions
You can use these actions in your GitHub workflows
by referencing them with the uses keyword. For example:
jobs:
tag:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Generate Tag
uses: tschm/cradle/actions/tag@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Each action has its own inputs and outputs defined in
its action.yml file. You can find more details by
examining these files in the repository.
:warning: Private repositories
Using workflows in private repos will eat into your monthly GitHub bill. You may want to restrict the workflow to operate only when merging on the main branch while operating on a different branch or deactivate the flow.
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 qcradle-0.3.5.tar.gz.
File metadata
- Download URL: qcradle-0.3.5.tar.gz
- Upload date:
- Size: 739.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e077054e87fcde3e33044ebab30ce7665d38fc70db751461da2b12f7c385df0
|
|
| MD5 |
e8cc5c51f6e3a8acfbd5b7a973031872
|
|
| BLAKE2b-256 |
6ad6352d53ed81bfecc227e25582eb4663da0d2ff312fd73f8881e3938322b7f
|
Provenance
The following attestation bundles were made for qcradle-0.3.5.tar.gz:
Publisher:
release.yml on tschm/cradle
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qcradle-0.3.5.tar.gz -
Subject digest:
6e077054e87fcde3e33044ebab30ce7665d38fc70db751461da2b12f7c385df0 - Sigstore transparency entry: 307520653
- Sigstore integration time:
-
Permalink:
tschm/cradle@df5ec967a2775277d8fe4440ca6ad112f9c9cfee -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tschm
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@df5ec967a2775277d8fe4440ca6ad112f9c9cfee -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file qcradle-0.3.5-py3-none-any.whl.
File metadata
- Download URL: qcradle-0.3.5-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5fa3fe5102e1f4ce8b74b8b51043d5a830bccda529fa5afdfa45429f54023add
|
|
| MD5 |
c67283e065e27b56412dfe42681324b9
|
|
| BLAKE2b-256 |
a238c1c17597892b430eb7c107472fab722df3834a5594a9dbf3f2047720843b
|
Provenance
The following attestation bundles were made for qcradle-0.3.5-py3-none-any.whl:
Publisher:
release.yml on tschm/cradle
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qcradle-0.3.5-py3-none-any.whl -
Subject digest:
5fa3fe5102e1f4ce8b74b8b51043d5a830bccda529fa5afdfa45429f54023add - Sigstore transparency entry: 307520654
- Sigstore integration time:
-
Permalink:
tschm/cradle@df5ec967a2775277d8fe4440ca6ad112f9c9cfee -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tschm
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@df5ec967a2775277d8fe4440ca6ad112f9c9cfee -
Trigger Event:
workflow_dispatch
-
Statement type: