prela 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. prela-0.1.0/.github/workflows/publish-pypi.yml +34 -0
  2. prela-0.1.0/.github/workflows/publish-testpypi.yml +35 -0
  3. prela-0.1.0/.github/workflows/test.yml +62 -0
  4. prela-0.1.0/.gitignore +157 -0
  5. prela-0.1.0/CHANGELOG.md +70 -0
  6. prela-0.1.0/CONTRIBUTING.md +244 -0
  7. prela-0.1.0/LICENSE +190 -0
  8. prela-0.1.0/PKG-INFO +399 -0
  9. prela-0.1.0/README.md +347 -0
  10. prela-0.1.0/docs/SDK_LOCAL_TESTING.md +2376 -0
  11. prela-0.1.0/docs/SDK_VS_CLOUD_FEATURES.md +886 -0
  12. prela-0.1.0/examples/README.md +170 -0
  13. prela-0.1.0/examples/anthropic_instrumentation.py +300 -0
  14. prela-0.1.0/examples/assertions_demo.py +310 -0
  15. prela-0.1.0/examples/auto_instrument_multi_agent_demo.py +59 -0
  16. prela-0.1.0/examples/autogen_instrumentation.py +199 -0
  17. prela-0.1.0/examples/cli_demo.py +103 -0
  18. prela-0.1.0/examples/compact_show_demo.py +97 -0
  19. prela-0.1.0/examples/console_exporter_demo.py +196 -0
  20. prela-0.1.0/examples/convenience_shortcuts_demo.py +174 -0
  21. prela-0.1.0/examples/crewai_instrumentation.py +195 -0
  22. prela-0.1.0/examples/eval_runner_demo.py +377 -0
  23. prela-0.1.0/examples/eval_suite_demo.py +307 -0
  24. prela-0.1.0/examples/exporters_demo.py +338 -0
  25. prela-0.1.0/examples/file_exporter_demo.py +117 -0
  26. prela-0.1.0/examples/http_exporter_example.py +159 -0
  27. prela-0.1.0/examples/interactive_list_demo.py +69 -0
  28. prela-0.1.0/examples/langchain_instrumentation.py +295 -0
  29. prela-0.1.0/examples/llamaindex_instrumentation.py +359 -0
  30. prela-0.1.0/examples/multi_agent_assertions_example.py +226 -0
  31. prela-0.1.0/examples/n8n_code_node_examples.py +364 -0
  32. prela-0.1.0/examples/n8n_eval_example.py +387 -0
  33. prela-0.1.0/examples/n8n_webhook_example.py +152 -0
  34. prela-0.1.0/examples/n8n_webhook_simple.py +40 -0
  35. prela-0.1.0/examples/replay_api_calls_example.py +251 -0
  36. prela-0.1.0/examples/reporters_demo.py +348 -0
  37. prela-0.1.0/examples/swarm_instrumentation.py +191 -0
  38. prela-0.1.0/examples/trace_decorator_demo.py +359 -0
  39. prela-0.1.0/prela/__init__.py +394 -0
  40. prela-0.1.0/prela/_version.py +3 -0
  41. prela-0.1.0/prela/contrib/CLI.md +431 -0
  42. prela-0.1.0/prela/contrib/README.md +118 -0
  43. prela-0.1.0/prela/contrib/__init__.py +5 -0
  44. prela-0.1.0/prela/contrib/cli.py +1063 -0
  45. prela-0.1.0/prela/contrib/explorer.py +571 -0
  46. prela-0.1.0/prela/core/__init__.py +64 -0
  47. prela-0.1.0/prela/core/clock.py +98 -0
  48. prela-0.1.0/prela/core/context.py +228 -0
  49. prela-0.1.0/prela/core/replay.py +403 -0
  50. prela-0.1.0/prela/core/sampler.py +178 -0
  51. prela-0.1.0/prela/core/span.py +295 -0
  52. prela-0.1.0/prela/core/tracer.py +498 -0
  53. prela-0.1.0/prela/evals/__init__.py +94 -0
  54. prela-0.1.0/prela/evals/assertions/README.md +484 -0
  55. prela-0.1.0/prela/evals/assertions/__init__.py +78 -0
  56. prela-0.1.0/prela/evals/assertions/base.py +90 -0
  57. prela-0.1.0/prela/evals/assertions/multi_agent.py +625 -0
  58. prela-0.1.0/prela/evals/assertions/semantic.py +223 -0
  59. prela-0.1.0/prela/evals/assertions/structural.py +443 -0
  60. prela-0.1.0/prela/evals/assertions/tool.py +380 -0
  61. prela-0.1.0/prela/evals/case.py +370 -0
  62. prela-0.1.0/prela/evals/n8n/__init__.py +69 -0
  63. prela-0.1.0/prela/evals/n8n/assertions.py +450 -0
  64. prela-0.1.0/prela/evals/n8n/runner.py +497 -0
  65. prela-0.1.0/prela/evals/reporters/README.md +184 -0
  66. prela-0.1.0/prela/evals/reporters/__init__.py +32 -0
  67. prela-0.1.0/prela/evals/reporters/console.py +251 -0
  68. prela-0.1.0/prela/evals/reporters/json.py +176 -0
  69. prela-0.1.0/prela/evals/reporters/junit.py +278 -0
  70. prela-0.1.0/prela/evals/runner.py +525 -0
  71. prela-0.1.0/prela/evals/suite.py +316 -0
  72. prela-0.1.0/prela/exporters/__init__.py +27 -0
  73. prela-0.1.0/prela/exporters/base.py +189 -0
  74. prela-0.1.0/prela/exporters/console.py +443 -0
  75. prela-0.1.0/prela/exporters/file.py +322 -0
  76. prela-0.1.0/prela/exporters/http.py +394 -0
  77. prela-0.1.0/prela/exporters/multi.py +154 -0
  78. prela-0.1.0/prela/exporters/otlp.py +388 -0
  79. prela-0.1.0/prela/instrumentation/ANTHROPIC.md +297 -0
  80. prela-0.1.0/prela/instrumentation/LANGCHAIN.md +480 -0
  81. prela-0.1.0/prela/instrumentation/OPENAI.md +59 -0
  82. prela-0.1.0/prela/instrumentation/__init__.py +49 -0
  83. prela-0.1.0/prela/instrumentation/anthropic.py +1436 -0
  84. prela-0.1.0/prela/instrumentation/auto.py +129 -0
  85. prela-0.1.0/prela/instrumentation/base.py +436 -0
  86. prela-0.1.0/prela/instrumentation/langchain.py +959 -0
  87. prela-0.1.0/prela/instrumentation/llamaindex.py +719 -0
  88. prela-0.1.0/prela/instrumentation/multi_agent/__init__.py +48 -0
  89. prela-0.1.0/prela/instrumentation/multi_agent/autogen.py +357 -0
  90. prela-0.1.0/prela/instrumentation/multi_agent/crewai.py +404 -0
  91. prela-0.1.0/prela/instrumentation/multi_agent/langgraph.py +299 -0
  92. prela-0.1.0/prela/instrumentation/multi_agent/models.py +203 -0
  93. prela-0.1.0/prela/instrumentation/multi_agent/swarm.py +231 -0
  94. prela-0.1.0/prela/instrumentation/n8n/__init__.py +68 -0
  95. prela-0.1.0/prela/instrumentation/n8n/code_node.py +534 -0
  96. prela-0.1.0/prela/instrumentation/n8n/models.py +336 -0
  97. prela-0.1.0/prela/instrumentation/n8n/webhook.py +489 -0
  98. prela-0.1.0/prela/instrumentation/openai.py +1198 -0
  99. prela-0.1.0/prela/license.py +245 -0
  100. prela-0.1.0/prela/replay/__init__.py +31 -0
  101. prela-0.1.0/prela/replay/comparison.py +390 -0
  102. prela-0.1.0/prela/replay/engine.py +1227 -0
  103. prela-0.1.0/prela/replay/loader.py +231 -0
  104. prela-0.1.0/prela/replay/result.py +196 -0
  105. prela-0.1.0/pyproject.toml +124 -0
  106. prela-0.1.0/tests/__init__.py +1 -0
  107. prela-0.1.0/tests/test_auto_instrument.py +317 -0
  108. prela-0.1.0/tests/test_cli.py +553 -0
  109. prela-0.1.0/tests/test_clock.py +324 -0
  110. prela-0.1.0/tests/test_context.py +511 -0
  111. prela-0.1.0/tests/test_evals/__init__.py +1 -0
  112. prela-0.1.0/tests/test_evals/test_assertions.py +801 -0
  113. prela-0.1.0/tests/test_evals/test_case.py +489 -0
  114. prela-0.1.0/tests/test_evals/test_n8n_assertions.py +469 -0
  115. prela-0.1.0/tests/test_evals/test_n8n_runner.py +423 -0
  116. prela-0.1.0/tests/test_evals/test_reporters.py +608 -0
  117. prela-0.1.0/tests/test_evals/test_runner.py +749 -0
  118. prela-0.1.0/tests/test_evals/test_suite.py +520 -0
  119. prela-0.1.0/tests/test_exporters/__init__.py +1 -0
  120. prela-0.1.0/tests/test_exporters/test_console.py +583 -0
  121. prela-0.1.0/tests/test_exporters/test_file.py +594 -0
  122. prela-0.1.0/tests/test_exporters/test_http.py +549 -0
  123. prela-0.1.0/tests/test_exporters/test_multi.py +269 -0
  124. prela-0.1.0/tests/test_exporters/test_otlp.py +354 -0
  125. prela-0.1.0/tests/test_init.py +294 -0
  126. prela-0.1.0/tests/test_instrumentation/__init__.py +1 -0
  127. prela-0.1.0/tests/test_instrumentation/test_anthropic.py +1203 -0
  128. prela-0.1.0/tests/test_instrumentation/test_anthropic_replay.py +397 -0
  129. prela-0.1.0/tests/test_instrumentation/test_autogen.py +345 -0
  130. prela-0.1.0/tests/test_instrumentation/test_crewai.py +490 -0
  131. prela-0.1.0/tests/test_instrumentation/test_langchain.py +622 -0
  132. prela-0.1.0/tests/test_instrumentation/test_langchain_replay.py +397 -0
  133. prela-0.1.0/tests/test_instrumentation/test_langgraph.py +448 -0
  134. prela-0.1.0/tests/test_instrumentation/test_llamaindex.py +622 -0
  135. prela-0.1.0/tests/test_instrumentation/test_llamaindex_replay.py +385 -0
  136. prela-0.1.0/tests/test_instrumentation/test_multi_agent_replay.py +219 -0
  137. prela-0.1.0/tests/test_instrumentation/test_n8n_code_node.py +524 -0
  138. prela-0.1.0/tests/test_instrumentation/test_n8n_webhook.py +602 -0
  139. prela-0.1.0/tests/test_instrumentation/test_openai.py +816 -0
  140. prela-0.1.0/tests/test_instrumentation/test_swarm.py +277 -0
  141. prela-0.1.0/tests/test_license.py +233 -0
  142. prela-0.1.0/tests/test_n8n_init.py +172 -0
  143. prela-0.1.0/tests/test_replay.py +476 -0
  144. prela-0.1.0/tests/test_replay_api_calls.py +404 -0
  145. prela-0.1.0/tests/test_replay_comparison.py +436 -0
  146. prela-0.1.0/tests/test_replay_engine.py +672 -0
  147. prela-0.1.0/tests/test_replay_fallback_similarity.py +206 -0
  148. prela-0.1.0/tests/test_replay_loader.py +354 -0
  149. prela-0.1.0/tests/test_replay_tool_retrieval_execution.py +411 -0
  150. prela-0.1.0/tests/test_sampler.py +450 -0
  151. prela-0.1.0/tests/test_span.py +483 -0
  152. prela-0.1.0/tests/test_tracer.py +570 -0
@@ -0,0 +1,34 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ publish:
9
+ runs-on: ubuntu-latest
10
+ permissions:
11
+ id-token: write # Required for trusted publishing
12
+ contents: read
13
+
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+
17
+ - name: Set up Python
18
+ uses: actions/setup-python@v5
19
+ with:
20
+ python-version: '3.11'
21
+
22
+ - name: Install build tools
23
+ run: |
24
+ python -m pip install --upgrade pip
25
+ pip install build twine
26
+
27
+ - name: Build package
28
+ run: python -m build
29
+
30
+ - name: Check package
31
+ run: twine check dist/*
32
+
33
+ - name: Publish to PyPI
34
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,35 @@
1
+ name: Publish to TestPyPI
2
+
3
+ on:
4
+ workflow_dispatch: # Manual trigger for testing
5
+
6
+ jobs:
7
+ publish:
8
+ runs-on: ubuntu-latest
9
+ permissions:
10
+ id-token: write # Required for trusted publishing
11
+ contents: read
12
+
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+
16
+ - name: Set up Python
17
+ uses: actions/setup-python@v5
18
+ with:
19
+ python-version: '3.11'
20
+
21
+ - name: Install build tools
22
+ run: |
23
+ python -m pip install --upgrade pip
24
+ pip install build twine
25
+
26
+ - name: Build package
27
+ run: python -m build
28
+
29
+ - name: Check package
30
+ run: twine check dist/*
31
+
32
+ - name: Publish to TestPyPI
33
+ uses: pypa/gh-action-pypi-publish@release/v1
34
+ with:
35
+ repository-url: https://test.pypi.org/legacy/
@@ -0,0 +1,62 @@
1
+ name: Test
2
+
3
+ on:
4
+ push:
5
+ branches: [main, develop]
6
+ pull_request:
7
+ branches: [main, develop]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ python-version: ['3.9', '3.10', '3.11', '3.12']
15
+
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+
19
+ - name: Set up Python ${{ matrix.python-version }}
20
+ uses: actions/setup-python@v5
21
+ with:
22
+ python-version: ${{ matrix.python-version }}
23
+
24
+ - name: Install dependencies
25
+ run: |
26
+ python -m pip install --upgrade pip
27
+ pip install -e ".[dev,all]"
28
+
29
+ - name: Run tests
30
+ run: pytest --cov=prela --cov-report=xml --cov-report=term
31
+
32
+ - name: Upload coverage to Codecov
33
+ uses: codecov/codecov-action@v3
34
+ if: matrix.python-version == '3.11'
35
+ with:
36
+ file: ./coverage.xml
37
+ fail_ci_if_error: false
38
+
39
+ lint:
40
+ runs-on: ubuntu-latest
41
+
42
+ steps:
43
+ - uses: actions/checkout@v4
44
+
45
+ - name: Set up Python
46
+ uses: actions/setup-python@v5
47
+ with:
48
+ python-version: '3.11'
49
+
50
+ - name: Install dependencies
51
+ run: |
52
+ python -m pip install --upgrade pip
53
+ pip install -e ".[dev]"
54
+
55
+ - name: Run ruff
56
+ run: ruff check .
57
+
58
+ - name: Run black
59
+ run: black --check .
60
+
61
+ - name: Run mypy
62
+ run: mypy prela
prela-0.1.0/.gitignore ADDED
@@ -0,0 +1,157 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ *.manifest
31
+ *.spec
32
+
33
+ # Installer logs
34
+ pip-log.txt
35
+ pip-delete-this-directory.txt
36
+
37
+ # Unit test / coverage reports
38
+ htmlcov/
39
+ .tox/
40
+ .nox/
41
+ .coverage
42
+ .coverage.*
43
+ .cache
44
+ nosetests.xml
45
+ coverage.xml
46
+ *.cover
47
+ *.py,cover
48
+ .hypothesis/
49
+ .pytest_cache/
50
+ cover/
51
+
52
+ # Translations
53
+ *.mo
54
+ *.pot
55
+
56
+ # Django stuff:
57
+ *.log
58
+ local_settings.py
59
+ db.sqlite3
60
+ db.sqlite3-journal
61
+
62
+ # Flask stuff:
63
+ instance/
64
+ .webassets-cache
65
+
66
+ # Scrapy stuff:
67
+ .scrapy
68
+
69
+ # Sphinx documentation
70
+ docs/_build/
71
+
72
+ # PyBuilder
73
+ .pybuilder/
74
+ target/
75
+
76
+ # Jupyter Notebook
77
+ .ipynb_checkpoints
78
+
79
+ # IPython
80
+ profile_default/
81
+ ipython_config.py
82
+
83
+ # pyenv
84
+ .python-version
85
+
86
+ # pipenv
87
+ Pipfile.lock
88
+
89
+ # poetry
90
+ poetry.lock
91
+
92
+ # pdm
93
+ .pdm.toml
94
+ .pdm-python
95
+ .pdm-build/
96
+
97
+ # PEP 582
98
+ __pypackages__/
99
+
100
+ # Celery stuff
101
+ celerybeat-schedule
102
+ celerybeat.pid
103
+
104
+ # SageMath parsed files
105
+ *.sage.py
106
+
107
+ # Environments
108
+ .env
109
+ .venv
110
+ env/
111
+ venv/
112
+ ENV/
113
+ env.bak/
114
+ venv.bak/
115
+
116
+ # Spyder project settings
117
+ .spyderproject
118
+ .spyproject
119
+
120
+ # Rope project settings
121
+ .ropeproject
122
+
123
+ # mkdocs documentation
124
+ /site
125
+
126
+ # mypy
127
+ .mypy_cache/
128
+ .dmypy.json
129
+ dmypy.json
130
+
131
+ # Pyre type checker
132
+ .pyre/
133
+
134
+ # pytype static type analyzer
135
+ .pytype/
136
+
137
+ # Cython debug symbols
138
+ cython_debug/
139
+
140
+ # PyCharm
141
+ .idea/
142
+
143
+ # VS Code
144
+ .vscode/
145
+
146
+ # Ruff
147
+ .ruff_cache/
148
+
149
+ # macOS
150
+ .DS_Store
151
+
152
+ # Prela specific
153
+ test_traces/
154
+ eval_results/
155
+ test_scenarios/
156
+ traces/
157
+ .prela.yaml
@@ -0,0 +1,70 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.1.0] - 2026-02-04
9
+
10
+ ### Added
11
+
12
+ **Core Observability:**
13
+ - Complete tracing SDK with span lifecycle management
14
+ - Context propagation (async/threading safe)
15
+ - Multiple sampling strategies (always on/off, probabilistic, rate limiting)
16
+ - Console, file, HTTP, and ClickHouse exporters
17
+
18
+ **Auto-Instrumentation (10 frameworks):**
19
+ - OpenAI SDK instrumentation
20
+ - Anthropic/Claude SDK instrumentation
21
+ - LangChain chains and agents
22
+ - LlamaIndex queries
23
+ - CrewAI task-based agents
24
+ - AutoGen conversational agents
25
+ - LangGraph graph-based workflows
26
+ - OpenAI Swarm handoff-based agents
27
+ - N8N webhook and code node integration
28
+
29
+ **Evaluation Framework:**
30
+ - 17+ assertion types for testing agent behavior
31
+ - Structural assertions (contains, regex, JSON schema, length)
32
+ - Semantic assertions (embedding-based similarity with fallback)
33
+ - Tool assertions (tool called, args validation, sequence checking)
34
+ - Multi-agent assertions (agent usage, task completion, delegation patterns)
35
+ - 3 reporter types (Console, JSON, JUnit)
36
+ - Parallel test execution with progress callbacks
37
+ - N8N-specific evaluation support
38
+
39
+ **Replay Engine:**
40
+ - Deterministic replay for debugging
41
+ - API retry with exponential backoff
42
+ - Tool re-execution with allowlist/blocklist controls
43
+ - Retrieval re-execution with ChromaDB support
44
+ - Semantic output comparison with difflib fallback
45
+ - Streaming support for OpenAI and Anthropic APIs
46
+
47
+ **CLI Tools:**
48
+ - `prela list` - List traces with filters
49
+ - `prela show` - Show trace details
50
+ - `prela last` - Show most recent trace
51
+ - `prela search` - Full-text search
52
+ - `prela errors` - Show failed traces
53
+ - `prela tail` - Real-time trace following
54
+ - Interactive TUI explorer with Textual
55
+
56
+ **Testing & Quality:**
57
+ - 836+ comprehensive tests
58
+ - 95%+ code coverage
59
+ - Full type hints (mypy strict mode)
60
+ - Linting with ruff and black
61
+ - CI/CD with GitHub Actions
62
+
63
+ ### Technical Details
64
+
65
+ - **Python Support:** 3.9, 3.10, 3.11, 3.12
66
+ - **Build System:** Hatchling
67
+ - **License:** Apache 2.0
68
+ - **Package Name:** `prela`
69
+
70
+ [0.1.0]: https://github.com/garrettw2200/prela-sdk/releases/tag/v0.1.0
@@ -0,0 +1,244 @@
1
+ # Contributing to Prela SDK
2
+
3
+ Thank you for your interest in contributing to Prela! We welcome contributions from the community.
4
+
5
+ ## Development Setup
6
+
7
+ ### Prerequisites
8
+
9
+ - Python 3.9 or higher
10
+ - pip
11
+ - git
12
+
13
+ ### Installation
14
+
15
+ 1. **Fork and clone the repository**
16
+ ```bash
17
+ git clone https://github.com/YOUR_USERNAME/prela-sdk.git
18
+ cd prela-sdk
19
+ ```
20
+
21
+ 2. **Create a virtual environment**
22
+ ```bash
23
+ python -m venv venv
24
+ source venv/bin/activate # On Windows: venv\Scripts\activate
25
+ ```
26
+
27
+ 3. **Install development dependencies**
28
+ ```bash
29
+ pip install -e ".[dev,all]"
30
+ ```
31
+
32
+ This installs:
33
+ - Core SDK package in editable mode
34
+ - Development tools (pytest, ruff, black, mypy)
35
+ - All optional dependencies for integrations
36
+
37
+ ## Running Tests
38
+
39
+ ### Run all tests
40
+ ```bash
41
+ pytest
42
+ ```
43
+
44
+ ### Run with coverage
45
+ ```bash
46
+ pytest --cov=prela --cov-report=html
47
+ ```
48
+
49
+ ### Run specific test file
50
+ ```bash
51
+ pytest tests/test_tracer.py
52
+ ```
53
+
54
+ ### Run tests matching a pattern
55
+ ```bash
56
+ pytest -k "test_span"
57
+ ```
58
+
59
+ ## Code Style
60
+
61
+ We use several tools to maintain code quality:
62
+
63
+ ### Linting
64
+ ```bash
65
+ ruff check .
66
+ ```
67
+
68
+ To auto-fix issues:
69
+ ```bash
70
+ ruff check --fix .
71
+ ```
72
+
73
+ ### Formatting
74
+ ```bash
75
+ black .
76
+ ```
77
+
78
+ ### Type Checking
79
+ ```bash
80
+ mypy prela
81
+ ```
82
+
83
+ ### Run all checks
84
+ ```bash
85
+ # Before submitting a PR, run all checks:
86
+ ruff check .
87
+ black --check .
88
+ mypy prela
89
+ pytest
90
+ ```
91
+
92
+ ## Making Changes
93
+
94
+ ### 1. Create a branch
95
+
96
+ ```bash
97
+ git checkout -b feature/my-new-feature
98
+ # or
99
+ git checkout -b fix/my-bug-fix
100
+ ```
101
+
102
+ ### 2. Make your changes
103
+
104
+ - Write clear, concise code
105
+ - Add tests for new functionality
106
+ - Update documentation if needed
107
+ - Follow existing code patterns
108
+
109
+ ### 3. Test your changes
110
+
111
+ ```bash
112
+ # Run tests
113
+ pytest
114
+
115
+ # Run linters
116
+ ruff check .
117
+ black .
118
+ mypy prela
119
+ ```
120
+
121
+ ### 4. Commit your changes
122
+
123
+ ```bash
124
+ git add .
125
+ git commit -m "feat: add new feature"
126
+ ```
127
+
128
+ **Commit message format:**
129
+ - `feat:` New feature
130
+ - `fix:` Bug fix
131
+ - `docs:` Documentation changes
132
+ - `test:` Test changes
133
+ - `refactor:` Code refactoring
134
+ - `chore:` Maintenance tasks
135
+
136
+ ### 5. Push and create a pull request
137
+
138
+ ```bash
139
+ git push origin feature/my-new-feature
140
+ ```
141
+
142
+ Then go to GitHub and create a pull request.
143
+
144
+ ## Pull Request Guidelines
145
+
146
+ ### Before submitting
147
+
148
+ - [ ] All tests pass locally
149
+ - [ ] Code is formatted with black
150
+ - [ ] Linting passes (ruff)
151
+ - [ ] Type checking passes (mypy)
152
+ - [ ] New features have tests
153
+ - [ ] Documentation is updated
154
+
155
+ ### PR Description
156
+
157
+ Include:
158
+ - Summary of changes
159
+ - Motivation/reasoning
160
+ - Related issue number (if applicable)
161
+ - Breaking changes (if any)
162
+
163
+ ### Review Process
164
+
165
+ 1. Maintainers will review your PR
166
+ 2. Address any feedback or requested changes
167
+ 3. Once approved, your PR will be merged
168
+
169
+ ## Adding New Integrations
170
+
171
+ To add support for a new AI framework:
172
+
173
+ 1. **Create instrumentor file**
174
+ ```
175
+ prela/instrumentation/your_framework.py
176
+ ```
177
+
178
+ 2. **Implement the instrumentor class**
179
+ ```python
180
+ from prela.instrumentation.base import Instrumentor
181
+
182
+ class YourFrameworkInstrumentor(Instrumentor):
183
+ def install(self):
184
+ # Patch/wrap framework methods
185
+ pass
186
+
187
+ def uninstall(self):
188
+ # Restore original methods
189
+ pass
190
+ ```
191
+
192
+ 3. **Register in auto.py**
193
+ ```python
194
+ INSTRUMENTORS = {
195
+ ...
196
+ "your_framework": YourFrameworkInstrumentor,
197
+ }
198
+ ```
199
+
200
+ 4. **Add tests**
201
+ ```
202
+ tests/instrumentation/test_your_framework.py
203
+ ```
204
+
205
+ 5. **Update documentation**
206
+ - Add example to `examples/`
207
+ - Document in README
208
+
209
+ ## Reporting Issues
210
+
211
+ ### Bug Reports
212
+
213
+ Include:
214
+ - Prela version (`prela.__version__`)
215
+ - Python version
216
+ - Operating system
217
+ - Minimal code to reproduce
218
+ - Expected vs actual behavior
219
+ - Error messages/stack traces
220
+
221
+ ### Feature Requests
222
+
223
+ Include:
224
+ - Use case/motivation
225
+ - Proposed API (if applicable)
226
+ - Examples of how it would be used
227
+
228
+ ## Code of Conduct
229
+
230
+ Be respectful and inclusive. We're all here to build something great together.
231
+
232
+ ## Questions?
233
+
234
+ - Open an issue for general questions
235
+ - Check existing issues/PRs first
236
+ - Join our community discussions
237
+
238
+ ## License
239
+
240
+ By contributing to Prela, you agree that your contributions will be licensed under the Apache 2.0 License.
241
+
242
+ ---
243
+
244
+ Thank you for contributing to Prela! 🎉