langadapter 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 (223) hide show
  1. langadapter-0.1.0/.gitignore +9 -0
  2. langadapter-0.1.0/CITATION.cff +21 -0
  3. langadapter-0.1.0/LICENSE +21 -0
  4. langadapter-0.1.0/PKG-INFO +176 -0
  5. langadapter-0.1.0/README.md +115 -0
  6. langadapter-0.1.0/THIRD_PARTY_NOTICES.md +171 -0
  7. langadapter-0.1.0/docs/changelog.md +213 -0
  8. langadapter-0.1.0/docs/explanation/environment-selection.md +144 -0
  9. langadapter-0.1.0/docs/explanation/outcomes.md +44 -0
  10. langadapter-0.1.0/docs/explanation/prepared-copies.md +244 -0
  11. langadapter-0.1.0/docs/extending/add-a-language.md +3265 -0
  12. langadapter-0.1.0/docs/extending/architecture.md +92 -0
  13. langadapter-0.1.0/docs/extending/conformance.md +196 -0
  14. langadapter-0.1.0/docs/extending/consumer-requirements.md +195 -0
  15. langadapter-0.1.0/docs/extending/index.md +44 -0
  16. langadapter-0.1.0/docs/extending/metric-provider.md +133 -0
  17. langadapter-0.1.0/docs/extending/who-needs-what.md +208 -0
  18. langadapter-0.1.0/docs/getting-started.md +194 -0
  19. langadapter-0.1.0/docs/guide/c.md +344 -0
  20. langadapter-0.1.0/docs/guide/containers.md +110 -0
  21. langadapter-0.1.0/docs/guide/java.md +123 -0
  22. langadapter-0.1.0/docs/guide/mutation-sessions.md +252 -0
  23. langadapter-0.1.0/docs/guide/python.md +143 -0
  24. langadapter-0.1.0/docs/guide/settings.md +165 -0
  25. langadapter-0.1.0/docs/guide/source-analysis.md +279 -0
  26. langadapter-0.1.0/docs/guide/timing.md +111 -0
  27. langadapter-0.1.0/docs/guide/toolchains.md +184 -0
  28. langadapter-0.1.0/docs/index.md +1 -0
  29. langadapter-0.1.0/docs/reference/c.md +7 -0
  30. langadapter-0.1.0/docs/reference/cli.md +69 -0
  31. langadapter-0.1.0/docs/reference/core.md +13 -0
  32. langadapter-0.1.0/docs/reference/extending.md +33 -0
  33. langadapter-0.1.0/docs/reference/hooks.md +1399 -0
  34. langadapter-0.1.0/docs/reference/index.md +35 -0
  35. langadapter-0.1.0/docs/reference/java.md +36 -0
  36. langadapter-0.1.0/docs/reference/mutation.md +3 -0
  37. langadapter-0.1.0/docs/reference/outcomes.md +5 -0
  38. langadapter-0.1.0/docs/reference/placement.md +3 -0
  39. langadapter-0.1.0/docs/reference/python.md +42 -0
  40. langadapter-0.1.0/docs/reference/resources.md +9 -0
  41. langadapter-0.1.0/docs/reference/runs.md +3 -0
  42. langadapter-0.1.0/docs/reference/setup.md +9 -0
  43. langadapter-0.1.0/docs/reference/sources.md +7 -0
  44. langadapter-0.1.0/docs/reference/tested-environments.md +148 -0
  45. langadapter-0.1.0/examples/metric_provider.py +74 -0
  46. langadapter-0.1.0/examples/python_mutation.py +58 -0
  47. langadapter-0.1.0/examples/python_suite.py +57 -0
  48. langadapter-0.1.0/examples/toy_adapter.py +219 -0
  49. langadapter-0.1.0/mkdocs.yml +88 -0
  50. langadapter-0.1.0/pyproject.toml +161 -0
  51. langadapter-0.1.0/src/langadapter/__init__.py +76 -0
  52. langadapter-0.1.0/src/langadapter/_environment.py +71 -0
  53. langadapter-0.1.0/src/langadapter/_execution_scope.py +441 -0
  54. langadapter-0.1.0/src/langadapter/_host.py +73 -0
  55. langadapter-0.1.0/src/langadapter/_input_copy.py +86 -0
  56. langadapter-0.1.0/src/langadapter/_linux_command.py +795 -0
  57. langadapter-0.1.0/src/langadapter/_linux_container.py +142 -0
  58. langadapter-0.1.0/src/langadapter/_linux_job.py +633 -0
  59. langadapter-0.1.0/src/langadapter/_lizard.py +42 -0
  60. langadapter-0.1.0/src/langadapter/_owned_directory.py +243 -0
  61. langadapter-0.1.0/src/langadapter/_prepared_copy.py +703 -0
  62. langadapter-0.1.0/src/langadapter/_process_tree.py +707 -0
  63. langadapter-0.1.0/src/langadapter/_project_environments.py +201 -0
  64. langadapter-0.1.0/src/langadapter/_treesitter.py +565 -0
  65. langadapter-0.1.0/src/langadapter/_windows_job.py +220 -0
  66. langadapter-0.1.0/src/langadapter/_words.py +17 -0
  67. langadapter-0.1.0/src/langadapter/adapter.py +915 -0
  68. langadapter-0.1.0/src/langadapter/c/__init__.py +3 -0
  69. langadapter-0.1.0/src/langadapter/c/_build.py +844 -0
  70. langadapter-0.1.0/src/langadapter/c/_ctest.py +278 -0
  71. langadapter-0.1.0/src/langadapter/c/_extension.py +224 -0
  72. langadapter-0.1.0/src/langadapter/c/_extension_policy.py +145 -0
  73. langadapter-0.1.0/src/langadapter/c/_gcov.py +273 -0
  74. langadapter-0.1.0/src/langadapter/c/_merge.py +360 -0
  75. langadapter-0.1.0/src/langadapter/c/_mull.py +167 -0
  76. langadapter-0.1.0/src/langadapter/c/_mutation.py +1043 -0
  77. langadapter-0.1.0/src/langadapter/c/_pool.py +88 -0
  78. langadapter-0.1.0/src/langadapter/c/_programs.py +52 -0
  79. langadapter-0.1.0/src/langadapter/c/_pytest_plugin.py +166 -0
  80. langadapter-0.1.0/src/langadapter/c/_recorder.py +175 -0
  81. langadapter-0.1.0/src/langadapter/c/_repair.py +158 -0
  82. langadapter-0.1.0/src/langadapter/c/_sitecustomize.py +29 -0
  83. langadapter-0.1.0/src/langadapter/c/_structure.py +183 -0
  84. langadapter-0.1.0/src/langadapter/c/_syntax.py +230 -0
  85. langadapter-0.1.0/src/langadapter/c/_timing.py +206 -0
  86. langadapter-0.1.0/src/langadapter/c/_toolchain.py +118 -0
  87. langadapter-0.1.0/src/langadapter/c/_utest.py +453 -0
  88. langadapter-0.1.0/src/langadapter/c/_validity.py +210 -0
  89. langadapter-0.1.0/src/langadapter/c/adapter.py +2970 -0
  90. langadapter-0.1.0/src/langadapter/c/data/counters.c +59 -0
  91. langadapter-0.1.0/src/langadapter/c/data/gcov_exports.c +17 -0
  92. langadapter-0.1.0/src/langadapter/c/data/utest.h +2050 -0
  93. langadapter-0.1.0/src/langadapter/c/data/utest_skip.c +21 -0
  94. langadapter-0.1.0/src/langadapter/cancellation.py +62 -0
  95. langadapter-0.1.0/src/langadapter/capabilities.py +276 -0
  96. langadapter-0.1.0/src/langadapter/check.py +818 -0
  97. langadapter-0.1.0/src/langadapter/cli.py +701 -0
  98. langadapter-0.1.0/src/langadapter/conformance.py +456 -0
  99. langadapter-0.1.0/src/langadapter/consumers.py +549 -0
  100. langadapter-0.1.0/src/langadapter/context.py +515 -0
  101. langadapter-0.1.0/src/langadapter/errors.py +111 -0
  102. langadapter-0.1.0/src/langadapter/execution.py +581 -0
  103. langadapter-0.1.0/src/langadapter/hooks.py +839 -0
  104. langadapter-0.1.0/src/langadapter/java/__init__.py +4 -0
  105. langadapter-0.1.0/src/langadapter/java/_benchmark.py +225 -0
  106. langadapter-0.1.0/src/langadapter/java/_build.py +887 -0
  107. langadapter-0.1.0/src/langadapter/java/_collisions.py +602 -0
  108. langadapter-0.1.0/src/langadapter/java/_env.py +305 -0
  109. langadapter-0.1.0/src/langadapter/java/_jacoco.py +623 -0
  110. langadapter-0.1.0/src/langadapter/java/_java_source.py +63 -0
  111. langadapter-0.1.0/src/langadapter/java/_mutation.py +474 -0
  112. langadapter-0.1.0/src/langadapter/java/_pit.py +537 -0
  113. langadapter-0.1.0/src/langadapter/java/_policy.py +5 -0
  114. langadapter-0.1.0/src/langadapter/java/_profile.py +166 -0
  115. langadapter-0.1.0/src/langadapter/java/_questions.py +101 -0
  116. langadapter-0.1.0/src/langadapter/java/_runs.py +887 -0
  117. langadapter-0.1.0/src/langadapter/java/_setup.py +715 -0
  118. langadapter-0.1.0/src/langadapter/java/_sources.py +1294 -0
  119. langadapter-0.1.0/src/langadapter/java/_tools.py +586 -0
  120. langadapter-0.1.0/src/langadapter/java/_validity.py +215 -0
  121. langadapter-0.1.0/src/langadapter/java/_warmed.py +772 -0
  122. langadapter-0.1.0/src/langadapter/java/_warmed_fork.py +707 -0
  123. langadapter-0.1.0/src/langadapter/java/adapter.py +1238 -0
  124. langadapter-0.1.0/src/langadapter/java/source_analysis.py +362 -0
  125. langadapter-0.1.0/src/langadapter/mutation/__init__.py +2132 -0
  126. langadapter-0.1.0/src/langadapter/operations.py +1095 -0
  127. langadapter-0.1.0/src/langadapter/outcomes.py +198 -0
  128. langadapter-0.1.0/src/langadapter/placement.py +43 -0
  129. langadapter-0.1.0/src/langadapter/preparation.py +786 -0
  130. langadapter-0.1.0/src/langadapter/py.typed +0 -0
  131. langadapter-0.1.0/src/langadapter/python/__init__.py +14 -0
  132. langadapter-0.1.0/src/langadapter/python/_bytecode_helper.py +163 -0
  133. langadapter-0.1.0/src/langadapter/python/_collisions.py +1210 -0
  134. langadapter-0.1.0/src/langadapter/python/_cosmic_ray.py +3833 -0
  135. langadapter-0.1.0/src/langadapter/python/_cr_session_runner.py +1145 -0
  136. langadapter-0.1.0/src/langadapter/python/_cr_verify.py +1109 -0
  137. langadapter-0.1.0/src/langadapter/python/_mutation.py +514 -0
  138. langadapter-0.1.0/src/langadapter/python/_output.py +198 -0
  139. langadapter-0.1.0/src/langadapter/python/_plugins.py +1327 -0
  140. langadapter-0.1.0/src/langadapter/python/_profile.py +155 -0
  141. langadapter-0.1.0/src/langadapter/python/_project_files.py +206 -0
  142. langadapter-0.1.0/src/langadapter/python/_provision.py +149 -0
  143. langadapter-0.1.0/src/langadapter/python/_questions.py +135 -0
  144. langadapter-0.1.0/src/langadapter/python/_run_definition.py +112 -0
  145. langadapter-0.1.0/src/langadapter/python/_runs.py +2153 -0
  146. langadapter-0.1.0/src/langadapter/python/_setup.py +625 -0
  147. langadapter-0.1.0/src/langadapter/python/_sources.py +2467 -0
  148. langadapter-0.1.0/src/langadapter/python/_syntax.py +100 -0
  149. langadapter-0.1.0/src/langadapter/python/_validity.py +890 -0
  150. langadapter-0.1.0/src/langadapter/python/adapter.py +1204 -0
  151. langadapter-0.1.0/src/langadapter/python/cosmic_ray.py +175 -0
  152. langadapter-0.1.0/src/langadapter/python/project.py +690 -0
  153. langadapter-0.1.0/src/langadapter/python/source_analysis.py +336 -0
  154. langadapter-0.1.0/src/langadapter/registry.py +379 -0
  155. langadapter-0.1.0/src/langadapter/resources.py +101 -0
  156. langadapter-0.1.0/src/langadapter/runs.py +1461 -0
  157. langadapter-0.1.0/src/langadapter/setup.py +599 -0
  158. langadapter-0.1.0/src/langadapter/skeletons/benchmark.txt +3 -0
  159. langadapter-0.1.0/src/langadapter/skeletons/call_statistics.txt +4 -0
  160. langadapter-0.1.0/src/langadapter/skeletons/capabilities.txt +5 -0
  161. langadapter-0.1.0/src/langadapter/skeletons/check_syntax.txt +4 -0
  162. langadapter-0.1.0/src/langadapter/skeletons/choose_profile.txt +5 -0
  163. langadapter-0.1.0/src/langadapter/skeletons/code_smells.txt +3 -0
  164. langadapter-0.1.0/src/langadapter/skeletons/coverage.txt +3 -0
  165. langadapter-0.1.0/src/langadapter/skeletons/coverage_texts.txt +8 -0
  166. langadapter-0.1.0/src/langadapter/skeletons/delivered_case.txt +4 -0
  167. langadapter-0.1.0/src/langadapter/skeletons/discover_runtime.txt +7 -0
  168. langadapter-0.1.0/src/langadapter/skeletons/execution_kinds.txt +4 -0
  169. langadapter-0.1.0/src/langadapter/skeletons/execution_setup_issue.txt +4 -0
  170. langadapter-0.1.0/src/langadapter/skeletons/import_statement.txt +5 -0
  171. langadapter-0.1.0/src/langadapter/skeletons/kill_attribution.txt +3 -0
  172. langadapter-0.1.0/src/langadapter/skeletons/kill_tokens.txt +10 -0
  173. langadapter-0.1.0/src/langadapter/skeletons/language_facts.txt +7 -0
  174. langadapter-0.1.0/src/langadapter/skeletons/merge_sources.txt +3 -0
  175. langadapter-0.1.0/src/langadapter/skeletons/metric_providers.txt +4 -0
  176. langadapter-0.1.0/src/langadapter/skeletons/open_mutation_session.txt +11 -0
  177. langadapter-0.1.0/src/langadapter/skeletons/operation_context_issue.txt +4 -0
  178. langadapter-0.1.0/src/langadapter/skeletons/operation_readiness.txt +5 -0
  179. langadapter-0.1.0/src/langadapter/skeletons/order_dependent_mock_warnings.txt +5 -0
  180. langadapter-0.1.0/src/langadapter/skeletons/per_test_evidence.txt +3 -0
  181. langadapter-0.1.0/src/langadapter/skeletons/prepare_suite.txt +7 -0
  182. langadapter-0.1.0/src/langadapter/skeletons/profile_suite.txt +4 -0
  183. langadapter-0.1.0/src/langadapter/skeletons/project.txt +5 -0
  184. langadapter-0.1.0/src/langadapter/skeletons/project_test_files.txt +4 -0
  185. langadapter-0.1.0/src/langadapter/skeletons/provision_runtime.txt +6 -0
  186. langadapter-0.1.0/src/langadapter/skeletons/prune_collection_breakers.txt +5 -0
  187. langadapter-0.1.0/src/langadapter/skeletons/prune_unresolvable_imports.txt +5 -0
  188. langadapter-0.1.0/src/langadapter/skeletons/request_options.txt +8 -0
  189. langadapter-0.1.0/src/langadapter/skeletons/run_as_delivered.txt +5 -0
  190. langadapter-0.1.0/src/langadapter/skeletons/run_counts.txt +4 -0
  191. langadapter-0.1.0/src/langadapter/skeletons/run_suite.txt +7 -0
  192. langadapter-0.1.0/src/langadapter/skeletons/salvage_syntax.txt +5 -0
  193. langadapter-0.1.0/src/langadapter/skeletons/scoped_metrics.txt +5 -0
  194. langadapter-0.1.0/src/langadapter/skeletons/setup_files.txt +8 -0
  195. langadapter-0.1.0/src/langadapter/skeletons/setup_questions.txt +8 -0
  196. langadapter-0.1.0/src/langadapter/skeletons/strip_module_level_skips.txt +3 -0
  197. langadapter-0.1.0/src/langadapter/skeletons/structural_metrics.txt +11 -0
  198. langadapter-0.1.0/src/langadapter/skeletons/test_files.txt +4 -0
  199. langadapter-0.1.0/src/langadapter/skeletons/test_units.txt +5 -0
  200. langadapter-0.1.0/src/langadapter/skeletons/validate_mutation_session_options.txt +5 -0
  201. langadapter-0.1.0/src/langadapter/skeletons/validity_policy.txt +9 -0
  202. langadapter-0.1.0/src/langadapter/sources.py +1243 -0
  203. langadapter-0.1.0/src/langadapter/suites.py +193 -0
  204. langadapter-0.1.0/src/langadapter/templates.py +199 -0
  205. langadapter-0.1.0/src/langadapter/toolchains/__init__.py +147 -0
  206. langadapter-0.1.0/src/langadapter/toolchains/c.ubuntu-24.04.sh +149 -0
  207. langadapter-0.1.0/src/langadapter/toolchains/java.ubuntu-24.04.sh +146 -0
  208. langadapter-0.1.0/src/langadapter/toolchains/python.ubuntu-24.04.sh +103 -0
  209. langadapter-0.1.0/src/langadapter/treesitter.py +212 -0
  210. langadapter-0.1.0/src/langadapter/tutorial/__init__.py +413 -0
  211. langadapter-0.1.0/src/langadapter/tutorial/example/__init__.py +3 -0
  212. langadapter-0.1.0/src/langadapter/tutorial/example/project/calc.toy +4 -0
  213. langadapter-0.1.0/src/langadapter/tutorial/example/project/test_calc.toy +5 -0
  214. langadapter-0.1.0/src/langadapter/tutorial/example/steps/01_run_tests.py +179 -0
  215. langadapter-0.1.0/src/langadapter/tutorial/example/steps/02_test_units.py +197 -0
  216. langadapter-0.1.0/src/langadapter/tutorial/example/steps/03_coverage.py +287 -0
  217. langadapter-0.1.0/src/langadapter/tutorial/example/steps/04_mutation.py +381 -0
  218. langadapter-0.1.0/src/langadapter/tutorial/example/steps/05_load_repair.py +412 -0
  219. langadapter-0.1.0/src/langadapter/tutorial/example/steps/06_versions.py +417 -0
  220. langadapter-0.1.0/src/langadapter/tutorial/example/tools.py +259 -0
  221. langadapter-0.1.0/src/langadapter/tutorial/language.py +254 -0
  222. langadapter-0.1.0/src/langadapter/versions.py +264 -0
  223. langadapter-0.1.0/src/langadapter/vocabulary.py +80 -0
@@ -0,0 +1,9 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ .pytest_cache/
4
+ .ruff_cache/
5
+ .coverage*
6
+ .venv/
7
+ *.egg-info/
8
+ build/
9
+ dist/
@@ -0,0 +1,21 @@
1
+ cff-version: 1.2.0
2
+ message: "If you use LangAdapter, please cite it as below."
3
+ type: software
4
+ title: "LangAdapter"
5
+ abstract: >-
6
+ LangAdapter runs a project's own test, coverage, mutation and timing tools
7
+ and reports what they observed as typed results, for Python, Java and C
8
+ projects.
9
+ authors:
10
+ - family-names: Kammler
11
+ given-names: Kevin
12
+ license: MIT
13
+ version: 0.1.0
14
+ repository-code: "https://github.com/k-kammler/langadapter"
15
+ keywords:
16
+ - testing
17
+ - test execution
18
+ - coverage
19
+ - mutation testing
20
+ - pytest
21
+ - junit
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Kevin Kammler
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.
@@ -0,0 +1,176 @@
1
+ Metadata-Version: 2.5
2
+ Name: langadapter
3
+ Version: 0.1.0
4
+ Summary: Test execution, coverage, mutation and timing observations for a configured project
5
+ Project-URL: Homepage, https://github.com/k-kammler/langadapter
6
+ Project-URL: Repository, https://github.com/k-kammler/langadapter
7
+ Project-URL: Documentation, https://k-kammler.github.io/langadapter/
8
+ Project-URL: Issues, https://github.com/k-kammler/langadapter/issues
9
+ Author: Kevin Kammler
10
+ License-Expression: MIT
11
+ License-File: LICENSE
12
+ License-File: THIRD_PARTY_NOTICES.md
13
+ Keywords: coverage,junit,mutation-testing,pytest,test-execution,testing
14
+ Classifier: Development Status :: 3 - Alpha
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Intended Audience :: Science/Research
17
+ Classifier: Operating System :: Microsoft :: Windows
18
+ Classifier: Operating System :: POSIX :: Linux
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3 :: Only
21
+ Classifier: Programming Language :: Python :: 3.10
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Programming Language :: Python :: 3.13
25
+ Classifier: Programming Language :: Python :: 3.14
26
+ Classifier: Topic :: Software Development :: Quality Assurance
27
+ Classifier: Topic :: Software Development :: Testing
28
+ Classifier: Typing :: Typed
29
+ Requires-Python: >=3.10
30
+ Requires-Dist: lizard<2,>=1.17
31
+ Requires-Dist: packaging>=22
32
+ Requires-Dist: tomli-w<2,>=1.0
33
+ Requires-Dist: tree-sitter-java<0.24,>=0.23.5
34
+ Requires-Dist: tree-sitter-python<0.26,>=0.25
35
+ Requires-Dist: tree-sitter<0.26,>=0.25
36
+ Provides-Extra: c
37
+ Requires-Dist: gcovr<9,>=8.7; extra == 'c'
38
+ Requires-Dist: setuptools>=70; extra == 'c'
39
+ Requires-Dist: tree-sitter-c<0.25,>=0.24.2; extra == 'c'
40
+ Provides-Extra: dev
41
+ Requires-Dist: anyio<5,>=4; extra == 'dev'
42
+ Requires-Dist: build>=1.0; extra == 'dev'
43
+ Requires-Dist: coverage==7.16.2; (python_version >= '3.14') and extra == 'dev'
44
+ Requires-Dist: coverage==7.6.8; (python_version < '3.14') and extra == 'dev'
45
+ Requires-Dist: gcovr<9,>=8.7; extra == 'dev'
46
+ Requires-Dist: pytest-benchmark<6,>=5; extra == 'dev'
47
+ Requires-Dist: pytest-cov<7,>=6; extra == 'dev'
48
+ Requires-Dist: pytest-xdist<4,>=3; extra == 'dev'
49
+ Requires-Dist: pytest==8.1.1; (python_version < '3.14') and extra == 'dev'
50
+ Requires-Dist: pytest==8.4.2; (python_version >= '3.14') and extra == 'dev'
51
+ Requires-Dist: ruff<1,>=0.16; extra == 'dev'
52
+ Requires-Dist: setuptools>=70; extra == 'dev'
53
+ Requires-Dist: tree-sitter-c<0.25,>=0.24.2; extra == 'dev'
54
+ Provides-Extra: docs
55
+ Requires-Dist: griffe-sphinx<0.4,>=0.3.1; extra == 'docs'
56
+ Requires-Dist: mkdocs-material<10,>=9.5; extra == 'docs'
57
+ Requires-Dist: mkdocs<2,>=1.6; extra == 'docs'
58
+ Requires-Dist: mkdocstrings[python]<1,>=0.26; extra == 'docs'
59
+ Requires-Dist: pymdown-extensions<12,>=10; extra == 'docs'
60
+ Description-Content-Type: text/markdown
61
+
62
+ # LangAdapter
63
+
64
+ [![PyPI version](https://img.shields.io/pypi/v/langadapter)](https://pypi.org/project/langadapter/)
65
+ [![Python versions](https://img.shields.io/pypi/pyversions/langadapter)](https://pypi.org/project/langadapter/)
66
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue)](https://github.com/k-kammler/langadapter/blob/main/LICENSE)
67
+ [![Documentation](https://github.com/k-kammler/langadapter/actions/workflows/docs.yml/badge.svg)](https://k-kammler.github.io/langadapter/)
68
+
69
+ LangAdapter runs a project's own test, coverage, mutation and timing tools
70
+ and reports what they observed as typed results. It supports Python and Java
71
+ projects, locally and in a running Linux container you provide, and C projects
72
+ on Linux. It works with any test suite, written by people or generated, and
73
+ needs no model access.
74
+
75
+ ## Install
76
+
77
+ The library needs Python 3.10 or newer. It is supported on Windows and
78
+ Linux, the systems where it confirms that a command and everything it
79
+ started have ended. On macOS it is expected to work, but this release has
80
+ not run on a Mac:
81
+ [Tested environments](https://k-kammler.github.io/langadapter/reference/tested-environments/)
82
+ says what is known. On macOS and other POSIX systems it runs each command
83
+ in its own process group and cannot confirm that every descendant ended, so
84
+ it warns and records that in its observations. Install it into the Python
85
+ environment of the program that uses it, such as a virtual environment.
86
+ On Ubuntu 24.04, also in WSL, Python is `python3`, and a virtual
87
+ environment needs the package `python3-venv`:
88
+
89
+ ```
90
+ sudo apt-get install python3-venv
91
+ python3 -m venv .venv
92
+ .venv/bin/python -m pip install langadapter
93
+ ```
94
+
95
+ On Windows:
96
+
97
+ ```
98
+ py -m venv .venv
99
+ .venv\Scripts\python -m pip install langadapter
100
+ ```
101
+
102
+ In a source checkout, `.venv/bin/python -m pip install .` installs it from
103
+ the checkout. For C projects, install it with the extra for C:
104
+ `.venv/bin/python -m pip install "langadapter[c]"`. On Windows the
105
+ environment's Python is `.venv\Scripts\python`.
106
+
107
+ The project under test keeps its own runtime and tools, which
108
+ [Getting started](https://k-kammler.github.io/langadapter/getting-started/)
109
+ names for each language. On Ubuntu 24.04 on x86_64, `langadapter toolchains`
110
+ installs them, as
111
+ [Install the toolchains](https://k-kammler.github.io/langadapter/guide/toolchains/)
112
+ describes.
113
+
114
+ ## Example
115
+
116
+ Run a Python project's tests with the project's interpreter and read the
117
+ result:
118
+
119
+ ```python
120
+ import langadapter as la
121
+ from langadapter.runs import SuiteRunRequest
122
+
123
+ project = "path/to/project"
124
+ project_python = "path/to/project/.venv/bin/python" # path/to/project/.venv/Scripts/python.exe on Windows
125
+ context = la.ProjectContext(root=project, interpreter=la.Interpreter(path=project_python))
126
+ adapter = la.create("python", context)
127
+ suite = la.Suite(project, ("tests/test_example.py",))
128
+ result = adapter.tests.run_suite(SuiteRunRequest(suite, timeout_s=120))
129
+ print(result.outcome, result.counts.passed, "passed")
130
+ ```
131
+
132
+ If the project has a `conftest.py` in its directory or in `tests`, list it as a
133
+ setup file, for example
134
+ `la.Suite(project, ("tests/test_example.py",), ("tests/conftest.py",))`. A run
135
+ refuses a suite that leaves out a setup file pytest would load.
136
+
137
+ Every result carries an outcome such as `completed`, `test_failures`,
138
+ `missing_setup` or `unsupported`, and a reason, as
139
+ [Outcomes](https://k-kammler.github.io/langadapter/explanation/outcomes/)
140
+ describes.
141
+
142
+ ## Documentation
143
+
144
+ The documentation site is <https://k-kammler.github.io/langadapter/>.
145
+
146
+ - [Getting started](https://k-kammler.github.io/langadapter/getting-started/):
147
+ install, run a suite and read its result. Start here.
148
+ - [Python](https://k-kammler.github.io/langadapter/guide/python/),
149
+ [Java](https://k-kammler.github.io/langadapter/guide/java/) and
150
+ [C](https://k-kammler.github.io/langadapter/guide/c/) projects: the guide
151
+ for each language.
152
+ - [Mutation sessions](https://k-kammler.github.io/langadapter/guide/mutation-sessions/)
153
+ and [timing](https://k-kammler.github.io/langadapter/guide/timing/): a
154
+ suite measured against the mutants of one source file, and timed.
155
+ - [Extension points](https://k-kammler.github.io/langadapter/extending/):
156
+ extending the library at each of them, such as a new language adapter or
157
+ metric provider, with
158
+ [Add a language](https://k-kammler.github.io/langadapter/extending/add-a-language/).
159
+ - [API reference](https://k-kammler.github.io/langadapter/reference/): generated
160
+ from the modules and their docstrings.
161
+
162
+ The guides also cover containers, source analysis and settings, and the
163
+ explanations cover outcomes, prepared copies of a project and environment
164
+ selection. The guides are also in the repository's
165
+ [docs directory](https://github.com/k-kammler/langadapter/tree/v0.1.0/docs)
166
+ and installed with the package under `share/doc/langadapter/docs`, without
167
+ the API reference, which is on the site only: in the installed copy,
168
+ Python's `help()` shows each name's documentation. Building the site
169
+ yourself is described in
170
+ [CONTRIBUTING.md](https://github.com/k-kammler/langadapter/blob/v0.1.0/CONTRIBUTING.md).
171
+ What the library depends on and downloads, with each license, is in
172
+ [THIRD_PARTY_NOTICES.md](https://github.com/k-kammler/langadapter/blob/v0.1.0/THIRD_PARTY_NOTICES.md).
173
+
174
+ ## License
175
+
176
+ MIT, see [LICENSE](https://github.com/k-kammler/langadapter/blob/v0.1.0/LICENSE).
@@ -0,0 +1,115 @@
1
+ # LangAdapter
2
+
3
+ [![PyPI version](https://img.shields.io/pypi/v/langadapter)](https://pypi.org/project/langadapter/)
4
+ [![Python versions](https://img.shields.io/pypi/pyversions/langadapter)](https://pypi.org/project/langadapter/)
5
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue)](https://github.com/k-kammler/langadapter/blob/main/LICENSE)
6
+ [![Documentation](https://github.com/k-kammler/langadapter/actions/workflows/docs.yml/badge.svg)](https://k-kammler.github.io/langadapter/)
7
+
8
+ LangAdapter runs a project's own test, coverage, mutation and timing tools
9
+ and reports what they observed as typed results. It supports Python and Java
10
+ projects, locally and in a running Linux container you provide, and C projects
11
+ on Linux. It works with any test suite, written by people or generated, and
12
+ needs no model access.
13
+
14
+ ## Install
15
+
16
+ The library needs Python 3.10 or newer. It is supported on Windows and
17
+ Linux, the systems where it confirms that a command and everything it
18
+ started have ended. On macOS it is expected to work, but this release has
19
+ not run on a Mac:
20
+ [Tested environments](https://k-kammler.github.io/langadapter/reference/tested-environments/)
21
+ says what is known. On macOS and other POSIX systems it runs each command
22
+ in its own process group and cannot confirm that every descendant ended, so
23
+ it warns and records that in its observations. Install it into the Python
24
+ environment of the program that uses it, such as a virtual environment.
25
+ On Ubuntu 24.04, also in WSL, Python is `python3`, and a virtual
26
+ environment needs the package `python3-venv`:
27
+
28
+ ```
29
+ sudo apt-get install python3-venv
30
+ python3 -m venv .venv
31
+ .venv/bin/python -m pip install langadapter
32
+ ```
33
+
34
+ On Windows:
35
+
36
+ ```
37
+ py -m venv .venv
38
+ .venv\Scripts\python -m pip install langadapter
39
+ ```
40
+
41
+ In a source checkout, `.venv/bin/python -m pip install .` installs it from
42
+ the checkout. For C projects, install it with the extra for C:
43
+ `.venv/bin/python -m pip install "langadapter[c]"`. On Windows the
44
+ environment's Python is `.venv\Scripts\python`.
45
+
46
+ The project under test keeps its own runtime and tools, which
47
+ [Getting started](https://k-kammler.github.io/langadapter/getting-started/)
48
+ names for each language. On Ubuntu 24.04 on x86_64, `langadapter toolchains`
49
+ installs them, as
50
+ [Install the toolchains](https://k-kammler.github.io/langadapter/guide/toolchains/)
51
+ describes.
52
+
53
+ ## Example
54
+
55
+ Run a Python project's tests with the project's interpreter and read the
56
+ result:
57
+
58
+ ```python
59
+ import langadapter as la
60
+ from langadapter.runs import SuiteRunRequest
61
+
62
+ project = "path/to/project"
63
+ project_python = "path/to/project/.venv/bin/python" # path/to/project/.venv/Scripts/python.exe on Windows
64
+ context = la.ProjectContext(root=project, interpreter=la.Interpreter(path=project_python))
65
+ adapter = la.create("python", context)
66
+ suite = la.Suite(project, ("tests/test_example.py",))
67
+ result = adapter.tests.run_suite(SuiteRunRequest(suite, timeout_s=120))
68
+ print(result.outcome, result.counts.passed, "passed")
69
+ ```
70
+
71
+ If the project has a `conftest.py` in its directory or in `tests`, list it as a
72
+ setup file, for example
73
+ `la.Suite(project, ("tests/test_example.py",), ("tests/conftest.py",))`. A run
74
+ refuses a suite that leaves out a setup file pytest would load.
75
+
76
+ Every result carries an outcome such as `completed`, `test_failures`,
77
+ `missing_setup` or `unsupported`, and a reason, as
78
+ [Outcomes](https://k-kammler.github.io/langadapter/explanation/outcomes/)
79
+ describes.
80
+
81
+ ## Documentation
82
+
83
+ The documentation site is <https://k-kammler.github.io/langadapter/>.
84
+
85
+ - [Getting started](https://k-kammler.github.io/langadapter/getting-started/):
86
+ install, run a suite and read its result. Start here.
87
+ - [Python](https://k-kammler.github.io/langadapter/guide/python/),
88
+ [Java](https://k-kammler.github.io/langadapter/guide/java/) and
89
+ [C](https://k-kammler.github.io/langadapter/guide/c/) projects: the guide
90
+ for each language.
91
+ - [Mutation sessions](https://k-kammler.github.io/langadapter/guide/mutation-sessions/)
92
+ and [timing](https://k-kammler.github.io/langadapter/guide/timing/): a
93
+ suite measured against the mutants of one source file, and timed.
94
+ - [Extension points](https://k-kammler.github.io/langadapter/extending/):
95
+ extending the library at each of them, such as a new language adapter or
96
+ metric provider, with
97
+ [Add a language](https://k-kammler.github.io/langadapter/extending/add-a-language/).
98
+ - [API reference](https://k-kammler.github.io/langadapter/reference/): generated
99
+ from the modules and their docstrings.
100
+
101
+ The guides also cover containers, source analysis and settings, and the
102
+ explanations cover outcomes, prepared copies of a project and environment
103
+ selection. The guides are also in the repository's
104
+ [docs directory](https://github.com/k-kammler/langadapter/tree/v0.1.0/docs)
105
+ and installed with the package under `share/doc/langadapter/docs`, without
106
+ the API reference, which is on the site only: in the installed copy,
107
+ Python's `help()` shows each name's documentation. Building the site
108
+ yourself is described in
109
+ [CONTRIBUTING.md](https://github.com/k-kammler/langadapter/blob/v0.1.0/CONTRIBUTING.md).
110
+ What the library depends on and downloads, with each license, is in
111
+ [THIRD_PARTY_NOTICES.md](https://github.com/k-kammler/langadapter/blob/v0.1.0/THIRD_PARTY_NOTICES.md).
112
+
113
+ ## License
114
+
115
+ MIT, see [LICENSE](https://github.com/k-kammler/langadapter/blob/v0.1.0/LICENSE).
@@ -0,0 +1,171 @@
1
+ # Third-party notices
2
+
3
+ LangAdapter's own code is under the MIT License (see `LICENSE`). Its packages
4
+ contain two pieces of third-party code, a function adapted from eight lines
5
+ of pytest and the test framework header utest.h, each described below with
6
+ its notice. This file also lists what LangAdapter depends on and what it
7
+ downloads while it runs, each with its license.
8
+
9
+ ## Code from pytest
10
+
11
+ The plugin text `_PATHS_PLUGIN_TEXT` in `langadapter/python/_runs.py`, which
12
+ LangAdapter loads into a project's pytest run in a prepared copy, defines
13
+ `_makepath`. It follows the eight lines of `FormattedExcinfo._makepath` in
14
+ pytest 8.1.1 (`_pytest/_code/code.py`), changed to print a frame's original
15
+ path from the original project's directory instead of the working directory.
16
+ pytest is under the MIT License:
17
+
18
+ ```text
19
+ The MIT License (MIT)
20
+
21
+ Copyright (c) 2004 Holger Krekel and others
22
+
23
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
24
+ this software and associated documentation files (the "Software"), to deal in
25
+ the Software without restriction, including without limitation the rights to
26
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
27
+ of the Software, and to permit persons to whom the Software is furnished to do
28
+ so, subject to the following conditions:
29
+
30
+ The above copyright notice and this permission notice shall be included in all
31
+ copies or substantial portions of the Software.
32
+
33
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
34
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
35
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
36
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
37
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
38
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
39
+ SOFTWARE.
40
+ ```
41
+
42
+ ## utest.h
43
+
44
+ `langadapter/c/data/utest.h` is utest.h by Neil Henning
45
+ (https://github.com/sheredom/utest.h), commit
46
+ 706f3574fec4915e78d9234870cfcdf22f7af5d9 of October 6, 2026, unchanged
47
+ (SHA-256 406ff019fe24672fdafd79062399c17bd98cdefbf52ef8d17b34b7a436fd49ac).
48
+ The C adapter puts it on the include path of the C tests it compiles. It is
49
+ released into the public domain under the Unlicense:
50
+
51
+ ```text
52
+ This is free and unencumbered software released into the public domain.
53
+
54
+ Anyone is free to copy, modify, publish, use, compile, sell, or
55
+ distribute this software, either in source code form or as a compiled
56
+ binary, for any purpose, commercial or non-commercial, and by any
57
+ means.
58
+
59
+ In jurisdictions that recognize copyright laws, the author or authors
60
+ of this software dedicate any and all copyright interest in the
61
+ software to the public domain. We make this dedication for the benefit
62
+ of the public at large and to the detriment of our heirs and
63
+ successors. We intend this dedication to be an overt act of
64
+ relinquishment in perpetuity of all present and future rights to this
65
+ software under copyright law.
66
+
67
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
68
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
69
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
70
+ IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
71
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
72
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
73
+ OTHER DEALINGS IN THE SOFTWARE.
74
+
75
+ For more information, please refer to <http://unlicense.org/>
76
+ ```
77
+
78
+ ## Python dependencies
79
+
80
+ Installed with LangAdapter from PyPI:
81
+
82
+ | Package | Versions | License |
83
+ | --- | --- | --- |
84
+ | tree-sitter | 0.25 | MIT |
85
+ | tree-sitter-python | 0.25 | MIT |
86
+ | tree-sitter-java | 0.23.5 and later 0.23 releases | MIT |
87
+ | lizard | 1.17 and later 1.x releases | MIT |
88
+ | pygments (installed with lizard) | any that lizard accepts | BSD-2-Clause |
89
+ | pathspec (installed with lizard) | any that lizard accepts | MPL-2.0 |
90
+ | tomli-w | 1.0 and later 1.x releases | MIT |
91
+ | packaging | 22 or later | Apache-2.0 or BSD-2-Clause |
92
+
93
+ Installed with the extra for C (`langadapter[c]`):
94
+
95
+ | Package | Versions | License |
96
+ | --- | --- | --- |
97
+ | tree-sitter-c | 0.24.2 and later 0.24 releases | MIT |
98
+ | gcovr | 8.7 and later 8.x releases | BSD-3-Clause |
99
+ | setuptools | 70 or later | MIT |
100
+ | Jinja2 (installed with gcovr) | any that gcovr accepts | BSD-3-Clause |
101
+ | MarkupSafe (installed with Jinja2) | any that Jinja2 accepts | BSD-3-Clause |
102
+ | lxml (installed with gcovr) | any that gcovr accepts | BSD-3-Clause |
103
+ | colorlog (installed with gcovr) | any that gcovr accepts | MIT |
104
+ | pygments (installed with gcovr) | any that gcovr accepts | BSD-2-Clause |
105
+ | tomli (installed with gcovr on Python 3.10) | any that gcovr accepts | MIT |
106
+ | typing-extensions (installed with gcovr on Python 3.10) | any that gcovr accepts | PSF-2.0 |
107
+ | colorama (installed with colorlog on Windows) | any that colorlog accepts | BSD-3-Clause |
108
+
109
+ lxml's binary wheels bundle libxml2, libxslt and libexslt (MIT), zlib (Zlib)
110
+ and iconv (LGPL-2.1), and parts of lxml are under the ElementTree license and
111
+ PSF-2.0, as the wheels' `LICENSES.txt` states.
112
+
113
+ ## Tools in a Python project's environment
114
+
115
+ LangAdapter does not install these. Its Python operations run them in the
116
+ project's own environment, and the setup check names the versions LangAdapter
117
+ expects:
118
+
119
+ | Package | Version | License |
120
+ | --- | --- | --- |
121
+ | pytest | 8.1.1, and 8.4.2 for Python 3.14 and later | MIT |
122
+ | coverage | 7.6.8, and 7.16.2 for Python 3.14 and later | Apache-2.0 |
123
+ | cosmic-ray | 8.4.1 | MIT |
124
+
125
+ ## Tools for C projects
126
+
127
+ LangAdapter installs no compiler or tool for C. Its C operations run what
128
+ they find for the project: GCC and its gcov, the build tools (make, cmake),
129
+ sh for the compiler and archiver recorder of every recorded build and for a
130
+ generated `configure`, ar and nm of GNU binutils, ctest for `c_tests`
131
+ `ctest`, stdbuf of GNU coreutils for a run as delivered, grep for the
132
+ processors a benchmark may use, prlimit of util-linux for
133
+ `c_address_space_limit` and its taskset for a benchmark's processor set,
134
+ and Mull (Apache-2.0) with its clang for mutation.
135
+
136
+ ## Java tools downloaded at run time
137
+
138
+ For Java projects, LangAdapter downloads the jars below from Maven Central
139
+ (`https://repo1.maven.org/maven2`) the first time an operation needs them.
140
+ Each jar is checked against the repository's SHA-1 and kept in the tool cache:
141
+ the directory `LANGADAPTER_JAVA_TOOLS` names, else `~/.cache/langadapter/java`.
142
+ With `LANGADAPTER_JAVA_TOOLS_OFFLINE=1`, nothing is downloaded and only the
143
+ cache is used. The jars run in the project's JVM and are not part of
144
+ LangAdapter's packages. Each keeps its own license.
145
+
146
+ | Jar | Version | Used for | License |
147
+ | --- | --- | --- | --- |
148
+ | `org.jacoco:org.jacoco.agent` (runtime), `org.jacoco:org.jacoco.core` | 0.8.15 | Coverage | EPL-2.0 |
149
+ | `org.ow2.asm:asm`, `asm-commons`, `asm-tree` | 9.10.1 | Coverage and mutation testing | BSD-3-Clause |
150
+ | `org.ow2.asm:asm-util`, `asm-analysis` | 9.10.1 | Mutation testing | BSD-3-Clause |
151
+ | `org.pitest:pitest`, `pitest-entry`, `pitest-command-line`, `pitest-html-report` | 1.30.0 | Mutation testing | Apache-2.0 |
152
+ | `org.pitest:pitest-junit5-plugin` | 1.2.3 | Mutation testing on the JUnit Platform | Apache-2.0 |
153
+ | `net.sf.jopt-simple:jopt-simple` | 4.9 | Mutation testing | MIT |
154
+ | `org.apache.commons:commons-lang3` | 3.18.0 | Mutation testing | Apache-2.0 |
155
+ | `org.apache.commons:commons-text` | 1.14.0 | Mutation testing | Apache-2.0 |
156
+ | `org.junit.platform:junit-platform-console`, `-reporting`, `-launcher`, `-engine`, `-commons` | The project's JUnit Platform version, else 1.14.4. The launcher, engine and commons 1.14.4 always, to compile the per-test evidence listener | Running tests and per-test evidence | EPL-2.0 (the console includes picocli, Apache-2.0) |
157
+ | `org.junit.jupiter:junit-jupiter-engine` | The project's JUnit Jupiter version | Running JUnit 5 and 6 tests | EPL-2.0 |
158
+ | `org.junit.vintage:junit-vintage-engine` | Matching the JUnit Platform | Running JUnit 4 tests | EPL-2.0 |
159
+ | `org.opentest4j.reporting:open-test-reporting-tooling-spi` | Matching the JUnit Platform | Test reports | Apache-2.0 |
160
+ | `junit:junit` | 4.13.2 | Projects on an older JUnit 4 | EPL-1.0 |
161
+ | `org.hamcrest:hamcrest-core` | 1.3 | With JUnit 4.13.2 | BSD-3-Clause |
162
+ | `org.opentest4j:opentest4j` | 1.3.0 | Running tests | Apache-2.0 |
163
+ | `org.apiguardian:apiguardian-api` | 1.1.2 | Per-test evidence | Apache-2.0 |
164
+
165
+ The project's own Maven runs two plugins to read the project, and fetches them
166
+ itself from the repositories the project uses:
167
+
168
+ | Plugin | Version | License |
169
+ | --- | --- | --- |
170
+ | `org.apache.maven.plugins:maven-help-plugin` | 3.5.2 | Apache-2.0 |
171
+ | `org.apache.maven.plugins:maven-dependency-plugin` | 3.11.0 | Apache-2.0 |