stuntdouble 2.0.1__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 (193) hide show
  1. stuntdouble-2.0.1/.github/CODEOWNERS +10 -0
  2. stuntdouble-2.0.1/.github/PULL_REQUEST_TEMPLATE.md +15 -0
  3. stuntdouble-2.0.1/.github/workflows/ci.yml +67 -0
  4. stuntdouble-2.0.1/.github/workflows/release.yml +67 -0
  5. stuntdouble-2.0.1/.gitignore +75 -0
  6. stuntdouble-2.0.1/CHANGELOG.md +19 -0
  7. stuntdouble-2.0.1/CLAUDE.md +31 -0
  8. stuntdouble-2.0.1/CODE_OF_CONDUCT.md +83 -0
  9. stuntdouble-2.0.1/CONTRIBUTING.md +80 -0
  10. stuntdouble-2.0.1/LICENSE +22 -0
  11. stuntdouble-2.0.1/PKG-INFO +707 -0
  12. stuntdouble-2.0.1/README.md +682 -0
  13. stuntdouble-2.0.1/SECURITY.md +31 -0
  14. stuntdouble-2.0.1/docs/Makefile +31 -0
  15. stuntdouble-2.0.1/docs/_build/html/.buildinfo +4 -0
  16. stuntdouble-2.0.1/docs/_build/html/.doctrees/__intersphinx_cache__/python_objects.inv +0 -0
  17. stuntdouble-2.0.1/docs/_build/html/.doctrees/architecture/overview.doctree +0 -0
  18. stuntdouble-2.0.1/docs/_build/html/.doctrees/environment.pickle +0 -0
  19. stuntdouble-2.0.1/docs/_build/html/.doctrees/guides/call-recording.doctree +0 -0
  20. stuntdouble-2.0.1/docs/_build/html/.doctrees/guides/context-aware-mocks.doctree +0 -0
  21. stuntdouble-2.0.1/docs/_build/html/.doctrees/guides/langgraph-integration.doctree +0 -0
  22. stuntdouble-2.0.1/docs/_build/html/.doctrees/guides/matchers-and-resolvers.doctree +0 -0
  23. stuntdouble-2.0.1/docs/_build/html/.doctrees/guides/mcp-mirroring.doctree +0 -0
  24. stuntdouble-2.0.1/docs/_build/html/.doctrees/guides/mock-builder.doctree +0 -0
  25. stuntdouble-2.0.1/docs/_build/html/.doctrees/guides/quickstart.doctree +0 -0
  26. stuntdouble-2.0.1/docs/_build/html/.doctrees/guides/signature-validation.doctree +0 -0
  27. stuntdouble-2.0.1/docs/_build/html/.doctrees/index.doctree +0 -0
  28. stuntdouble-2.0.1/docs/_build/html/.doctrees/reference/dependencies.doctree +0 -0
  29. stuntdouble-2.0.1/docs/_build/html/.doctrees/reference/mock-format.doctree +0 -0
  30. stuntdouble-2.0.1/docs/_build/html/.doctrees/reference/schema-validation.doctree +0 -0
  31. stuntdouble-2.0.1/docs/_build/html/_sources/architecture/overview.md.txt +408 -0
  32. stuntdouble-2.0.1/docs/_build/html/_sources/guides/call-recording.md.txt +354 -0
  33. stuntdouble-2.0.1/docs/_build/html/_sources/guides/context-aware-mocks.md.txt +410 -0
  34. stuntdouble-2.0.1/docs/_build/html/_sources/guides/langgraph-integration.md.txt +1209 -0
  35. stuntdouble-2.0.1/docs/_build/html/_sources/guides/matchers-and-resolvers.md.txt +477 -0
  36. stuntdouble-2.0.1/docs/_build/html/_sources/guides/mcp-mirroring.md.txt +302 -0
  37. stuntdouble-2.0.1/docs/_build/html/_sources/guides/mock-builder.md.txt +390 -0
  38. stuntdouble-2.0.1/docs/_build/html/_sources/guides/quickstart.md.txt +622 -0
  39. stuntdouble-2.0.1/docs/_build/html/_sources/guides/signature-validation.md.txt +353 -0
  40. stuntdouble-2.0.1/docs/_build/html/_sources/index.md.txt +193 -0
  41. stuntdouble-2.0.1/docs/_build/html/_sources/reference/dependencies.md.txt +234 -0
  42. stuntdouble-2.0.1/docs/_build/html/_sources/reference/mock-format.md.txt +469 -0
  43. stuntdouble-2.0.1/docs/_build/html/_sources/reference/schema-validation.md.txt +130 -0
  44. stuntdouble-2.0.1/docs/_build/html/_static/_sphinx_javascript_frameworks_compat.js +123 -0
  45. stuntdouble-2.0.1/docs/_build/html/_static/base-stemmer.js +476 -0
  46. stuntdouble-2.0.1/docs/_build/html/_static/basic.css +906 -0
  47. stuntdouble-2.0.1/docs/_build/html/_static/css/badge_only.css +1 -0
  48. stuntdouble-2.0.1/docs/_build/html/_static/css/fonts/Roboto-Slab-Bold.woff +0 -0
  49. stuntdouble-2.0.1/docs/_build/html/_static/css/fonts/Roboto-Slab-Bold.woff2 +0 -0
  50. stuntdouble-2.0.1/docs/_build/html/_static/css/fonts/Roboto-Slab-Regular.woff +0 -0
  51. stuntdouble-2.0.1/docs/_build/html/_static/css/fonts/Roboto-Slab-Regular.woff2 +0 -0
  52. stuntdouble-2.0.1/docs/_build/html/_static/css/fonts/fontawesome-webfont.eot +0 -0
  53. stuntdouble-2.0.1/docs/_build/html/_static/css/fonts/fontawesome-webfont.svg +2671 -0
  54. stuntdouble-2.0.1/docs/_build/html/_static/css/fonts/fontawesome-webfont.ttf +0 -0
  55. stuntdouble-2.0.1/docs/_build/html/_static/css/fonts/fontawesome-webfont.woff +0 -0
  56. stuntdouble-2.0.1/docs/_build/html/_static/css/fonts/fontawesome-webfont.woff2 +0 -0
  57. stuntdouble-2.0.1/docs/_build/html/_static/css/fonts/lato-bold-italic.woff +0 -0
  58. stuntdouble-2.0.1/docs/_build/html/_static/css/fonts/lato-bold-italic.woff2 +0 -0
  59. stuntdouble-2.0.1/docs/_build/html/_static/css/fonts/lato-bold.woff +0 -0
  60. stuntdouble-2.0.1/docs/_build/html/_static/css/fonts/lato-bold.woff2 +0 -0
  61. stuntdouble-2.0.1/docs/_build/html/_static/css/fonts/lato-normal-italic.woff +0 -0
  62. stuntdouble-2.0.1/docs/_build/html/_static/css/fonts/lato-normal-italic.woff2 +0 -0
  63. stuntdouble-2.0.1/docs/_build/html/_static/css/fonts/lato-normal.woff +0 -0
  64. stuntdouble-2.0.1/docs/_build/html/_static/css/fonts/lato-normal.woff2 +0 -0
  65. stuntdouble-2.0.1/docs/_build/html/_static/css/theme.css +4 -0
  66. stuntdouble-2.0.1/docs/_build/html/_static/doctools.js +150 -0
  67. stuntdouble-2.0.1/docs/_build/html/_static/documentation_options.js +13 -0
  68. stuntdouble-2.0.1/docs/_build/html/_static/english-stemmer.js +1066 -0
  69. stuntdouble-2.0.1/docs/_build/html/_static/file.png +0 -0
  70. stuntdouble-2.0.1/docs/_build/html/_static/fonts/Lato/lato-bold.eot +0 -0
  71. stuntdouble-2.0.1/docs/_build/html/_static/fonts/Lato/lato-bold.ttf +0 -0
  72. stuntdouble-2.0.1/docs/_build/html/_static/fonts/Lato/lato-bold.woff +0 -0
  73. stuntdouble-2.0.1/docs/_build/html/_static/fonts/Lato/lato-bold.woff2 +0 -0
  74. stuntdouble-2.0.1/docs/_build/html/_static/fonts/Lato/lato-bolditalic.eot +0 -0
  75. stuntdouble-2.0.1/docs/_build/html/_static/fonts/Lato/lato-bolditalic.ttf +0 -0
  76. stuntdouble-2.0.1/docs/_build/html/_static/fonts/Lato/lato-bolditalic.woff +0 -0
  77. stuntdouble-2.0.1/docs/_build/html/_static/fonts/Lato/lato-bolditalic.woff2 +0 -0
  78. stuntdouble-2.0.1/docs/_build/html/_static/fonts/Lato/lato-italic.eot +0 -0
  79. stuntdouble-2.0.1/docs/_build/html/_static/fonts/Lato/lato-italic.ttf +0 -0
  80. stuntdouble-2.0.1/docs/_build/html/_static/fonts/Lato/lato-italic.woff +0 -0
  81. stuntdouble-2.0.1/docs/_build/html/_static/fonts/Lato/lato-italic.woff2 +0 -0
  82. stuntdouble-2.0.1/docs/_build/html/_static/fonts/Lato/lato-regular.eot +0 -0
  83. stuntdouble-2.0.1/docs/_build/html/_static/fonts/Lato/lato-regular.ttf +0 -0
  84. stuntdouble-2.0.1/docs/_build/html/_static/fonts/Lato/lato-regular.woff +0 -0
  85. stuntdouble-2.0.1/docs/_build/html/_static/fonts/Lato/lato-regular.woff2 +0 -0
  86. stuntdouble-2.0.1/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot +0 -0
  87. stuntdouble-2.0.1/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf +0 -0
  88. stuntdouble-2.0.1/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff +0 -0
  89. stuntdouble-2.0.1/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 +0 -0
  90. stuntdouble-2.0.1/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot +0 -0
  91. stuntdouble-2.0.1/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf +0 -0
  92. stuntdouble-2.0.1/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff +0 -0
  93. stuntdouble-2.0.1/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 +0 -0
  94. stuntdouble-2.0.1/docs/_build/html/_static/jquery.js +2 -0
  95. stuntdouble-2.0.1/docs/_build/html/_static/js/badge_only.js +1 -0
  96. stuntdouble-2.0.1/docs/_build/html/_static/js/theme.js +1 -0
  97. stuntdouble-2.0.1/docs/_build/html/_static/js/versions.js +228 -0
  98. stuntdouble-2.0.1/docs/_build/html/_static/language_data.js +13 -0
  99. stuntdouble-2.0.1/docs/_build/html/_static/minus.png +0 -0
  100. stuntdouble-2.0.1/docs/_build/html/_static/plus.png +0 -0
  101. stuntdouble-2.0.1/docs/_build/html/_static/pygments.css +75 -0
  102. stuntdouble-2.0.1/docs/_build/html/_static/searchtools.js +693 -0
  103. stuntdouble-2.0.1/docs/_build/html/_static/sphinx_highlight.js +159 -0
  104. stuntdouble-2.0.1/docs/_build/html/_static/stuntdouble_logo2.png +0 -0
  105. stuntdouble-2.0.1/docs/_build/html/architecture/overview.html +1036 -0
  106. stuntdouble-2.0.1/docs/_build/html/genindex.html +533 -0
  107. stuntdouble-2.0.1/docs/_build/html/guides/call-recording.html +971 -0
  108. stuntdouble-2.0.1/docs/_build/html/guides/context-aware-mocks.html +948 -0
  109. stuntdouble-2.0.1/docs/_build/html/guides/langgraph-integration.html +1934 -0
  110. stuntdouble-2.0.1/docs/_build/html/guides/matchers-and-resolvers.html +1191 -0
  111. stuntdouble-2.0.1/docs/_build/html/guides/mcp-mirroring.html +898 -0
  112. stuntdouble-2.0.1/docs/_build/html/guides/mock-builder.html +924 -0
  113. stuntdouble-2.0.1/docs/_build/html/guides/quickstart.html +1145 -0
  114. stuntdouble-2.0.1/docs/_build/html/guides/signature-validation.html +929 -0
  115. stuntdouble-2.0.1/docs/_build/html/index.html +882 -0
  116. stuntdouble-2.0.1/docs/_build/html/objects.inv +0 -0
  117. stuntdouble-2.0.1/docs/_build/html/reference/dependencies.html +826 -0
  118. stuntdouble-2.0.1/docs/_build/html/reference/mock-format.html +1177 -0
  119. stuntdouble-2.0.1/docs/_build/html/reference/schema-validation.html +667 -0
  120. stuntdouble-2.0.1/docs/_build/html/search.html +548 -0
  121. stuntdouble-2.0.1/docs/_build/html/searchindex.js +1 -0
  122. stuntdouble-2.0.1/docs/_static/stuntdouble_logo2.png +0 -0
  123. stuntdouble-2.0.1/docs/architecture/overview.md +408 -0
  124. stuntdouble-2.0.1/docs/conf.py +102 -0
  125. stuntdouble-2.0.1/docs/guides/call-recording.md +354 -0
  126. stuntdouble-2.0.1/docs/guides/context-aware-mocks.md +410 -0
  127. stuntdouble-2.0.1/docs/guides/langgraph-integration.md +1209 -0
  128. stuntdouble-2.0.1/docs/guides/matchers-and-resolvers.md +477 -0
  129. stuntdouble-2.0.1/docs/guides/mcp-mirroring.md +302 -0
  130. stuntdouble-2.0.1/docs/guides/mock-builder.md +390 -0
  131. stuntdouble-2.0.1/docs/guides/quickstart.md +622 -0
  132. stuntdouble-2.0.1/docs/guides/signature-validation.md +353 -0
  133. stuntdouble-2.0.1/docs/index.md +193 -0
  134. stuntdouble-2.0.1/docs/reference/dependencies.md +234 -0
  135. stuntdouble-2.0.1/docs/reference/mock-format.md +469 -0
  136. stuntdouble-2.0.1/docs/reference/schema-validation.md +130 -0
  137. stuntdouble-2.0.1/docs/requirements.txt +15 -0
  138. stuntdouble-2.0.1/docs/stuntdouble_logo.jpg +0 -0
  139. stuntdouble-2.0.1/docs/stuntdouble_logo2.png +0 -0
  140. stuntdouble-2.0.1/pyproject.toml +60 -0
  141. stuntdouble-2.0.1/src/stuntdouble/__init__.py +63 -0
  142. stuntdouble-2.0.1/src/stuntdouble/builder.py +151 -0
  143. stuntdouble-2.0.1/src/stuntdouble/config.py +157 -0
  144. stuntdouble-2.0.1/src/stuntdouble/exceptions.py +106 -0
  145. stuntdouble-2.0.1/src/stuntdouble/matching.py +227 -0
  146. stuntdouble-2.0.1/src/stuntdouble/mirroring/__init__.py +129 -0
  147. stuntdouble-2.0.1/src/stuntdouble/mirroring/cache.py +221 -0
  148. stuntdouble-2.0.1/src/stuntdouble/mirroring/discovery.py +223 -0
  149. stuntdouble-2.0.1/src/stuntdouble/mirroring/generation/__init__.py +56 -0
  150. stuntdouble-2.0.1/src/stuntdouble/mirroring/generation/base.py +333 -0
  151. stuntdouble-2.0.1/src/stuntdouble/mirroring/generation/entity.py +189 -0
  152. stuntdouble-2.0.1/src/stuntdouble/mirroring/generation/presets.py +201 -0
  153. stuntdouble-2.0.1/src/stuntdouble/mirroring/generation/responses.py +260 -0
  154. stuntdouble-2.0.1/src/stuntdouble/mirroring/integrations/__init__.py +15 -0
  155. stuntdouble-2.0.1/src/stuntdouble/mirroring/integrations/langchain.py +170 -0
  156. stuntdouble-2.0.1/src/stuntdouble/mirroring/integrations/llm.py +213 -0
  157. stuntdouble-2.0.1/src/stuntdouble/mirroring/mcp_client.py +935 -0
  158. stuntdouble-2.0.1/src/stuntdouble/mirroring/mcp_utils.py +106 -0
  159. stuntdouble-2.0.1/src/stuntdouble/mirroring/mirror.py +827 -0
  160. stuntdouble-2.0.1/src/stuntdouble/mirroring/mirror_registry.py +400 -0
  161. stuntdouble-2.0.1/src/stuntdouble/mirroring/models.py +409 -0
  162. stuntdouble-2.0.1/src/stuntdouble/mirroring/strategies.py +368 -0
  163. stuntdouble-2.0.1/src/stuntdouble/mock_registry.py +368 -0
  164. stuntdouble-2.0.1/src/stuntdouble/py.typed +0 -0
  165. stuntdouble-2.0.1/src/stuntdouble/recorder.py +521 -0
  166. stuntdouble-2.0.1/src/stuntdouble/resolving.py +510 -0
  167. stuntdouble-2.0.1/src/stuntdouble/scenario_mocking.py +210 -0
  168. stuntdouble-2.0.1/src/stuntdouble/types.py +107 -0
  169. stuntdouble-2.0.1/src/stuntdouble/validation.py +429 -0
  170. stuntdouble-2.0.1/src/stuntdouble/wrapper.py +336 -0
  171. stuntdouble-2.0.1/tests/conftest.py +59 -0
  172. stuntdouble-2.0.1/tests/mirroring/test_discovery.py +203 -0
  173. stuntdouble-2.0.1/tests/mirroring/test_langchain_adapter.py +259 -0
  174. stuntdouble-2.0.1/tests/mirroring/test_llm_provider.py +297 -0
  175. stuntdouble-2.0.1/tests/mirroring/test_mcp_client.py +334 -0
  176. stuntdouble-2.0.1/tests/mirroring/test_mirror.py +187 -0
  177. stuntdouble-2.0.1/tests/mirroring/test_mirror_registry.py +263 -0
  178. stuntdouble-2.0.1/tests/mirroring/test_mock_strategy_enum.py +155 -0
  179. stuntdouble-2.0.1/tests/mirroring/test_presets.py +193 -0
  180. stuntdouble-2.0.1/tests/mirroring/test_response_cache.py +431 -0
  181. stuntdouble-2.0.1/tests/mirroring/test_strategies.py +185 -0
  182. stuntdouble-2.0.1/tests/test_builder.py +188 -0
  183. stuntdouble-2.0.1/tests/test_config.py +294 -0
  184. stuntdouble-2.0.1/tests/test_exceptions.py +55 -0
  185. stuntdouble-2.0.1/tests/test_matching.py +180 -0
  186. stuntdouble-2.0.1/tests/test_mocking.py +289 -0
  187. stuntdouble-2.0.1/tests/test_recorder.py +559 -0
  188. stuntdouble-2.0.1/tests/test_resolving.py +436 -0
  189. stuntdouble-2.0.1/tests/test_scenario_mocking.py +514 -0
  190. stuntdouble-2.0.1/tests/test_validation.py +1043 -0
  191. stuntdouble-2.0.1/tests/test_wrapper.py +744 -0
  192. stuntdouble-2.0.1/tests-e2e/test_integration.py +506 -0
  193. stuntdouble-2.0.1/uv.lock +2556 -0
@@ -0,0 +1,10 @@
1
+ # List of source code paths and code owners
2
+ # For more information on the CODEOWNERS file go to:
3
+ # https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax
4
+
5
+ # Uncomment line 10 and add the correct owners's usernames.
6
+ # These owners will be the default owners for everything in
7
+ # the repo. Unless a later match takes precedence,
8
+ # @global-owner1 and @global-owner2 will be requested for
9
+ # review when someone opens a pull request.
10
+ * @bbenchaya
@@ -0,0 +1,15 @@
1
+ ### Checklist
2
+ 🚨 Please review this repository's [contribution guidelines](./CONTRIBUTING.md).
3
+
4
+ - [ ] I've read and agree to the project's contribution guidelines.
5
+ - [ ] I'm requesting to **pull a topic/feature/bugfix branch**.
6
+ - [ ] I checked that my code additions will pass code linting checks and unit tests.
7
+ - [ ] I updated unit and integration tests (if applicable).
8
+ - [ ] I'm ready to notify the team of this contribution.
9
+
10
+ ### Description
11
+ What does this change do and why?
12
+
13
+ Fixes #(issue number)
14
+
15
+ Thank you!
@@ -0,0 +1,67 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ concurrency:
10
+ group: ${{ github.workflow }}-${{ github.ref }}
11
+ cancel-in-progress: true
12
+
13
+ jobs:
14
+ lint:
15
+ name: Lint
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - uses: actions/checkout@v6
19
+
20
+ - name: Install uv
21
+ uses: astral-sh/setup-uv@v7
22
+
23
+ - name: Set up Python
24
+ run: uv python install 3.13
25
+
26
+ - name: Install dependencies
27
+ run: uv sync --all-extras --group dev
28
+
29
+ - name: Check formatting - lint (ruff)
30
+ run: uv run ruff check
31
+
32
+ test:
33
+ name: Test (Python ${{ matrix.python-version }})
34
+ runs-on: ubuntu-latest
35
+ strategy:
36
+ fail-fast: false
37
+ matrix:
38
+ python-version: ["3.12", "3.13"]
39
+ steps:
40
+ - uses: actions/checkout@v6
41
+
42
+ - name: Install uv
43
+ uses: astral-sh/setup-uv@v7
44
+
45
+ - name: Set up Python ${{ matrix.python-version }}
46
+ run: uv python install ${{ matrix.python-version }}
47
+
48
+ - name: Install dependencies
49
+ run: uv sync --all-extras --group dev
50
+
51
+ - name: Run tests with coverage
52
+ run: |
53
+ uv run pytest tests/ \
54
+ --color=yes \
55
+ --cov=src/stuntdouble \
56
+ --cov-report=term \
57
+ --cov-report=xml:coverage.xml \
58
+ --cov-fail-under=74 \
59
+ -v
60
+
61
+ - name: Upload coverage
62
+ if: matrix.python-version == '3.13'
63
+ uses: actions/upload-artifact@v7
64
+ with:
65
+ name: coverage-report
66
+ path: coverage.xml
67
+
@@ -0,0 +1,67 @@
1
+ name: Release
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ version:
7
+ description: "Version to release (e.g. 0.2.0)"
8
+ required: true
9
+ type: string
10
+ bump-type:
11
+ description: "Version bump type (used as label only)"
12
+ required: false
13
+ default: "patch"
14
+ type: choice
15
+ options: [patch, minor, major]
16
+
17
+ permissions:
18
+ contents: write
19
+ id-token: write # required for OIDC trusted publishing
20
+
21
+ jobs:
22
+ release:
23
+ name: Tag & Publish
24
+ runs-on: ubuntu-latest
25
+ environment: pypi
26
+
27
+ steps:
28
+ - uses: actions/checkout@v6
29
+ with:
30
+ fetch-depth: 0
31
+
32
+ - uses: astral-sh/setup-uv@v7
33
+ with:
34
+ enable-cache: true
35
+
36
+ - name: Install deps
37
+ run: uv sync --group dev
38
+
39
+ - name: Run tests before release
40
+ run: uv run pytest tests/
41
+
42
+ - name: bot login
43
+ run: |
44
+ git config user.name "github-actions[bot]"
45
+ git config user.email "github-actions[bot]@users.noreply.github.com"
46
+
47
+ - name: Create and push tag
48
+ run: |
49
+ TAG="v${{ github.event.inputs.version }}"
50
+ git tag "$TAG" -m "Release $TAG"
51
+ git push origin "$TAG"
52
+
53
+ - name: Build package
54
+ run: uv build
55
+
56
+ - name: Publish to PyPI
57
+ uses: pypa/gh-action-pypi-publish@release/v1
58
+ with:
59
+ packages-dir: dist/
60
+
61
+ - name: Create GitHub Release
62
+ uses: softprops/action-gh-release@v2
63
+ with:
64
+ tag_name: v${{ github.event.inputs.version }}
65
+ name: v${{ github.event.inputs.version }}
66
+ generate_release_notes: true
67
+ files: dist/*
@@ -0,0 +1,75 @@
1
+ # macOS
2
+ .DS_Store
3
+
4
+ # Byte-compiled / optimized / DLL files
5
+ __pycache__/
6
+ *.py[cod]
7
+ *$py.class
8
+ *.pyc
9
+
10
+ # C extensions
11
+ *.so
12
+
13
+ # Distribution / packaging
14
+ .Python
15
+ build/
16
+ develop-eggs/
17
+ dist/
18
+ downloads/
19
+ eggs/
20
+ .eggs/
21
+ lib/
22
+ lib64/
23
+ parts/
24
+ sdist/
25
+ var/
26
+ .claude
27
+ wheels/
28
+ *.egg-info/
29
+ .installed.cfg
30
+ *.egg
31
+
32
+ # Unit test / coverage reports
33
+ htmlcov/
34
+ htmlcov*/
35
+ .tox/
36
+ .nox/
37
+ .coverage
38
+ .coverage.*
39
+ .cache
40
+ nosetests.xml
41
+ coverage.xml
42
+ coverage*.xml
43
+ coverage.json
44
+ junit_results.xml
45
+ *.cover
46
+ .hypothesis/
47
+ .pytest_cache/
48
+ *.xml
49
+
50
+ # Virtual environments
51
+ venv/
52
+ ENV/
53
+ env/
54
+ .venv/
55
+ .env
56
+
57
+ # IDEs
58
+ .idea/
59
+ .vscode/
60
+ .cursor/
61
+ *.swp
62
+ *.swo
63
+ *~
64
+
65
+ # MyPy
66
+ .mypy_cache/
67
+ .dmypy.json
68
+ dmypy.json
69
+
70
+ # Ruff
71
+ .ruff_cache/
72
+
73
+ # Logs
74
+ *.log
75
+
@@ -0,0 +1,19 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ ## 0.1.0
6
+
7
+ Initial public release.
8
+
9
+ ### Features
10
+
11
+ - Per-invocation tool mocking via `MockToolsRegistry`
12
+ - Fluent mock builder API (`registry.mock("tool").returns(...)`)
13
+ - Data-driven mock factory with JSON scenario files
14
+ - Input matching with operator-based predicates
15
+ - Dynamic value resolution with placeholders
16
+ - Call recording for test assertions
17
+ - Mock signature validation against real tool schemas
18
+ - MCP tool mirroring (auto-discover and mock MCP server tools)
19
+ - LangGraph ToolNode integration via `create_mockable_tool_wrapper`
@@ -0,0 +1,31 @@
1
+ # StuntDouble
2
+
3
+ Tool mocking framework for AI agent testing, built for LangGraph.
4
+
5
+ ## Build & Test
6
+
7
+ ```bash
8
+ uv sync # Install deps
9
+ uv run pytest # Run unit tests
10
+ uv run pytest tests-e2e/ # Run e2e tests
11
+ uv run ruff check . # Lint
12
+ uv run ruff format . # Format
13
+ uv run mypy src/ # Type check
14
+ ```
15
+
16
+ ## Package Structure
17
+
18
+ - `src/stuntdouble/` — single flat namespace, all public exports in `__init__.py`
19
+ - `src/stuntdouble/mirroring/` — MCP tool mirroring subsystem
20
+ - `tests/` — unit tests
21
+ - `tests-e2e/` — end-to-end tests
22
+ - `docs/` — Sphinx documentation
23
+
24
+ ## Conventions
25
+
26
+ - Line length: 120 (ruff)
27
+ - Python: 3.11+
28
+ - Build: hatchling
29
+ - Package manager: uv
30
+ - All public API exported from `stuntdouble.__init__`
31
+ - No subpackage public APIs (import from `stuntdouble`, not `stuntdouble.X`)
@@ -0,0 +1,83 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or advances of any kind
22
+ * Trolling, insulting or derogatory comments, and personal or political attacks
23
+ * Public or private harassment
24
+ * Publishing others' private information, such as a physical or email address, without their explicit permission
25
+ * Other conduct which could reasonably be considered inappropriate in a professional setting
26
+
27
+ ## Enforcement Responsibilities
28
+
29
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
30
+
31
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
32
+
33
+ ## Scope
34
+
35
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
36
+
37
+ ## Enforcement
38
+
39
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at **stuntdouble@proton.me**. All complaints will be reviewed and investigated promptly and fairly.
40
+
41
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
42
+
43
+ ## Enforcement Guidelines
44
+
45
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
46
+
47
+ ### 1. Correction
48
+
49
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
50
+
51
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
52
+
53
+ ### 2. Warning
54
+
55
+ **Community Impact**: A violation through a single incident or series of actions.
56
+
57
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
58
+
59
+ ### 3. Temporary Ban
60
+
61
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
62
+
63
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
64
+
65
+ ### 4. Permanent Ban
66
+
67
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
68
+
69
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
70
+
71
+ ## Attribution
72
+
73
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
74
+
75
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
76
+
77
+ For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at [https://www.contributor-covenant.org/translations][translations].
78
+
79
+ [homepage]: https://www.contributor-covenant.org
80
+ [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
81
+ [Mozilla CoC]: https://github.com/mozilla/diversity
82
+ [FAQ]: https://www.contributor-covenant.org/faq
83
+ [translations]: https://www.contributor-covenant.org/translations
@@ -0,0 +1,80 @@
1
+ Contribution Guidelines
2
+ =======================
3
+
4
+ Great to have you here! Whether it's improving documentation, adding a new component, or reporting a bug, all contributions are welcome!
5
+
6
+ Please note that this project is released with a [Code of Conduct](./CODE_OF_CONDUCT.md). By participating, you agree to abide by its terms.
7
+
8
+ - [Contribution Expectations](#contribution-expectations)
9
+ - [Contribution Process](#contribution-process)
10
+ - [After Contribution is Merged](#after-contribution-is-merged)
11
+ - [Contact Information](#contact-information)
12
+
13
+ ## Contribution Expectations
14
+
15
+ #### Adding Functionality or Reporting Bugs
16
+ * Browse [open issues](https://github.com/stuntdouble/stuntdouble/issues) to find something to work on, or open a new issue to report a bug or suggest a feature.
17
+ * Bug reports should include as much detail as possible: logs, stacktraces, Python version, OS, and steps to reproduce.
18
+
19
+ #### Code Quality Expectations
20
+ - **Tests**: All new code should have corresponding unit tests (pytest)
21
+ - **Coverage**: Ensure that code coverage meets or exceeds 80%
22
+ - **Documentation**: Code should be well-documented. What code is doing should be self-explanatory based on coding conventions. Why code is doing something should be explained:
23
+ * Python code should have docstrings (Google style)
24
+ * `pyproject.toml` should have comments for non-obvious settings
25
+ * Unit tests should have clear names and docstrings
26
+ * Integration tests should document their scenarios
27
+ - **Code Style**: We follow PEP 8 conventions. Use `ruff` for formatting and linting. Run `uv run ruff check .` and `uv run ruff format --check .` to check compliance
28
+
29
+ #### Review SLAs
30
+ - Pull request reviews are targeted within 48 hours
31
+ - Maintainers will support contributors through code guidance and contribution recognition
32
+
33
+ ## Contribution Process
34
+
35
+ **All contributions should be done through a fork.**
36
+
37
+ 1. **Fork and Clone.** From the GitHub UI, fork the project into your user space. Then clone locally and add the upstream remote:
38
+ ```sh
39
+ git clone git@github.com:YOUR_USERNAME/stuntdouble.git
40
+ cd stuntdouble
41
+ git remote add upstream git@github.com:stuntdouble/stuntdouble.git
42
+ ```
43
+
44
+ 1. **Create a branch.** Use a descriptive name prefixed with `feature/` or `bugfix/` and the issue number:
45
+ ```sh
46
+ git checkout -b feature/123-add-conditional-matching
47
+ ```
48
+
49
+ 1. **Make your changes**, including documentation. Writing good commit logs is important. Follow the [Local Development](./README.md#getting-started-with-local-development) steps to get started.
50
+ ```text
51
+ A commit log should describe what changed and why.
52
+ Reference the GitHub issue number in the commit message (e.g., "Fixes #123").
53
+ ```
54
+
55
+ 1. **Test.** Bug fixes and features **should come with tests** and coverage should meet or exceed 80%. Make sure all tests pass. Please do not submit patches that fail this check.
56
+
57
+ 1. **Push your changes** to your fork's branch. Use `git rebase` (not `git merge`) to sync your work from time to time:
58
+ ```sh
59
+ git fetch upstream
60
+ git rebase upstream/main
61
+ git push origin name-of-your-branch
62
+ ```
63
+
64
+ 1. **Open a Pull Request** to the upstream repository. On your forked repo, click the "Pull Request" button and fill out the form.
65
+ 1. A PR will automatically trigger CI checks against your changes.
66
+ 1. Maintainers will review and may request changes or ask questions.
67
+
68
+ ## After Contribution is Merged
69
+
70
+ Once the PR is approved, a maintainer will merge it and you'll be credited as a contributor. New releases are published to PyPI periodically -- check the [CHANGELOG](./CHANGELOG.md) for release notes.
71
+
72
+ ## License
73
+
74
+ By contributing to StuntDouble, you agree that your contributions will be licensed under the [MIT License](./LICENSE).
75
+
76
+ ## Contact Information
77
+
78
+ * Need to get in contact with the maintainers? The best people to start with are the project [code owners](https://github.com/stuntdouble/stuntdouble/blob/main/CODEOWNERS).
79
+ * Open a [GitHub Discussion](https://github.com/stuntdouble/stuntdouble/discussions) for questions or ideas.
80
+ * File a [GitHub Issue](https://github.com/stuntdouble/stuntdouble/issues) for bugs or feature requests.
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 StuntDouble Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+