Skip to content

Turn the template into a cruft template - #15

Merged
Marius1311 merged 3 commits into
mainfrom
feat/cruft
Oct 9, 2026
Merged

Marius1311 merged 3 commits into
mainfrom
feat/cruft

Conversation

@Marius1311

@Marius1311 Marius1311 commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Projects are now created with uvx cruft create https://github.com/quadbio/analysis_template and pull later template changes, such as the vendored REVIEW_GUIDE.md, .gitignore rules and .claude/settings.json, with uvx cruft update.

  • The project moves under {{cookiecutter.project_name}}/, and cookiecutter.json prompts for the repo name, package name, description and author. scripts/rename_package.py and the rename task are gone.
  • [tool.cruft] skip in the project's pyproject.toml marks README.md, analysis/, data/, src/ and tests/ as project-owned, so updates leave them alone.
  • No pixi.lock in the template. It can't be kept in sync with a templated manifest, and its updates would never apply to a project's own lock. Each project locks on its first pixi install.
  • No git init hook. cruft update diffs two fresh renders, and a hook-made .git/ would end up in that diff. The README's create steps run git init before pixi install, which hatch-vcs needs.
  • A local pre-commit hook refuses *.rej files left by a conflicting update. biome skips .cruft.json, which cruft rewrites in its own format.
  • The pre-generation hook refuses a package name that isn't an identifier, and quotes or backslashes in answers that are rendered into TOML.
  • Template CI creates a project with the default answers, then runs its pixi run test and pre-commit.
  • The root README now covers create, update, cruft link for existing repos, and template development. The project README loses its rename and first-commit steps.

Checked locally:

  • The rendered project has no leftover placeholders, and its pre-commit passes.
  • The package builds in a git repo with no commits, and fails outside git.
  • cruft create from a scratch clone, then a template commit and cruft update -y: the template-owned file updated, the skipped src/ didn't, and a project edit survived.

🤖 Generated with Claude Code

Projects are created with `cruft create` and pull later template changes with
`cruft update`. The project moves under {{cookiecutter.project_name}}/, the rename
script gives way to prompted names, and CI creates a project and runs its tests and
pre-commit. The template ships no pixi.lock: each project locks on its first install.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-09T13:50:33.395002Z 2b75da1 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 88ea222999

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/test.yaml
Comment thread {{cookiecutter.project_name}}/pixi.toml
Comment thread {{cookiecutter.project_name}}/.gitignore Outdated
- Name the distribution with hyphens, as pyproject-fmt normalises it.
- Keep biome off .cruft.json, which cruft rewrites in its own format.
- Re-include figures/.gitkeep, which the figures/ rule hid from a fresh repo.
- Refuse prompt answers with quotes or backslashes; they break the TOML.
- Skip README.md on update: each project writes its own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2b75da1bb4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread hooks/pre_gen_project.py Outdated
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Marius1311
Marius1311 merged commit f14019a into main Oct 9, 2026
1 check passed
@Marius1311
Marius1311 deleted the feat/cruft branch October 9, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant