Commit Graph

263 Commits

Author SHA1 Message Date
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
Alex Notov
e5a91f0e26 fix(deps): adjust dependency versions for Python 3.11 compatibility
- Use nbqa>=1.8.0 for Python 3.11 support
- Use ruff>=0.7.0 for compatibility
2025-09-05 19:03:45 -06:00
Alex Notov
1968c6c807 chore(config): add .env.example for local development
- Provide template for API key configuration
- Include recommended test settings
- Document optional environment variables
2025-09-05 19:01:50 -06:00
Alex Notov
1242e44298 docs(contributing): add comprehensive contribution guide
- Document development setup with uv
- Explain notebook quality standards
- Add git workflow and conventional commits guide
- Include testing instructions
- Document pre-commit hooks usage
2025-09-05 19:01:25 -06:00
Alex Notov
e0d22d077e ci(links): add link checking with lychee
- Configure lychee for notebook link validation
- Set up GitHub workflow for PR and scheduled checks
- Exclude API endpoints and localhost from checks
- Add PR comment integration for broken links
2025-09-05 19:00:20 -06:00
Alex Notov
3b522f033b chore(git): configure pre-commit hooks
- Add nbstripout to clean notebook outputs
- Configure nbqa with ruff for notebook linting
- Add ruff for Python file formatting
- Add custom hooks for model and notebook validation
2025-09-05 18:59:37 -06:00
Alex Notov
60d3273707 ci(github): add notebook validation workflows
- Add notebook-quality.yml with papermill execution testing
- Add claude-model-check.yml for model validation
- Add security-scan.yml for secret detection
- Implement tiered testing (full for maintainers, mock for external)
2025-09-05 18:58:22 -06:00
Alex Notov
5024724f83 feat(scripts): add model validation with dynamic fetching from docs
- Add allowed_models.py that fetches latest models from Anthropic docs
- Implement 24-hour cache to avoid excessive requests
- Fall back to hardcoded list if fetch fails
- Add check_models.py to validate model usage in notebooks
- Add validate_notebooks.py for security and structure checks
- Update .gitignore for cache files
2025-09-05 18:57:13 -06:00
Alex Notov
723c23dbfc ci(deps): add uv package manager with pyproject.toml
- Configure project dependencies and dev tools
- Set up ruff linting configuration
- Configure nbstripout for clean notebooks
2025-09-05 18:54:32 -06:00
Jason Kim
3e74f6cd96 Merge pull request #189 from anthropics/jkim/fix-timestamp-bucket-alignment
Align timestamps to bucket boundaries in Usage & Cost API cookbook
2025-08-18 13:59:10 -04:00
Jason Kim MacBook
a029bcc389 Align timestamps to bucket boundaries in Usage & Cost API cookbook
Update timestamp generation to snap to bucket boundaries to ensure
consistent data retrieval, as partial dates may not return data.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-18 13:56:13 -04:00
Eric Harmeling
e8641d103e Merge pull request #188 from anthropics/jkim/add-usage-cost-api-cookbook
Add Usage & Cost Admin API cookbook
2025-08-18 13:04:48 -04:00
Jason Kim MacBook
874b3ca2bb Add Usage & Cost Admin API cookbook
Comprehensive guide to programmatically accessing Claude API usage and cost data for custom dashboards, cost monitoring, and usage analysis.

Features:
- Basic usage and cost tracking
- Time granularity and filtering options
- Grouping and breakdowns
- Priority Tier analysis
- Pagination for large datasets
- Error handling best practices
- Practical alerting examples
2025-08-18 12:06:07 -04:00
Jeremy Hadfield
46f21f9598 Merge pull request #159 from anthropics/jh/open_source_prompts
Add open-source prompts
2025-06-13 12:28:20 -07:00
jerhadf
b6034e05ee Add prompts 2025-06-13 12:14:53 -07:00
Ethan Dixon
66ee346c51 Merge pull request #154 from anthropics/alexander/memory-cookbook-suggestions
Memory cookbook suggestions
2025-05-29 23:07:52 -07:00
Ethan Dixon
b98b8e73e0 updated run, pending agents update 2025-05-28 21:57:00 -07:00
Eric Harmeling
fb261fd69f Merge pull request #152 from anthropics/speculative-prompt-caching
Speculative prompt caching
2025-05-28 10:09:19 -04:00
Alexander Bricken
022bcc2d06 update wording 2025-05-27 14:50:33 -04:00
Alexander Bricken
d6a05bf2d7 remove downloads folder pdf 2025-05-26 22:49:43 -04:00
Alexander Bricken
68101cbaf3 add more about context limits 2025-05-26 22:42:50 -04:00
Alexander Bricken
740073e41c suggested changes to memory introduction and agents tmp handling 2025-05-23 17:23:18 -07:00
etd-23
25cc8b82a2 Merge pull request #153 from anthropics/tools/memory-cookbook
Memory Cookbook
2025-05-22 09:34:34 -07:00
Ethan Dixon
176aa000a2 push cookbook 2025-05-22 09:18:41 -07:00
Eric Harmeling
25232bb014 Speculative prompt caching
This commit introduces a new cookbook demonstrating how to use the
speculative prompt caching pattern to reduce time-to-first-token (TTFT).
2025-05-15 17:10:48 -04:00
Elie Schoppik
eaacd9cddf Merge pull request #151 from anthropics/elie/quick-fix
format for wolfram alpha
2025-05-13 21:45:47 -04:00
Elie Schoppik
83d4c3e3e9 format for wolfram alpha 2025-05-13 13:37:26 -04:00
Elie Schoppik
5c6da07ca6 Merge pull request #148 from GiangHLe/main
Updated basic_workflows.ipynb
2025-05-13 13:35:41 -04:00
Elie Schoppik
d7288bd660 Merge pull request #150 from anthropics/elie/remove-brave
removing Brave
2025-05-13 10:03:28 -04:00
Elie Schoppik
a5c26e329a removing Brave 2025-05-12 21:36:12 -04:00
GiangHLe
310322cafa Add separation between tickets to make it easier for readers to distinguish 2025-05-02 15:39:06 +09:00
GiangHLe
1272842150 remove duplicate print 2025-05-02 15:38:55 +09:00
Ben Komalo
4a7be656bd Merge pull request #139 from anthropics/benkomalo/claude-3-7-batch-tool
Recipe for parallel tool use in Claude 3.7 Sonnet
2025-03-07 09:43:36 -08:00
Ben Komalo
fd56f9eaed Recipe for parallel tool use in Claude 3.7 Sonnet
Claude 3.7 Sonnet has a tendency to make tool calls serially, instead of
in parallel. This provides a potential workaround for users.
2025-03-06 12:11:56 -08:00
Alex Albert
b9daf8fde2 Merge pull request #136 from anthropics/claude-3-7-sonnet
claude 3-7
2025-02-24 10:41:51 -08:00
alexalbertt
da990786bf claude 3-7 2025-02-24 10:25:56 -08:00
cal-anthropic
09c00ae469 Add PDF highlighting to using_citations cookbook (#133) 2025-01-28 09:44:46 -08:00
cal-anthropic
e268dbfa41 Updates to the citations cookbook for new API level citation feature (#130) 2025-01-23 09:12:54 -08:00
Kevin Chen
3e64352a7f Merge pull request #128 from anthropics/kc/update-prompt-caching-cookbook-implicit-reads
Update prompt caching cookbook to use implicit reads
2025-01-16 07:17:50 -08:00
Kevin Chen
5c0593a3ff remove unrelated changes 2025-01-15 12:57:17 -05:00
Kevin Chen
de42c1fcbe update multiturn prompt caching to take advantage of implicit cache reads 2025-01-15 12:49:52 -05:00
Yijing Barry Zhang
356140cbfe Merge pull request #122 from anthropics/barryz/agent-cookbook
cookbook for 'Building Effective Agents'
2024-12-19 12:03:08 -05:00
Barry Zhang
2a4fe5ef95 adding in output 2024-12-19 11:56:40 -05:00
Barry Zhang
59860065b5 cookbook for 'Building Effective Agents' 2024-12-19 10:45:24 -05:00
Alex Albert
ae81df56ad Merge pull request #109 from anthropics/michael/pdfs-cookbooks
Modify PDF cookbooks to use new beta feature
2024-11-01 13:41:58 -07:00
Michael Cohen
ee8e68c4bb Clear install cell outputs 2024-11-01 16:40:26 -04:00
Michael Cohen
bf3bca0b6b Merge branch 'main' into michael/pdfs-cookbooks 2024-11-01 15:49:49 -04:00
Alex Albert
15c9c572f2 Merge pull request #101 from anthropics/GarvanD-add-readme-citations
Add README to citations project
2024-11-01 12:39:05 -07:00
Alex Albert
045983ebfd Merge pull request #102 from eltociear/patch-8
docs: update reading_charts_graphs_powerpoints.ipynb
2024-11-01 12:31:50 -07:00
Alex Albert
688123fb00 Merge pull request #107 from anthropics/elie/updated-sonnet
Updated cookbooks with new sonnet 3.5
2024-11-01 12:31:23 -07:00