Repository navigation
Feature/update from template #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
b16256b
add shellcheck
blooop 011eb99
bump pixi version
blooop 468fc11
update pixi.lock
blooop e8ae755
Merge pull request #91 from blooop/feature/shellcheck
blooop 5032386
build(deps): bump prefix-dev/setup-pixi from 0.8.14 to 0.9.1
dependabot[bot] aec6e44
build(deps): bump the dev-dependencies group with 7 updates
dependabot[bot] 58a68d3
Merge pull request #92 from blooop/dependabot/github_actions/prefix-d…
blooop a68d1e2
Merge pull request #94 from blooop/dependabot/pip/dev-dependencies-e0…
blooop ff66008
build(deps): bump actions/checkout from 4 to 5
dependabot[bot] ab3a927
only install extensions if inside a docker container
blooop b24be8b
Merge pull request #93 from blooop/dependabot/github_actions/actions/…
blooop cdc843b
Merge pull request #95 from blooop/feature/detect_docker
blooop 626c4c2
remove deps.yaml and upate rockerc
blooop f67a4c9
Merge pull request #96 from blooop/feature/update_rockerc
blooop 2435d18
build(deps): bump prefix-dev/setup-pixi from 0.9.1 to 0.9.2
dependabot[bot] f32d60d
Clean up README: remove black reference and update legacy section
claude 0701fa3
Remove all black references and fix outdated configurations
claude f28bb03
Additional cleanup and consistency improvements
claude ca9bd8f
Merge pull request #99 from blooop/claude/update-readme-cleanup-011CV…
blooop 01e1b3f
Merge pull request #97 from blooop/dependabot/github_actions/prefix-d…
blooop 562f046
build(deps): bump prefix-dev/setup-pixi from 0.9.2 to 0.9.3
dependabot[bot] 5990b43
build(deps-dev): bump the dev-dependencies group across 1 directory w…
dependabot[bot] 9bdd182
Merge pull request #100 from blooop/dependabot/github_actions/prefix-…
blooop 70e6c3f
Merge pull request #101 from blooop/dependabot/pip/dev-dependencies-1…
blooop 09d0db8
update pixi to workspace
blooop e650182
update pixi.lock
blooop c4fc62c
Merge pull request #102 from blooop/feature/fix-workspace
blooop 46b2e99
Add Claude Code online environment support
claude 94fab02
Merge pull request #103 from blooop/claude/setup-claude-template-018p…
blooop d260b40
build(deps): bump actions/checkout from 5 to 6
dependabot[bot] 5747b2b
Merge pull request #104 from blooop/dependabot/github_actions/actions…
blooop 4a40b2a
build(deps-dev): bump the dev-dependencies group with 6 updates
dependabot[bot] bb26f4c
Merge pull request #105 from blooop/dependabot/pip/dev-dependencies-9…
blooop 48cece3
build(deps-dev): bump the dev-dependencies group with 2 updates
dependabot[bot] 086e4e8
Merge pull request #106 from blooop/dependabot/pip/dev-dependencies-6…
blooop 70e076b
feat: pull changes from remote template
blooop d53187f
update pixi.lock
blooop File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| # Claude Code Configuration | ||
|
|
||
| This directory contains configuration for using this project with Claude Code, particularly in the online environment. | ||
|
|
||
| ## SessionStart Hook | ||
|
|
||
| The `hooks/SessionStart` script automatically runs when a new Claude Code session begins. It: | ||
|
|
||
| 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 | ||
| 4. **Configures git** - Sets up merge drivers for lockfiles | ||
|
|
||
| ## Usage with Claude Code Online | ||
|
|
||
| When you start a Claude Code online session, the SessionStart hook will automatically run and set up your environment. You'll see output indicating the setup progress. | ||
|
|
||
| ### Available Commands | ||
|
|
||
| Once setup is complete, Claude can use these pixi tasks: | ||
|
|
||
| #### Testing & Quality | ||
| - `pixi run test` - Run pytest tests | ||
| - `pixi run coverage` - Run tests with coverage report | ||
| - `pixi run lint` - Run ruff and pylint linters | ||
| - `pixi run format` - Format code with ruff | ||
|
|
||
| #### CI 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 | ||
|
|
||
| ### How It Works | ||
|
|
||
| 1. **First session**: The hook installs pixi and all dependencies (may take a few minutes) | ||
| 2. **Subsequent sessions**: The hook verifies the environment is ready (much faster) | ||
| 3. **Environment activated**: All pixi commands are available to Claude | ||
|
|
||
| ### Troubleshooting | ||
|
|
||
| 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` | ||
| 4. **Full reset**: Delete `.pixi` directory and restart session | ||
|
|
||
| ### Customization | ||
|
|
||
| You can modify `hooks/SessionStart` to: | ||
| - Install additional tools | ||
| - Run custom setup scripts | ||
| - Configure environment variables | ||
| - Set up external services | ||
|
|
||
| ## Learn More | ||
|
|
||
| - [Claude Code Documentation](https://docs.claude.com/claude-code) | ||
| - [Pixi Documentation](https://pixi.sh) | ||
| - [Project README](../README.md) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| #!/bin/bash | ||
| # Source this file to activate the pixi environment in your current shell | ||
| # Usage: source .claude/activate.sh | ||
|
|
||
| # Add pixi to PATH | ||
| export PATH="$HOME/.pixi/bin:$PATH" | ||
|
|
||
| # Optional: Activate pixi shell if available | ||
| if command -v pixi &> /dev/null; then | ||
| echo "✅ Pixi environment activated" | ||
| echo "💡 Available commands:" | ||
| echo " pixi run test - Run tests" | ||
| echo " pixi run lint - Run linters" | ||
| echo " pixi run format - Format code" | ||
| echo " pixi run ci - Run full CI" | ||
| pixi task list --summary 2>/dev/null || true | ||
| else | ||
| echo "⚠️ Pixi not found. Please run .claude/hooks/SessionStart first." | ||
| fi | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| #!/bin/bash | ||
| # SessionStart hook for Claude Code online environment | ||
| # This script sets up the Python development environment using pixi | ||
|
|
||
| set -e | ||
|
|
||
| echo "🚀 Setting up Python Template environment..." | ||
|
|
||
| # Check if pixi is installed | ||
| if ! command -v pixi &> /dev/null; then | ||
| echo "📦 Installing pixi..." | ||
| curl -fsSL https://pixi.sh/install.sh | bash | ||
|
|
||
| # Add pixi to PATH for current session | ||
| export PATH="$HOME/.pixi/bin:$PATH" | ||
|
|
||
| # Source bashrc to get pixi in PATH (if bashrc was updated) | ||
| [ -f "$HOME/.bashrc" ] && source "$HOME/.bashrc" | ||
|
|
||
| echo "✅ Pixi installed successfully" | ||
| else | ||
| echo "✅ Pixi already installed" | ||
| fi | ||
|
|
||
| # Ensure pixi is in PATH for this session | ||
| export PATH="$HOME/.pixi/bin:$PATH" | ||
|
|
||
| # Install project dependencies | ||
| 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)" | ||
|
|
||
| # Set up git merge driver for lockfiles | ||
| echo "🔧 Configuring git merge driver..." | ||
| pixi run setup-git-merge-driver || true | ||
|
|
||
| echo "✅ Environment setup complete!" | ||
| echo "" | ||
| echo "Available pixi tasks:" | ||
| pixi task list | ||
| echo "" | ||
| echo "💡 Common commands:" | ||
| echo " pixi run test - Run tests" | ||
| echo " pixi run lint - Run linters" | ||
| echo " pixi run format - Format code" | ||
| echo " pixi run ci - Run full CI pipeline" | ||
| echo "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,4 +2,4 @@ | |
|
|
||
| ## dbw | ||
|
|
||
| ## [0.0.0] | ||
| ## [0.2.0] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Avoid repeatedly prepending
$HOME/.pixi/binto PATH when the script is sourced multiple times.Because this script is intended to be sourced, it may be run multiple times in the same shell, causing
$HOME/.pixi/binto be prepended repeatedly. Consider guarding it with a check such as:or an equivalent approach so the entry is only added once.