Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .claude/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The `hooks/SessionStart` script automatically runs when a new Claude Code sessio

1. **Installs pixi** (if not already installed) - The package and environment manager
2. **Installs project dependencies** - All Python packages and tools defined in `pyproject.toml`
3. **Sets up pre-commit hooks** - For automatic code quality checks
3. **Sets up prek hooks** - For automatic code quality checks
4. **Configures git** - Sets up merge drivers for lockfiles

## Usage with Claude Code Online
Expand All @@ -29,9 +29,9 @@ Once setup is complete, Claude can use these pixi tasks:
- `pixi run ci` - Run full CI pipeline (format, lint, test, coverage)
- `pixi run fix` - Auto-fix common issues (update lock, format, lint)

#### Pre-commit
- `pixi run pre-commit` - Run all pre-commit hooks
- `pixi run pre-commit-update` - Update pre-commit hook versions
#### Prek Hooks
- `pixi run prek` - Run all prek hooks
- `pixi run prek-update` - Update prek hook versions

### How It Works

Expand All @@ -45,7 +45,7 @@ If you encounter issues:

1. **Dependencies not found**: Run `pixi install` manually
2. **Lockfile conflicts**: Run `pixi run update-lock`
3. **Pre-commit issues**: Run `pixi run pre-commit-update`
3. **Prek issues**: Run `pixi run prek-update`
4. **Full reset**: Delete `.pixi` directory and restart session

### Customization
Expand Down
6 changes: 3 additions & 3 deletions .claude/hooks/SessionStart
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ export PATH="$HOME/.pixi/bin:$PATH"
echo "📦 Installing project dependencies..."
pixi install

# Run pre-commit installation
echo "🔧 Setting up pre-commit hooks..."
pixi run pre-commit install || echo "⚠️ Pre-commit installation skipped (optional)"
# Run prek installation
echo "🔧 Setting up prek hooks..."
pixi run prek install || echo "⚠️ Prek installation skipped (optional)"

# Set up git merge driver for lockfiles
echo "🔧 Configuring git merge driver..."
Expand Down
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ updates:
#try to group all development dependencies updates into a single pr
patterns:
- "check-manifest"
- "pre-commit"
- "prek"
- "pylint"
- "pytest"
- "pytest-cov"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: pre-commit
name: prek

on: [pull_request]

jobs:
pre-commit:
prek:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: pre-commit/action@v3.0.1
- uses: j178/prek-action@v1
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ This template includes built-in support for [Claude Code](https://docs.claude.co

- Installs pixi package manager
- Sets up all project dependencies
- Configures pre-commit hooks
- Configures prek hooks
- Prepares the development environment

**Quick Start with Claude Code:**
Expand Down
183 changes: 30 additions & 153 deletions pixi.lock

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ test = [
"hypothesis>=6.104.2,<=6.150.2",
"ruff>=0.5.0,<=0.14.11",
"coverage>=7.5.4,<=7.13.1",
"pre-commit<=4.5.1",
"prek>=0.2.28,<0.3.0",
"ty>=0.0.8,<=0.0.8",
]

Expand All @@ -66,8 +66,8 @@ dev = { cmd = "devpod up . --ide none && ssh pythontemplate.devpod", depends-on
dev-vs = { cmd = "devpod up . --ide vscode", depends-on = ["dev-add-docker"] }
dev-restart = { cmd = "devpod up . --recreate --ide none && ssh pythontemplate.devpod", depends-on = ["dev-add-docker"] }
dev-restart-vs = { cmd = "devpod up . --recreate --ide vscode", depends-on = ["dev-add-docker"] }
pre-commit = "pre-commit run -a"
pre-commit-update = "pre-commit autoupdate"
prek = "prek run -a"
prek-update = "prek autoupdate"
format = "ruff format ."
check-clean-workspace = "git diff --exit-code"
ruff-lint = "ruff check . --fix"
Expand All @@ -82,7 +82,7 @@ coverage-report = "coverage report -m"
update-lock = "pixi update && git commit -a -m'update pixi.lock' || true"
push = "git push"
update-lock-push = { depends-on = ["update-lock", "push"] }
fix = { depends-on = ["update-lock", "format", "ruff-lint", "pre-commit"] }
fix = { depends-on = ["update-lock", "format", "ruff-lint", "prek"] }
fix-commit-push = { depends-on = ["fix", "commit-format", "update-lock-push"] }
ci-no-cover = { depends-on = ["style", "test"] }
ci = { depends-on = [
Expand Down