claims-cli 0.6.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 (231) hide show
  1. claims_cli-0.6.0/.gitignore +51 -0
  2. claims_cli-0.6.0/PKG-INFO +139 -0
  3. claims_cli-0.6.0/README.md +97 -0
  4. claims_cli-0.6.0/pyproject.toml +78 -0
  5. claims_cli-0.6.0/src/claims/__init__.py +132 -0
  6. claims_cli-0.6.0/src/claims/__main__.py +5 -0
  7. claims_cli-0.6.0/src/claims/adapters/__init__.py +6 -0
  8. claims_cli-0.6.0/src/claims/adapters/array.py +212 -0
  9. claims_cli-0.6.0/src/claims/adapters/base.py +75 -0
  10. claims_cli-0.6.0/src/claims/adapters/cells.py +94 -0
  11. claims_cli-0.6.0/src/claims/adapters/columnar.py +188 -0
  12. claims_cli-0.6.0/src/claims/adapters/prose.py +261 -0
  13. claims_cli-0.6.0/src/claims/adapters/reads.py +47 -0
  14. claims_cli-0.6.0/src/claims/adapters/rows.py +116 -0
  15. claims_cli-0.6.0/src/claims/adapters/sheet.py +149 -0
  16. claims_cli-0.6.0/src/claims/adapters/sqlite.py +73 -0
  17. claims_cli-0.6.0/src/claims/adapters/table.py +135 -0
  18. claims_cli-0.6.0/src/claims/adapters/tree.py +163 -0
  19. claims_cli-0.6.0/src/claims/checks.py +511 -0
  20. claims_cli-0.6.0/src/claims/cli.py +1103 -0
  21. claims_cli-0.6.0/src/claims/core/__init__.py +9 -0
  22. claims_cli-0.6.0/src/claims/core/artifacts.py +121 -0
  23. claims_cli-0.6.0/src/claims/core/checks.py +132 -0
  24. claims_cli-0.6.0/src/claims/core/claims.py +100 -0
  25. claims_cli-0.6.0/src/claims/core/evidence.py +708 -0
  26. claims_cli-0.6.0/src/claims/core/manifest.py +349 -0
  27. claims_cli-0.6.0/src/claims/core/numbers.py +146 -0
  28. claims_cli-0.6.0/src/claims/core/outcomes.py +410 -0
  29. claims_cli-0.6.0/src/claims/core/report.py +503 -0
  30. claims_cli-0.6.0/src/claims/corpus.py +344 -0
  31. claims_cli-0.6.0/src/claims/exceptions.py +106 -0
  32. claims_cli-0.6.0/src/claims/export/__init__.py +23 -0
  33. claims_cli-0.6.0/src/claims/export/rocrate.py +787 -0
  34. claims_cli-0.6.0/src/claims/export/sarif.py +401 -0
  35. claims_cli-0.6.0/src/claims/manifest.py +59 -0
  36. claims_cli-0.6.0/src/claims/models.py +222 -0
  37. claims_cli-0.6.0/src/claims/numbers.py +453 -0
  38. claims_cli-0.6.0/src/claims/origins.py +303 -0
  39. claims_cli-0.6.0/src/claims/policy.py +369 -0
  40. claims_cli-0.6.0/src/claims/provenance.py +42 -0
  41. claims_cli-0.6.0/src/claims/record.py +1099 -0
  42. claims_cli-0.6.0/src/claims/regression.py +171 -0
  43. claims_cli-0.6.0/src/claims/renderers/__init__.py +10 -0
  44. claims_cli-0.6.0/src/claims/renderers/sarif.py +294 -0
  45. claims_cli-0.6.0/src/claims/reruns.py +111 -0
  46. claims_cli-0.6.0/src/claims/resolve.py +116 -0
  47. claims_cli-0.6.0/src/claims/stale.py +333 -0
  48. claims_cli-0.6.0/src/claims/starter.py +432 -0
  49. claims_cli-0.6.0/src/claims/toolchain.py +120 -0
  50. claims_cli-0.6.0/src/claims/verify.py +1371 -0
  51. claims_cli-0.6.0/src/claims/why.py +398 -0
  52. claims_cli-0.6.0/tests/conformance/build_fixtures.py +730 -0
  53. claims_cli-0.6.0/tests/conformance/cases/aggregate_match/expected.json +20 -0
  54. claims_cli-0.6.0/tests/conformance/cases/aggregate_match/repro.yaml +40 -0
  55. claims_cli-0.6.0/tests/conformance/cases/aggregate_match/run0.json +1 -0
  56. claims_cli-0.6.0/tests/conformance/cases/aggregate_match/run1.json +1 -0
  57. claims_cli-0.6.0/tests/conformance/cases/aggregate_match/run2.json +1 -0
  58. claims_cli-0.6.0/tests/conformance/cases/aggregate_member_absent/expected.json +21 -0
  59. claims_cli-0.6.0/tests/conformance/cases/aggregate_member_absent/other.json +1 -0
  60. claims_cli-0.6.0/tests/conformance/cases/aggregate_member_absent/repro.yaml +49 -0
  61. claims_cli-0.6.0/tests/conformance/cases/aggregate_member_absent/run0.json +1 -0
  62. claims_cli-0.6.0/tests/conformance/cases/aggregate_member_absent/run1.json +1 -0
  63. claims_cli-0.6.0/tests/conformance/cases/aggregate_member_absent/run2.json +1 -0
  64. claims_cli-0.6.0/tests/conformance/cases/aggregate_mismatch/expected.json +21 -0
  65. claims_cli-0.6.0/tests/conformance/cases/aggregate_mismatch/repro.yaml +49 -0
  66. claims_cli-0.6.0/tests/conformance/cases/aggregate_mismatch/run0.json +1 -0
  67. claims_cli-0.6.0/tests/conformance/cases/aggregate_mismatch/run1.json +1 -0
  68. claims_cli-0.6.0/tests/conformance/cases/aggregate_mismatch/run2.json +1 -0
  69. claims_cli-0.6.0/tests/conformance/cases/aggregate_mismatch/run3.json +1 -0
  70. claims_cli-0.6.0/tests/conformance/cases/artifact_missing/expected.json +11 -0
  71. claims_cli-0.6.0/tests/conformance/cases/artifact_missing/repro.yaml +12 -0
  72. claims_cli-0.6.0/tests/conformance/cases/artifact_missing/results.json +7 -0
  73. claims_cli-0.6.0/tests/conformance/cases/artifact_missing/source.txt +1 -0
  74. claims_cli-0.6.0/tests/conformance/cases/artifact_missing/table.csv +4 -0
  75. claims_cli-0.6.0/tests/conformance/cases/artifact_undeclared/expected.json +11 -0
  76. claims_cli-0.6.0/tests/conformance/cases/artifact_undeclared/repro.yaml +15 -0
  77. claims_cli-0.6.0/tests/conformance/cases/artifact_undeclared/results.json +7 -0
  78. claims_cli-0.6.0/tests/conformance/cases/artifact_undeclared/source.txt +1 -0
  79. claims_cli-0.6.0/tests/conformance/cases/artifact_undeclared/table.csv +4 -0
  80. claims_cli-0.6.0/tests/conformance/cases/artifact_unreadable/broken.json +1 -0
  81. claims_cli-0.6.0/tests/conformance/cases/artifact_unreadable/expected.json +11 -0
  82. claims_cli-0.6.0/tests/conformance/cases/artifact_unreadable/repro.yaml +17 -0
  83. claims_cli-0.6.0/tests/conformance/cases/artifact_unreadable/results.json +7 -0
  84. claims_cli-0.6.0/tests/conformance/cases/artifact_unreadable/source.txt +1 -0
  85. claims_cli-0.6.0/tests/conformance/cases/artifact_unreadable/table.csv +4 -0
  86. claims_cli-0.6.0/tests/conformance/cases/broken_pin/expected.json +11 -0
  87. claims_cli-0.6.0/tests/conformance/cases/broken_pin/repro.yaml +15 -0
  88. claims_cli-0.6.0/tests/conformance/cases/broken_pin/results.json +7 -0
  89. claims_cli-0.6.0/tests/conformance/cases/broken_pin/source.txt +1 -0
  90. claims_cli-0.6.0/tests/conformance/cases/broken_pin/table.csv +4 -0
  91. claims_cli-0.6.0/tests/conformance/cases/correspondence_match/counts.json +4 -0
  92. claims_cli-0.6.0/tests/conformance/cases/correspondence_match/doc.md +3 -0
  93. claims_cli-0.6.0/tests/conformance/cases/correspondence_match/expected.json +12 -0
  94. claims_cli-0.6.0/tests/conformance/cases/correspondence_match/repro.yaml +32 -0
  95. claims_cli-0.6.0/tests/conformance/cases/correspondence_mismatch/counts.json +4 -0
  96. claims_cli-0.6.0/tests/conformance/cases/correspondence_mismatch/doc.md +3 -0
  97. claims_cli-0.6.0/tests/conformance/cases/correspondence_mismatch/expected.json +12 -0
  98. claims_cli-0.6.0/tests/conformance/cases/correspondence_mismatch/repro.yaml +32 -0
  99. claims_cli-0.6.0/tests/conformance/cases/correspondence_side_absent/counts.json +4 -0
  100. claims_cli-0.6.0/tests/conformance/cases/correspondence_side_absent/doc.md +3 -0
  101. claims_cli-0.6.0/tests/conformance/cases/correspondence_side_absent/expected.json +12 -0
  102. claims_cli-0.6.0/tests/conformance/cases/correspondence_side_absent/repro.yaml +32 -0
  103. claims_cli-0.6.0/tests/conformance/cases/no_evidence_offered/expected.json +11 -0
  104. claims_cli-0.6.0/tests/conformance/cases/no_evidence_offered/repro.yaml +12 -0
  105. claims_cli-0.6.0/tests/conformance/cases/no_evidence_offered/results.json +7 -0
  106. claims_cli-0.6.0/tests/conformance/cases/no_evidence_offered/source.txt +1 -0
  107. claims_cli-0.6.0/tests/conformance/cases/no_evidence_offered/table.csv +4 -0
  108. claims_cli-0.6.0/tests/conformance/cases/passage_absent/expected.json +11 -0
  109. claims_cli-0.6.0/tests/conformance/cases/passage_absent/repro.yaml +15 -0
  110. claims_cli-0.6.0/tests/conformance/cases/passage_absent/results.json +7 -0
  111. claims_cli-0.6.0/tests/conformance/cases/passage_absent/source.txt +1 -0
  112. claims_cli-0.6.0/tests/conformance/cases/passage_absent/table.csv +4 -0
  113. claims_cli-0.6.0/tests/conformance/cases/passage_present/expected.json +11 -0
  114. claims_cli-0.6.0/tests/conformance/cases/passage_present/repro.yaml +15 -0
  115. claims_cli-0.6.0/tests/conformance/cases/passage_present/results.json +7 -0
  116. claims_cli-0.6.0/tests/conformance/cases/passage_present/source.txt +1 -0
  117. claims_cli-0.6.0/tests/conformance/cases/passage_present/table.csv +4 -0
  118. claims_cli-0.6.0/tests/conformance/cases/pointer_absent/expected.json +11 -0
  119. claims_cli-0.6.0/tests/conformance/cases/pointer_absent/repro.yaml +17 -0
  120. claims_cli-0.6.0/tests/conformance/cases/pointer_absent/results.json +7 -0
  121. claims_cli-0.6.0/tests/conformance/cases/pointer_absent/source.txt +1 -0
  122. claims_cli-0.6.0/tests/conformance/cases/pointer_absent/table.csv +4 -0
  123. claims_cli-0.6.0/tests/conformance/cases/pointer_escaped_key/expected.json +11 -0
  124. claims_cli-0.6.0/tests/conformance/cases/pointer_escaped_key/repro.yaml +17 -0
  125. claims_cli-0.6.0/tests/conformance/cases/pointer_escaped_key/results.json +7 -0
  126. claims_cli-0.6.0/tests/conformance/cases/pointer_escaped_key/source.txt +1 -0
  127. claims_cli-0.6.0/tests/conformance/cases/pointer_escaped_key/table.csv +4 -0
  128. claims_cli-0.6.0/tests/conformance/cases/prose_anchor_absent/expected.json +18 -0
  129. claims_cli-0.6.0/tests/conformance/cases/prose_anchor_absent/output.txt +14 -0
  130. claims_cli-0.6.0/tests/conformance/cases/prose_anchor_absent/repro.yaml +21 -0
  131. claims_cli-0.6.0/tests/conformance/cases/prose_anchor_splits_number/expected.json +18 -0
  132. claims_cli-0.6.0/tests/conformance/cases/prose_anchor_splits_number/output.txt +14 -0
  133. claims_cli-0.6.0/tests/conformance/cases/prose_anchor_splits_number/repro.yaml +21 -0
  134. claims_cli-0.6.0/tests/conformance/cases/prose_anchors_ambiguous/counts.json +4 -0
  135. claims_cli-0.6.0/tests/conformance/cases/prose_anchors_ambiguous/doc.md +3 -0
  136. claims_cli-0.6.0/tests/conformance/cases/prose_anchors_ambiguous/expected.json +12 -0
  137. claims_cli-0.6.0/tests/conformance/cases/prose_anchors_ambiguous/repro.yaml +26 -0
  138. claims_cli-0.6.0/tests/conformance/cases/prose_number_as_word/counts.json +4 -0
  139. claims_cli-0.6.0/tests/conformance/cases/prose_number_as_word/doc.md +3 -0
  140. claims_cli-0.6.0/tests/conformance/cases/prose_number_as_word/expected.json +12 -0
  141. claims_cli-0.6.0/tests/conformance/cases/prose_number_as_word/repro.yaml +26 -0
  142. claims_cli-0.6.0/tests/conformance/cases/prose_table_cell_match/expected.json +18 -0
  143. claims_cli-0.6.0/tests/conformance/cases/prose_table_cell_match/output.txt +14 -0
  144. claims_cli-0.6.0/tests/conformance/cases/prose_table_cell_match/repro.yaml +21 -0
  145. claims_cli-0.6.0/tests/conformance/cases/prose_table_cell_not_numeric/expected.json +18 -0
  146. claims_cli-0.6.0/tests/conformance/cases/prose_table_cell_not_numeric/output.txt +14 -0
  147. claims_cli-0.6.0/tests/conformance/cases/prose_table_cell_not_numeric/repro.yaml +21 -0
  148. claims_cli-0.6.0/tests/conformance/cases/prose_value_match/counts.json +4 -0
  149. claims_cli-0.6.0/tests/conformance/cases/prose_value_match/doc.md +3 -0
  150. claims_cli-0.6.0/tests/conformance/cases/prose_value_match/expected.json +12 -0
  151. claims_cli-0.6.0/tests/conformance/cases/prose_value_match/repro.yaml +26 -0
  152. claims_cli-0.6.0/tests/conformance/cases/table_cell_match/expected.json +11 -0
  153. claims_cli-0.6.0/tests/conformance/cases/table_cell_match/repro.yaml +19 -0
  154. claims_cli-0.6.0/tests/conformance/cases/table_cell_match/results.json +7 -0
  155. claims_cli-0.6.0/tests/conformance/cases/table_cell_match/source.txt +1 -0
  156. claims_cli-0.6.0/tests/conformance/cases/table_cell_match/table.csv +4 -0
  157. claims_cli-0.6.0/tests/conformance/cases/table_cell_mismatch/expected.json +11 -0
  158. claims_cli-0.6.0/tests/conformance/cases/table_cell_mismatch/repro.yaml +19 -0
  159. claims_cli-0.6.0/tests/conformance/cases/table_cell_mismatch/results.json +7 -0
  160. claims_cli-0.6.0/tests/conformance/cases/table_cell_mismatch/source.txt +1 -0
  161. claims_cli-0.6.0/tests/conformance/cases/table_cell_mismatch/table.csv +4 -0
  162. claims_cli-0.6.0/tests/conformance/cases/table_column_absent/expected.json +11 -0
  163. claims_cli-0.6.0/tests/conformance/cases/table_column_absent/repro.yaml +19 -0
  164. claims_cli-0.6.0/tests/conformance/cases/table_column_absent/results.json +7 -0
  165. claims_cli-0.6.0/tests/conformance/cases/table_column_absent/source.txt +1 -0
  166. claims_cli-0.6.0/tests/conformance/cases/table_column_absent/table.csv +4 -0
  167. claims_cli-0.6.0/tests/conformance/cases/table_row_absent/expected.json +11 -0
  168. claims_cli-0.6.0/tests/conformance/cases/table_row_absent/repro.yaml +19 -0
  169. claims_cli-0.6.0/tests/conformance/cases/table_row_absent/results.json +7 -0
  170. claims_cli-0.6.0/tests/conformance/cases/table_row_absent/source.txt +1 -0
  171. claims_cli-0.6.0/tests/conformance/cases/table_row_absent/table.csv +4 -0
  172. claims_cli-0.6.0/tests/conformance/cases/table_row_ambiguous/expected.json +11 -0
  173. claims_cli-0.6.0/tests/conformance/cases/table_row_ambiguous/repro.yaml +19 -0
  174. claims_cli-0.6.0/tests/conformance/cases/table_row_ambiguous/results.json +7 -0
  175. claims_cli-0.6.0/tests/conformance/cases/table_row_ambiguous/source.txt +1 -0
  176. claims_cli-0.6.0/tests/conformance/cases/table_row_ambiguous/table.csv +4 -0
  177. claims_cli-0.6.0/tests/conformance/cases/unpinned_artifact/expected.json +11 -0
  178. claims_cli-0.6.0/tests/conformance/cases/unpinned_artifact/repro.yaml +12 -0
  179. claims_cli-0.6.0/tests/conformance/cases/unpinned_artifact/results.json +7 -0
  180. claims_cli-0.6.0/tests/conformance/cases/unpinned_artifact/source.txt +1 -0
  181. claims_cli-0.6.0/tests/conformance/cases/unpinned_artifact/table.csv +4 -0
  182. claims_cli-0.6.0/tests/conformance/cases/value_match/expected.json +11 -0
  183. claims_cli-0.6.0/tests/conformance/cases/value_match/repro.yaml +17 -0
  184. claims_cli-0.6.0/tests/conformance/cases/value_match/results.json +7 -0
  185. claims_cli-0.6.0/tests/conformance/cases/value_match/source.txt +1 -0
  186. claims_cli-0.6.0/tests/conformance/cases/value_match/table.csv +4 -0
  187. claims_cli-0.6.0/tests/conformance/cases/value_match_converted/expected.json +25 -0
  188. claims_cli-0.6.0/tests/conformance/cases/value_match_converted/rates.json +4 -0
  189. claims_cli-0.6.0/tests/conformance/cases/value_match_converted/repro.yaml +23 -0
  190. claims_cli-0.6.0/tests/conformance/cases/value_match_printed_precision/expected.json +11 -0
  191. claims_cli-0.6.0/tests/conformance/cases/value_match_printed_precision/repro.yaml +17 -0
  192. claims_cli-0.6.0/tests/conformance/cases/value_match_printed_precision/results.json +7 -0
  193. claims_cli-0.6.0/tests/conformance/cases/value_match_printed_precision/source.txt +1 -0
  194. claims_cli-0.6.0/tests/conformance/cases/value_match_printed_precision/table.csv +4 -0
  195. claims_cli-0.6.0/tests/conformance/cases/value_mismatch/expected.json +11 -0
  196. claims_cli-0.6.0/tests/conformance/cases/value_mismatch/repro.yaml +17 -0
  197. claims_cli-0.6.0/tests/conformance/cases/value_mismatch/results.json +7 -0
  198. claims_cli-0.6.0/tests/conformance/cases/value_mismatch/source.txt +1 -0
  199. claims_cli-0.6.0/tests/conformance/cases/value_mismatch/table.csv +4 -0
  200. claims_cli-0.6.0/tests/conformance/cases/value_mismatch_converted/expected.json +18 -0
  201. claims_cli-0.6.0/tests/conformance/cases/value_mismatch_converted/rates.json +4 -0
  202. claims_cli-0.6.0/tests/conformance/cases/value_mismatch_converted/repro.yaml +18 -0
  203. claims_cli-0.6.0/tests/conformance/cases/value_not_numeric/expected.json +11 -0
  204. claims_cli-0.6.0/tests/conformance/cases/value_not_numeric/repro.yaml +17 -0
  205. claims_cli-0.6.0/tests/conformance/cases/value_not_numeric/results.json +7 -0
  206. claims_cli-0.6.0/tests/conformance/cases/value_not_numeric/source.txt +1 -0
  207. claims_cli-0.6.0/tests/conformance/cases/value_not_numeric/table.csv +4 -0
  208. claims_cli-0.6.0/tests/conformance/cases/value_places_mismatch/expected.json +25 -0
  209. claims_cli-0.6.0/tests/conformance/cases/value_places_mismatch/halves.json +4 -0
  210. claims_cli-0.6.0/tests/conformance/cases/value_places_mismatch/repro.yaml +24 -0
  211. claims_cli-0.6.0/tests/conformance/cases/value_tie_either_neighbor/expected.json +32 -0
  212. claims_cli-0.6.0/tests/conformance/cases/value_tie_either_neighbor/halves.json +4 -0
  213. claims_cli-0.6.0/tests/conformance/cases/value_tie_either_neighbor/repro.yaml +27 -0
  214. claims_cli-0.6.0/tests/conformance/test_conformance.py +162 -0
  215. claims_cli-0.6.0/tests/fixtures/records-0.5.6.jsonl +8 -0
  216. claims_cli-0.6.0/tests/test_audit_regressions.py +396 -0
  217. claims_cli-0.6.0/tests/test_claims_alone.py +169 -0
  218. claims_cli-0.6.0/tests/test_correspondence.py +745 -0
  219. claims_cli-0.6.0/tests/test_formats.py +527 -0
  220. claims_cli-0.6.0/tests/test_locators.py +381 -0
  221. claims_cli-0.6.0/tests/test_ordering.py +432 -0
  222. claims_cli-0.6.0/tests/test_origins.py +352 -0
  223. claims_cli-0.6.0/tests/test_provenance.py +83 -0
  224. claims_cli-0.6.0/tests/test_read_once.py +158 -0
  225. claims_cli-0.6.0/tests/test_record_versions.py +134 -0
  226. claims_cli-0.6.0/tests/test_recorded_version.py +75 -0
  227. claims_cli-0.6.0/tests/test_regression.py +174 -0
  228. claims_cli-0.6.0/tests/test_sarif.py +167 -0
  229. claims_cli-0.6.0/tests/test_tables.py +127 -0
  230. claims_cli-0.6.0/tests/test_toolchain.py +351 -0
  231. claims_cli-0.6.0/tests/test_verify_edges.py +370 -0
@@ -0,0 +1,51 @@
1
+ __pycache__/
2
+ *.pyc
3
+ .venv/
4
+ dist/
5
+ *.egg-info/
6
+ .DS_Store
7
+
8
+ # adduce writes its report and the repro sidecar here
9
+ .adduce/
10
+
11
+ # Publisher PDFs for the prior-art dig. Kept locally so `citations verify` can resolve
12
+ # quotations against them; not redistributable, and this repository is public.
13
+
14
+ # coverage byproducts
15
+ .coverage
16
+ .coverage.*
17
+ htmlcov/
18
+ coverage.xml
19
+
20
+ # Internal review packets: simulated-referee rounds and self-critique.
21
+ # Local only -- this repository may go public.
22
+ REVIEW_PACKET*.md
23
+
24
+ # Development corpus: the downloaded articles and shallow clones are rebuildable from
25
+ # frame.json, but the measurements taken from them are not -- ignoring the whole directory
26
+ # lost one 32-article run when the tree was tidied. Subdirectories only, as arxiv_corpus does.
27
+ # documentation site (Docusaurus)
28
+ website/node_modules/
29
+ website/build/
30
+ website/.docusaurus/
31
+
32
+ # nbconvert output from verifying the demo notebook runs
33
+ notebooks/executed.ipynb
34
+
35
+ # jupyter lite build state
36
+ .jupyterlite.doit.db
37
+
38
+ # arXiv LaTeX sources fetched for testing, rebuildable from resolved.json
39
+
40
+ # CORE-Bench capsules: ~39 MB each, rebuildable from core_train.json
41
+
42
+ # CORE-Bench capsule metadata: 4.3 MB, fetched from siegelz/core-bench
43
+
44
+ # Internal reviews are never tracked. They live in reproducible-science-internal-audits.
45
+ docs/reviews/
46
+
47
+ # Sidecars from provenance_core.locking. The suffixes are deliberately not `.lock` and `.tmp`,
48
+ # so these patterns cannot reach `uv.lock`. They hold nothing: the kernel releases a lock when its
49
+ # holder exits, and a leftover temp file means a write was killed.
50
+ *.provenance-lock
51
+ *.provenance-tmp
@@ -0,0 +1,139 @@
1
+ Metadata-Version: 2.5
2
+ Name: claims-cli
3
+ Version: 0.6.0
4
+ Summary: Check what a manuscript states against the files it names: numbers, table cells and quotations
5
+ Project-URL: Changelog, https://github.com/elliottower/reproducible-science/blob/main/CHANGELOG.md
6
+ Project-URL: Homepage, https://github.com/elliottower/reproducible-science
7
+ Project-URL: Issues, https://github.com/elliottower/reproducible-science/issues
8
+ Project-URL: Source, https://github.com/elliottower/reproducible-science/tree/main/packages/claims
9
+ Author-email: Elliot Tower <elliot@elliottower.ai>
10
+ License-Expression: MIT
11
+ Keywords: citations,manuscript,open science,provenance,reproducibility
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3 :: Only
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
+ Classifier: Topic :: Scientific/Engineering
21
+ Requires-Python: >=3.11
22
+ Requires-Dist: citations<0.7,>=0.6
23
+ Requires-Dist: provenance-core<0.7,>=0.6
24
+ Requires-Dist: pydantic>=2.9
25
+ Requires-Dist: pyyaml>=6.0.2
26
+ Provides-Extra: arrays
27
+ Requires-Dist: numpy>=2.2.6; extra == 'arrays'
28
+ Provides-Extra: hdf5
29
+ Requires-Dist: h5py>=3.12; extra == 'hdf5'
30
+ Provides-Extra: netcdf
31
+ Requires-Dist: netcdf4>=1.7.2; extra == 'netcdf'
32
+ Provides-Extra: parquet
33
+ Requires-Dist: pyarrow>=18; extra == 'parquet'
34
+ Provides-Extra: rds
35
+ Requires-Dist: rdata>=1; extra == 'rds'
36
+ Provides-Extra: sheets
37
+ Requires-Dist: openpyxl>=3.1; extra == 'sheets'
38
+ Requires-Dist: xlrd>=2.0.1; extra == 'sheets'
39
+ Provides-Extra: stata-spss
40
+ Requires-Dist: pyreadstat>=1.3.6; extra == 'stata-spss'
41
+ Description-Content-Type: text/markdown
42
+
43
+ # claims-cli
44
+
45
+ [![pypi](https://img.shields.io/pypi/v/claims-cli)](https://pypi.org/project/claims-cli/)
46
+ [![python](https://img.shields.io/pypi/pyversions/claims-cli)](https://pypi.org/project/claims-cli/)
47
+ [![license](https://img.shields.io/pypi/l/claims-cli)](https://github.com/elliottower/reproducible-science/blob/main/LICENSE)
48
+ [![docs](https://img.shields.io/badge/docs-live-blue)](https://reproducible.science/)
49
+
50
+ Check what a manuscript states against the files it names.
51
+
52
+ The part of [reproducible-science](https://github.com/elliottower/reproducible-science) that reads a manifest of claims and checks each one: a number against a results file, a table cell against a table, a quotation against its source. It installs alone, and it runs no command of yours.
53
+
54
+ ## Install
55
+
56
+ ```bash
57
+ pip install claims-cli
58
+ ```
59
+
60
+ This installs `claims` and one dependency of ours, [`citations`](https://pypi.org/project/citations/), which reads the documents a quotation is checked in. The optional readers are extras, each named for what it reads:
61
+
62
+ ```bash
63
+ pip install "claims-cli[parquet,sheets]"
64
+ ```
65
+
66
+ `arrays`, `hdf5`, `netcdf`, `parquet`, `rds`, `sheets` and `stata-spss`. Without the extra a format needs, a check of that format is `unchecked` and names the extra to install.
67
+
68
+ ## What it reads
69
+
70
+ `repro.yaml`, a manifest that pins a project's files by sha256 and declares what the manuscript claims about them:
71
+
72
+ ```yaml
73
+ artifacts:
74
+ - id: results
75
+ path: analysis/results.json
76
+ digest: {algorithm: sha256, value: 9f635f9a...}
77
+
78
+ claims:
79
+ - id: primary
80
+ text: The treatment reduced the primary outcome
81
+ evidence:
82
+ - kind: metric
83
+ artifact: results
84
+ name: p_value
85
+ pointer: /primary/p
86
+ reported: "0.031"
87
+ ```
88
+
89
+ The file has the same name and the same format whichever command reads it. The [specification](https://reproducible.science/reference/spec/) defines every kind of evidence and every outcome.
90
+
91
+ ## The commands
92
+
93
+ ```bash
94
+ claims manifest init
95
+ ```
96
+
97
+ Writes a starter `repro.yaml` at the top of the project: each file it finds or is given, pinned, with example claims that verify as written. It never overwrites one.
98
+
99
+ ```bash
100
+ claims verify
101
+ ```
102
+
103
+ Checks every declared assertion against the file it names and prints one line per assertion: `ok`, `MISS` where the file holds another value, `GONE` where the address does not resolve, `--` where the check could not run. It exits 1 where the policy fails, and `--format json` and `--format sarif` print the report as a document.
104
+
105
+ ```bash
106
+ claims stale
107
+ ```
108
+
109
+ Says which claims read a file that is no longer what a recorded re-run produced. It reads `.repro/reproductions.jsonl` and runs nothing.
110
+
111
+ ```bash
112
+ claims why primary
113
+ ```
114
+
115
+ For one claim: each assertion as `claims verify` evaluates it now, each file the claim rests on and the command recorded for it, and then what the record does not establish.
116
+
117
+ ```bash
118
+ claims numbers
119
+ ```
120
+
121
+ Counts every number the manuscript's text prints and says which a claim accounts for.
122
+
123
+ ```bash
124
+ claims export record
125
+ ```
126
+
127
+ Writes one record per checked assertion, for another program to read. `sarif` and `ro-crate` write the same records in those formats.
128
+
129
+ ```bash
130
+ claims origins --repo https://github.com/owner/study=../study
131
+ ```
132
+
133
+ For each artifact copied from another repository, which the manifest says with `origin: {repository, commit, path}`, compares the pinned digest with the bytes of that path at that commit: `same`, `differs`, `absent`, `unknown commit` or `not checked`, each with the reason. A clone given with `--repo` is read with `git cat-file`, so committed bytes are compared and never a working tree. With `--fetch`, a GitHub repository no clone is given for is read from `raw.githubusercontent.com`; without it nothing touches the network. `claims verify` never reads an origin.
134
+
135
+ ## With `repro`
136
+
137
+ [`reproducible-science`](https://pypi.org/project/reproducible-science/) depends on this package and adds the commands that run things: `repro reproduce`, which runs each declared command again and writes the record `claims stale` reads, `repro check` and `repro audit`, which drive `prereg`, `results` and `citations`, and `repro ci`. Under `repro`, every command above has the same name, does the same thing and prints the same output: `repro verify` and `claims verify` are one function. A project that uses `repro` has no reason to install this by itself. It is separate so that checking a manuscript's claims does not require installing something that executes commands a manifest names.
138
+
139
+ MIT licensed.
@@ -0,0 +1,97 @@
1
+ # claims-cli
2
+
3
+ [![pypi](https://img.shields.io/pypi/v/claims-cli)](https://pypi.org/project/claims-cli/)
4
+ [![python](https://img.shields.io/pypi/pyversions/claims-cli)](https://pypi.org/project/claims-cli/)
5
+ [![license](https://img.shields.io/pypi/l/claims-cli)](https://github.com/elliottower/reproducible-science/blob/main/LICENSE)
6
+ [![docs](https://img.shields.io/badge/docs-live-blue)](https://reproducible.science/)
7
+
8
+ Check what a manuscript states against the files it names.
9
+
10
+ The part of [reproducible-science](https://github.com/elliottower/reproducible-science) that reads a manifest of claims and checks each one: a number against a results file, a table cell against a table, a quotation against its source. It installs alone, and it runs no command of yours.
11
+
12
+ ## Install
13
+
14
+ ```bash
15
+ pip install claims-cli
16
+ ```
17
+
18
+ This installs `claims` and one dependency of ours, [`citations`](https://pypi.org/project/citations/), which reads the documents a quotation is checked in. The optional readers are extras, each named for what it reads:
19
+
20
+ ```bash
21
+ pip install "claims-cli[parquet,sheets]"
22
+ ```
23
+
24
+ `arrays`, `hdf5`, `netcdf`, `parquet`, `rds`, `sheets` and `stata-spss`. Without the extra a format needs, a check of that format is `unchecked` and names the extra to install.
25
+
26
+ ## What it reads
27
+
28
+ `repro.yaml`, a manifest that pins a project's files by sha256 and declares what the manuscript claims about them:
29
+
30
+ ```yaml
31
+ artifacts:
32
+ - id: results
33
+ path: analysis/results.json
34
+ digest: {algorithm: sha256, value: 9f635f9a...}
35
+
36
+ claims:
37
+ - id: primary
38
+ text: The treatment reduced the primary outcome
39
+ evidence:
40
+ - kind: metric
41
+ artifact: results
42
+ name: p_value
43
+ pointer: /primary/p
44
+ reported: "0.031"
45
+ ```
46
+
47
+ The file has the same name and the same format whichever command reads it. The [specification](https://reproducible.science/reference/spec/) defines every kind of evidence and every outcome.
48
+
49
+ ## The commands
50
+
51
+ ```bash
52
+ claims manifest init
53
+ ```
54
+
55
+ Writes a starter `repro.yaml` at the top of the project: each file it finds or is given, pinned, with example claims that verify as written. It never overwrites one.
56
+
57
+ ```bash
58
+ claims verify
59
+ ```
60
+
61
+ Checks every declared assertion against the file it names and prints one line per assertion: `ok`, `MISS` where the file holds another value, `GONE` where the address does not resolve, `--` where the check could not run. It exits 1 where the policy fails, and `--format json` and `--format sarif` print the report as a document.
62
+
63
+ ```bash
64
+ claims stale
65
+ ```
66
+
67
+ Says which claims read a file that is no longer what a recorded re-run produced. It reads `.repro/reproductions.jsonl` and runs nothing.
68
+
69
+ ```bash
70
+ claims why primary
71
+ ```
72
+
73
+ For one claim: each assertion as `claims verify` evaluates it now, each file the claim rests on and the command recorded for it, and then what the record does not establish.
74
+
75
+ ```bash
76
+ claims numbers
77
+ ```
78
+
79
+ Counts every number the manuscript's text prints and says which a claim accounts for.
80
+
81
+ ```bash
82
+ claims export record
83
+ ```
84
+
85
+ Writes one record per checked assertion, for another program to read. `sarif` and `ro-crate` write the same records in those formats.
86
+
87
+ ```bash
88
+ claims origins --repo https://github.com/owner/study=../study
89
+ ```
90
+
91
+ For each artifact copied from another repository, which the manifest says with `origin: {repository, commit, path}`, compares the pinned digest with the bytes of that path at that commit: `same`, `differs`, `absent`, `unknown commit` or `not checked`, each with the reason. A clone given with `--repo` is read with `git cat-file`, so committed bytes are compared and never a working tree. With `--fetch`, a GitHub repository no clone is given for is read from `raw.githubusercontent.com`; without it nothing touches the network. `claims verify` never reads an origin.
92
+
93
+ ## With `repro`
94
+
95
+ [`reproducible-science`](https://pypi.org/project/reproducible-science/) depends on this package and adds the commands that run things: `repro reproduce`, which runs each declared command again and writes the record `claims stale` reads, `repro check` and `repro audit`, which drive `prereg`, `results` and `citations`, and `repro ci`. Under `repro`, every command above has the same name, does the same thing and prints the same output: `repro verify` and `claims verify` are one function. A project that uses `repro` has no reason to install this by itself. It is separate so that checking a manuscript's claims does not require installing something that executes commands a manifest names.
96
+
97
+ MIT licensed.
@@ -0,0 +1,78 @@
1
+ [build-system]
2
+ build-backend = "hatchling.build"
3
+ requires = [ "hatchling" ]
4
+
5
+ [project]
6
+ name = "claims-cli"
7
+ version = "0.6.0"
8
+ description = "Check what a manuscript states against the files it names: numbers, table cells and quotations"
9
+ readme = "README.md"
10
+ keywords = [ "citations", "manuscript", "open science", "provenance", "reproducibility" ]
11
+ license = "MIT"
12
+ authors = [ { name = "Elliot Tower", email = "elliot@elliottower.ai" } ]
13
+ requires-python = ">=3.11"
14
+ classifiers = [
15
+ "Development Status :: 3 - Alpha",
16
+ "Intended Audience :: Science/Research",
17
+ "License :: OSI Approved :: MIT License",
18
+ "Programming Language :: Python :: 3 :: Only",
19
+ "Programming Language :: Python :: 3.11",
20
+ "Programming Language :: Python :: 3.12",
21
+ "Programming Language :: Python :: 3.13",
22
+ "Programming Language :: Python :: 3.14",
23
+ "Topic :: Scientific/Engineering",
24
+ ]
25
+ dependencies = [
26
+ # A quotation is checked by `citations`, and a prose locator and the count of a text's
27
+ # numbers read a document through its extractors, so it is needed to import this package.
28
+ "citations>=0.6,<0.7",
29
+ "provenance-core>=0.6,<0.7",
30
+ # Floors, not bare names: without them a fresh install resolves whatever is oldest on
31
+ # PyPI, which is not the combination the tests exercise.
32
+ "pydantic>=2.9",
33
+ "pyyaml>=6.0.2",
34
+ ]
35
+ optional-dependencies.arrays = [
36
+ "numpy>=2.2.6",
37
+ ]
38
+ # Readers for the formats results arrive in besides delimited text and JSON. Each is optional,
39
+ # because most manifests address a CSV or a JSON file and a Parquet or HDF5 library is not
40
+ # something every install should carry. Without one, a check of that format is `unchecked` and
41
+ # names the extra; it never fails. All are MIT, BSD or Apache-2.0. Not `pyreadr`, which is AGPL
42
+ # and would relicense this package; `rdata` parses `.rds` in Python and starts no R process.
43
+ optional-dependencies.hdf5 = [ "h5py>=3.12" ]
44
+ optional-dependencies.netcdf = [ "netcdf4>=1.7.2" ]
45
+ optional-dependencies.parquet = [ "pyarrow>=18" ]
46
+ optional-dependencies.rds = [ "rdata>=1" ]
47
+ optional-dependencies.sheets = [ "openpyxl>=3.1", "xlrd>=2.0.1" ]
48
+ optional-dependencies.stata-spss = [ "pyreadstat>=1.3.6" ]
49
+ urls.Changelog = "https://github.com/elliottower/reproducible-science/blob/main/CHANGELOG.md"
50
+ urls.Homepage = "https://github.com/elliottower/reproducible-science"
51
+ urls.Issues = "https://github.com/elliottower/reproducible-science/issues"
52
+ urls.Source = "https://github.com/elliottower/reproducible-science/tree/main/packages/claims"
53
+ scripts.claims = "claims.cli:main"
54
+
55
+ [dependency-groups]
56
+ dev = [
57
+ "numpy>=2.2.6",
58
+ "pytest>=9.1.1",
59
+ ]
60
+
61
+ [tool.hatch]
62
+ build.targets.wheel.packages = [ "src/claims" ]
63
+
64
+ [tool.uv]
65
+ # Resolved from the workspace during development and from PyPI once published, so a
66
+ # cross-package change is one commit rather than a release dance.
67
+ sources.citations = { workspace = true }
68
+
69
+ [tool.deptry]
70
+ # Without this every intra-package import reads as a transitive dependency on itself.
71
+ known_first_party = [ "claims" ]
72
+
73
+ [tool.pytest]
74
+ ini_options.addopts = "-m 'not corpus'"
75
+ ini_options.markers = [
76
+ "corpus: reads repositories outside this one, and may fetch them",
77
+ "integration: exercises a third-party library that is not a runtime dependency",
78
+ ]
@@ -0,0 +1,132 @@
1
+ """One contract for verifying declared evidence assertions against pinned artifacts.
2
+
3
+ A quotation in a manuscript and a number in a results file are the same kind of object: a
4
+ typed value asserted to be extractable from a pinned artifact. This package verifies that
5
+ assertion -- and nothing beyond it. Whether the evidence *supports* the sentence citing it is
6
+ a question about entailment, addressed elsewhere with model-based methods.
7
+
8
+ from claims import load, verify
9
+ from claims.policy import PUBLICATION
10
+
11
+ report = verify(load("repro.yaml")) # facts
12
+ verdict = PUBLICATION.assess(report) # judgment
13
+
14
+ Facts and judgment are separate calls because a missing optional citation is acceptable in a
15
+ draft and not in a submission, and one project's standard should not be everyone's.
16
+
17
+ Nothing here prints, exits, or reads global state.
18
+ """
19
+
20
+ from importlib.metadata import PackageNotFoundError
21
+ from importlib.metadata import version as _version
22
+
23
+ from claims.exceptions import (
24
+ ArtifactMissingError,
25
+ ArtifactUnreadableError,
26
+ BackendUnavailableError,
27
+ DigestMismatchError,
28
+ ManifestError,
29
+ ReproError,
30
+ UnknownEvidenceKindError,
31
+ )
32
+ from claims.manifest import DEFAULT_NAME, find, load
33
+ from claims.models import (
34
+ SCHEMA_VERSION,
35
+ ArtifactRef,
36
+ ArtifactState,
37
+ Availability,
38
+ Claim,
39
+ ClaimAssessment,
40
+ ComparisonMode,
41
+ ComparisonStatus,
42
+ Decision,
43
+ Digest,
44
+ Evidence,
45
+ ExecutionStatus,
46
+ ExtractionStatus,
47
+ Manifest,
48
+ MetricEvidence,
49
+ Outcome,
50
+ QuoteEvidence,
51
+ Reason,
52
+ TableCellEvidence,
53
+ Validity,
54
+ VerificationReport,
55
+ Warning_,
56
+ )
57
+ from claims.policy import EXPLORATORY, PROFILES, PUBLICATION, STRICT, Assessment, Policy, Severity
58
+ from claims.renderers import to_sarif
59
+ from claims.resolve import Resolution, read_table, resolve, resolve_pointer, sniff_delimiter
60
+ from claims.toolchain import ALONE
61
+ from claims.verify import (
62
+ DEFAULT_BACKENDS,
63
+ Backend,
64
+ MetricBackend,
65
+ QuoteBackend,
66
+ TableBackend,
67
+ ValueBackend,
68
+ verify,
69
+ )
70
+
71
+ # This package's own version, `claims-cli`'s, whatever else is installed: what `claims
72
+ # --version` prints and what a SARIF log names as its driver's version.
73
+ try:
74
+ __version__ = _version(ALONE)
75
+ except PackageNotFoundError: # a source tree with nothing installed
76
+ __version__ = "0+unknown"
77
+
78
+ __all__ = [
79
+ "DEFAULT_BACKENDS",
80
+ "DEFAULT_NAME",
81
+ "EXPLORATORY",
82
+ "PROFILES",
83
+ "PUBLICATION",
84
+ "SCHEMA_VERSION",
85
+ "STRICT",
86
+ "ArtifactMissingError",
87
+ "ArtifactRef",
88
+ "ArtifactState",
89
+ "ArtifactUnreadableError",
90
+ "Assessment",
91
+ "Availability",
92
+ "Backend",
93
+ "BackendUnavailableError",
94
+ "Claim",
95
+ "ClaimAssessment",
96
+ "ComparisonMode",
97
+ "ComparisonStatus",
98
+ "Decision",
99
+ "Digest",
100
+ "DigestMismatchError",
101
+ "Evidence",
102
+ "ExecutionStatus",
103
+ "ExtractionStatus",
104
+ "Manifest",
105
+ "ManifestError",
106
+ "MetricBackend",
107
+ "MetricEvidence",
108
+ "Outcome",
109
+ "Policy",
110
+ "QuoteBackend",
111
+ "QuoteEvidence",
112
+ "Reason",
113
+ "ReproError",
114
+ "Resolution",
115
+ "Severity",
116
+ "TableBackend",
117
+ "TableCellEvidence",
118
+ "UnknownEvidenceKindError",
119
+ "Validity",
120
+ "ValueBackend",
121
+ "VerificationReport",
122
+ "Warning_",
123
+ "__version__",
124
+ "find",
125
+ "load",
126
+ "read_table",
127
+ "resolve",
128
+ "resolve_pointer",
129
+ "sniff_delimiter",
130
+ "to_sarif",
131
+ "verify",
132
+ ]
@@ -0,0 +1,5 @@
1
+ """`python -m claims`, the same as the `claims` command."""
2
+
3
+ from claims.cli import main
4
+
5
+ raise SystemExit(main())
@@ -0,0 +1,6 @@
1
+ """One module per artifact format.
2
+
3
+ Each adapter translates a locator into the addressing its format already has, and every
4
+ one returns the same `Found` contract. Adding a format is a new module and a registry
5
+ entry, not an edit to a switchboard.
6
+ """