-
Notifications
You must be signed in to change notification settings - Fork 955
chore(claude): add initial Claude.md #3252
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| # OpenLLMetry Repository Guide | ||
|
|
||
| ## Repository Structure | ||
| This repository contains multiple PyPI-publishable packages organized and orchestrated using Nx workspace management. | ||
|
|
||
| ### Nx Workspace Commands | ||
| ```bash | ||
| # Run tests across all packages | ||
| nx run-many -t test | ||
|
|
||
| # Run linting across all packages | ||
| nx run-many -t lint | ||
|
|
||
| # Update lock files across all packages | ||
| nx run-many -t lock | ||
|
|
||
| # Run specific targets on specific packages | ||
| nx run <package-name>:test | ||
| nx run <package-name>:lint | ||
|
|
||
| # Show project graph | ||
| nx graph | ||
|
|
||
| # Show what's affected by changes | ||
| nx affected:test | ||
| nx affected:lint | ||
| ``` | ||
|
|
||
| ## Package Management | ||
| All packages use Poetry as the package manager. Always execute commands through Poetry: | ||
| ```bash | ||
| poetry run <command> | ||
| ``` | ||
|
|
||
| ## Testing with VCR Cassettes | ||
| Tests utilize VCR cassettes for API calls. | ||
|
|
||
| ### Commands | ||
| ```bash | ||
| # Run tests normally (uses existing cassettes) | ||
| poetry run pytest tests/ | ||
|
|
||
| # Re-record all cassettes (requires API keys) | ||
| poetry run pytest tests/ --record-mode=all | ||
|
|
||
| # Record only new test episodes | ||
| poetry run pytest tests/ --record-mode=new_episodes | ||
|
|
||
| # Record cassettes once (if they don't exist) | ||
| poetry run pytest tests/ --record-mode=once | ||
|
|
||
| # Run tests without recording (fails if cassettes missing) | ||
| poetry run pytest tests/ --record-mode=none | ||
|
|
||
|
Comment on lines
+43
to
+54
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainEnsure pytest supports --record-mode flags (pytest-recording/pytest-vcr). Run this script to check for relevant plugins/deps and pytest config: 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "Searching for pytest VCR plugins and config..."
rg -n "pytest-recording|pytest-vcr|vcrpy" -S || true
echo "Looking for pytest configuration files..."
fd -t f -a "pyproject.toml|pytest.ini|tox.ini|setup.cfg" | while read -r f; do
echo "== $f =="
rg -n "record-mode|addopts|pytest_plugins|vcr" "$f" || true
done
echo "Listing pyproject poetry dependencies mentioning pytest/vcr..."
fd pyproject.toml | xargs -I{} sh -c 'echo "-> {}"; rg -n "pytest|vcr|recording" "{}" || true'Length of output: 311274 Ensure the root project installs and enables a pytest recording plugin It looks like only individual packages list pytest‐recording and vcrpy, but your top-level README commands run • In your root pyproject.toml (under • Run: • Create or update pytest.ini (at the repo root) with: • Commit those changes and confirm: 🤖 Prompt for AI Agents |
||
| # Run specific test files | ||
| poetry run pytest tests/test_agents.py --record-mode=once | ||
| ``` | ||
|
|
||
| ### Guidance | ||
| Re-record cassettes when API interactions change to ensure test accuracy. | ||
| Never commit secrets or PII. Scrub them using VCR filters (e.g., filter_headers, before_record) or your test framework's equivalent. | ||
| Store API keys only in environment variables/secure vaults; never in code or cassettes. | ||
| Typical record modes you may use: once, new_episodes, all, none (choose per test needs). | ||
| Creating new cassettes requires valid API keys (OpenAI, Anthropic, etc.); ask the user to provide them if needed. | ||
|
|
||
| ## Semantic Conventions | ||
| The semantic convention package follows the OpenTelemetry GenAI specification: | ||
| https://opentelemetry.io/docs/specs/semconv/gen-ai/ | ||
|
|
||
| ## Instrumentation Packages | ||
| Instrumentation packages should leverage the semantic conventions package. Their purpose is to instrument AI-related libraries and generate spans and tracing data compliant with OpenTelemetry semantic conventions. | ||
|
|
||
| ## Code Quality | ||
| Flake8 is used for code linting. | ||
Uh oh!
There was an error while loading. Please reload this page.