Files
claude-cookbooks/.github/workflows/claude-model-check.yml
Alex Notov 4c1f9af8c6 refactor: simplify notebook CI/CD by removing nbqa and papermill
Remove nbqa in favor of ruff's native Jupyter support (v0.6.0+).
Replace papermill with nbconvert due to uv dependency resolution issues.
Also remove S105/S106 ignores to enforce better security practices.

- Update pyproject.toml to use ruff v0.12.12 with native notebook support
- Replace papermill with nbconvert for notebook execution
- Remove nbqa from all dependencies and pre-commit hooks
- Update GitHub Actions workflows to use ruff directly
- Remove hardcoded password ignores for better security
- Update documentation to reflect simplified setup
- Add dummy package structure for hatchling build system

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-07 15:37:36 -06:00

60 lines
1.7 KiB
YAML

name: Claude Model Check
on:
pull_request:
types: [opened, synchronize]
paths:
- 'skills/**/*.ipynb'
- '**.py'
- '**.md'
permissions:
contents: read
pull-requests: write
jobs:
model-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Setup Python
run: uv python install 3.11
- name: Install dependencies
run: uv sync
- name: Check models with script
id: model_check
run: |
uv run python scripts/check_models.py --github-output
# Only run Claude validation for repo members (API costs)
- name: Claude Model Validation
if: |
github.event.pull_request.author_association == 'MEMBER' ||
github.event.pull_request.author_association == 'OWNER'
uses: anthropics/claude-code-action@beta
with:
use_sticky_comment: true
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
timeout_minutes: "5"
direct_prompt: |
Review the changed files for Claude model usage.
Check the latest models at: https://docs.anthropic.com/en/docs/about-claude/models/overview.md
Please check for:
1. Any internal/non-public model names
2. Usage of deprecated models (older Sonnet 3.5 and Opus 3 models)
3. Recommend using aliases for better maintainability
4. For testing examples, suggest claude-3-5-haiku-latest (fastest/cheapest)
Format as actionable feedback.