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
2 changes: 1 addition & 1 deletion .claude/commands/link-review.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ Provide a clear summary with:

If all links look good, provide a brief confirmation.

**IMPORTANT: Post your review as a comment on the pull request using the command: `gh pr comment ${{ github.event.pull_request.number }} --body "your review content"`**
**IMPORTANT: Post your review as a comment on the pull request using the command: `gh pr comment $PR_NUMBER --body "your review content"`**
2 changes: 1 addition & 1 deletion .claude/commands/model-check.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ Then check:

Provide clear, actionable feedback on any issues found.

**IMPORTANT: Post your findings as a comment on the pull request using the command: `gh pr comment ${{ github.event.pull_request.number }} --body "your findings"`**
**IMPORTANT: Post your findings as a comment on the pull request using the command: `gh pr comment $PR_NUMBER --body "your findings"`**
2 changes: 1 addition & 1 deletion .claude/commands/notebook-review.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ Provide a clear summary with:
- ⚠️ Suggestions for improvement
- ❌ Critical issues that must be fixed

**IMPORTANT: Post your review as a comment on the pull request using the command: `gh pr comment ${{ github.event.pull_request.number }} --body "your review"`**
**IMPORTANT: Post your review as a comment on the pull request using the command: `gh pr comment $PR_NUMBER --body "your review"`**
6 changes: 5 additions & 1 deletion .github/workflows/claude-link-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,8 @@ jobs:
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
prompt: "/link-review"
prompt: "/link-review"
claude_args: |
--allowedTools "Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(echo:*),Read,Glob,Grep,WebFetch"
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
6 changes: 5 additions & 1 deletion .github/workflows/claude-model-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,8 @@ jobs:
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
prompt: "/model-check"
prompt: "/model-check"
claude_args: |
--allowedTools "Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(echo:*),Read,Glob,Grep,WebFetch"
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
6 changes: 5 additions & 1 deletion .github/workflows/claude-notebook-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,8 @@ jobs:
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
prompt: "/notebook-review"
prompt: "/notebook-review"
claude_args: |
--allowedTools "Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(echo:*),Read,Glob,Grep,WebFetch"
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
41 changes: 39 additions & 2 deletions .github/workflows/notebook-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,46 @@ jobs:
uv run ruff format **/*.ipynb --check || true

- name: Validate notebook structure
id: validate
run: |
uv run python scripts/validate_notebooks.py

uv run python scripts/validate_notebooks.py | tee validation_output.txt
# Check if validation found issues
if grep -q "❌" validation_output.txt; then
echo "has_issues=true" >> $GITHUB_OUTPUT
exit 1
else
echo "has_issues=false" >> $GITHUB_OUTPUT
fi
continue-on-error: true

- name: Summarize validation issues with Claude
if: github.event_name == 'pull_request' && steps.validate.outputs.has_issues == 'true'
uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
prompt: |
The notebook validation found these issues:

```
$(cat validation_output.txt)
```

Create a helpful PR comment that:
- Summarizes the validation issues found
- Groups similar issues together (e.g., "7 notebooks have empty cells")
- Explains why empty cells are problematic and how to fix them (delete them or add content)
- If there are error outputs, explain they should be cleared before committing
- Uses friendly, constructive language
- Includes specific notebook names and cell numbers for reference

Format as a nice GitHub comment with markdown. Use emoji sparingly for clarity.
Post using: gh pr comment $PR_NUMBER --body "your comment"
claude_args: |
--allowedTools "Bash(gh pr comment:*),Bash(cat:*),Read"
env:
PR_NUMBER: ${{ github.event.pull_request.number }}

# Only run API tests on main branch or for maintainers (costs money)
- name: Execute notebooks (API Testing)
if: |
Expand Down
9 changes: 9 additions & 0 deletions claude_code_sdk/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# GitHub Personal Access Token
# Required for the GitHub MCP server in 02_The_observability_agent.ipynb
# Create a token at: https://github.com/settings/tokens
GITHUB_TOKEN="your-github-personal-access-token-here"

# Anthropic API Key
# Required for using Claude SDK
# Get your key at: https://console.anthropic.com/settings/keys
ANTHROPIC_API_KEY="sk-ant-api03-your-api-key-here"
26 changes: 26 additions & 0 deletions claude_code_sdk/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Python-generated files
__pycache__/
*.py[oc]
build/
dist/
wheels/
*.egg-info

# Virtual environments
.venv
.env
.python-version

# Claude Code settings
.claude-code/
/CLAUDE.md

# Package manager lock files (optional for tutorials)
uv.lock

# Jupyter notebook checkpoints
.ipynb_checkpoints/
*.ipynb_checkpoints/

# macOS
.DS_Store
Loading
Loading