resint 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.
- resint-0.1.0/.gitignore +14 -0
- resint-0.1.0/LICENSE +202 -0
- resint-0.1.0/PKG-INFO +303 -0
- resint-0.1.0/README.md +279 -0
- resint-0.1.0/corpus/README.md +40 -0
- resint-0.1.0/corpus/clean/paper.tex +60 -0
- resint-0.1.0/corpus/clean/refs.bib +27 -0
- resint-0.1.0/corpus/clean/repo/README.md +5 -0
- resint-0.1.0/corpus/clean/repo/configs/base.yaml +4 -0
- resint-0.1.0/corpus/clean/repo/requirements.txt +3 -0
- resint-0.1.0/corpus/clean/repo/train.py +39 -0
- resint-0.1.0/corpus/planted/paper.tex +69 -0
- resint-0.1.0/corpus/planted/refs.bib +45 -0
- resint-0.1.0/corpus/planted/repo/README.md +17 -0
- resint-0.1.0/corpus/planted/repo/configs/base.yaml +10 -0
- resint-0.1.0/corpus/planted/repo/requirements.txt +5 -0
- resint-0.1.0/corpus/planted/repo/train.py +43 -0
- resint-0.1.0/corpus/unsupported/paper.tex +20 -0
- resint-0.1.0/pyproject.toml +61 -0
- resint-0.1.0/src/resint/__init__.py +39 -0
- resint-0.1.0/src/resint/cli.py +246 -0
- resint-0.1.0/src/resint/config.py +191 -0
- resint-0.1.0/src/resint/engine.py +122 -0
- resint-0.1.0/src/resint/ir/__init__.py +0 -0
- resint-0.1.0/src/resint/ir/finding.py +186 -0
- resint-0.1.0/src/resint/ir/paper.py +242 -0
- resint-0.1.0/src/resint/ir/repo.py +207 -0
- resint-0.1.0/src/resint/ir/span.py +75 -0
- resint-0.1.0/src/resint/mathx/__init__.py +0 -0
- resint-0.1.0/src/resint/mathx/special.py +159 -0
- resint-0.1.0/src/resint/parse/__init__.py +0 -0
- resint-0.1.0/src/resint/parse/bibtex.py +222 -0
- resint-0.1.0/src/resint/parse/citations.py +63 -0
- resint-0.1.0/src/resint/parse/code.py +235 -0
- resint-0.1.0/src/resint/parse/configs.py +165 -0
- resint-0.1.0/src/resint/parse/document.py +163 -0
- resint-0.1.0/src/resint/parse/extract.py +359 -0
- resint-0.1.0/src/resint/parse/latex.py +334 -0
- resint-0.1.0/src/resint/parse/repo.py +235 -0
- resint-0.1.0/src/resint/parse/tables.py +288 -0
- resint-0.1.0/src/resint/report/__init__.py +0 -0
- resint-0.1.0/src/resint/report/sarif.py +130 -0
- resint-0.1.0/src/resint/report/terminal.py +151 -0
- resint-0.1.0/src/resint/resolve/__init__.py +19 -0
- resint-0.1.0/src/resint/resolve/base.py +117 -0
- resint-0.1.0/src/resint/resolve/http.py +237 -0
- resint-0.1.0/src/resint/rules/__init__.py +31 -0
- resint-0.1.0/src/resint/rules/bib/__init__.py +0 -0
- resint-0.1.0/src/resint/rules/bib/drift.py +86 -0
- resint-0.1.0/src/resint/rules/bib/orphans.py +74 -0
- resint-0.1.0/src/resint/rules/bib/unresolved.py +74 -0
- resint-0.1.0/src/resint/rules/numbers/__init__.py +0 -0
- resint-0.1.0/src/resint/rules/numbers/internal_mismatch.py +110 -0
- resint-0.1.0/src/resint/rules/numbers/table_arithmetic.py +115 -0
- resint-0.1.0/src/resint/rules/registry.py +244 -0
- resint-0.1.0/src/resint/rules/repro/__init__.py +0 -0
- resint-0.1.0/src/resint/rules/repro/deps.py +61 -0
- resint-0.1.0/src/resint/rules/repro/entrypoint.py +43 -0
- resint-0.1.0/src/resint/rules/repro/ghost.py +90 -0
- resint-0.1.0/src/resint/rules/repro/hparam_drift.py +130 -0
- resint-0.1.0/src/resint/rules/repro/seed_claim.py +97 -0
- resint-0.1.0/src/resint/rules/stats/__init__.py +0 -0
- resint-0.1.0/src/resint/rules/stats/grim.py +118 -0
- resint-0.1.0/src/resint/rules/stats/pvalue.py +163 -0
- resint-0.1.0/src/resint/rules/stats/significance.py +93 -0
- resint-0.1.0/tests/conftest.py +97 -0
- resint-0.1.0/tests/test_bibtex.py +213 -0
- resint-0.1.0/tests/test_config.py +192 -0
- resint-0.1.0/tests/test_discovery.py +28 -0
- resint-0.1.0/tests/test_extract.py +172 -0
- resint-0.1.0/tests/test_finding.py +73 -0
- resint-0.1.0/tests/test_grim.py +129 -0
- resint-0.1.0/tests/test_latex.py +127 -0
- resint-0.1.0/tests/test_pipeline.py +278 -0
- resint-0.1.0/tests/test_pvalue.py +142 -0
- resint-0.1.0/tests/test_registry.py +142 -0
- resint-0.1.0/tests/test_report.py +167 -0
- resint-0.1.0/tests/test_repro.py +417 -0
- resint-0.1.0/tests/test_resolve.py +306 -0
- resint-0.1.0/tests/test_sarif.py +213 -0
- resint-0.1.0/tests/test_special.py +95 -0
- resint-0.1.0/tests/test_tables.py +284 -0
resint-0.1.0/.gitignore
ADDED
resint-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
resint-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: resint
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A linter for research papers.
|
|
5
|
+
Project-URL: Homepage, https://github.com/ArjunSharma06/resint
|
|
6
|
+
Project-URL: Issues, https://github.com/ArjunSharma06/resint/issues
|
|
7
|
+
Project-URL: Contributing, https://github.com/ArjunSharma06/resint/blob/main/CONTRIBUTING.md
|
|
8
|
+
License-Expression: Apache-2.0
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Keywords: bibliography,latex,linter,meta-science,peer-review,reproducibility,research,static-analysis,statistics
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering
|
|
18
|
+
Classifier: Topic :: Text Processing :: Markup :: LaTeX
|
|
19
|
+
Classifier: Typing :: Typed
|
|
20
|
+
Requires-Python: >=3.11
|
|
21
|
+
Provides-Extra: dev
|
|
22
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
|
|
25
|
+
# resint
|
|
26
|
+
|
|
27
|
+
[](https://github.com/ArjunSharma06/resint/actions/workflows/ci.yml)
|
|
28
|
+
[](https://pypi.org/project/resint/)
|
|
29
|
+
[](https://pypi.org/project/resint/)
|
|
30
|
+
[](LICENSE)
|
|
31
|
+
|
|
32
|
+
**A linter for research papers.** It reads a paper the way a compiler reads
|
|
33
|
+
code — and reports what does not add up.
|
|
34
|
+
|
|
35
|
+
```console
|
|
36
|
+
$ resint check paper.tex --repo ./code
|
|
37
|
+
|
|
38
|
+
high ✓ numbers/internal-mismatch Results:L23 <-> table1:r2c1:L35
|
|
39
|
+
Results reports accuracy of 94.2, but table1 reports 93.8 for the same
|
|
40
|
+
quantity (column holds 91.4, 93.8). A revised table with an unrevised
|
|
41
|
+
claim looks exactly like this.
|
|
42
|
+
|
|
43
|
+
high ✓ repro/hparam-drift Method:L13 <-> configs/base.yaml:L3
|
|
44
|
+
learning rate is 3e-4 in the paper, but a run would use 1e-4 from
|
|
45
|
+
configs/base.yaml. Resolved through argparse default in train.py
|
|
46
|
+
(3e-4) -> configs/base.yaml (1e-4).
|
|
47
|
+
|
|
48
|
+
high ✓ repro/seed-claim claim:L14 <-> train.py:L31
|
|
49
|
+
The paper reports results over 5 runs, but the repository fixes a
|
|
50
|
+
single seed (42) in 3 places and never varies it.
|
|
51
|
+
affects: every error bar downstream of this claim
|
|
52
|
+
|
|
53
|
+
med ✓ bib/unresolved [zhang2023].doi:L18
|
|
54
|
+
The DOI 10.5555/9999999 does not resolve, and no index returned a
|
|
55
|
+
matching record.
|
|
56
|
+
|
|
57
|
+
11 findings (4 high, 5 med, 2 low) · 1.8s · no API key used
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**No API key. No account. No dependencies.** Most of resint is arithmetic,
|
|
61
|
+
parsing, and HTTP. It runs offline in about two seconds.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Who it's for
|
|
66
|
+
|
|
67
|
+
| | What you get |
|
|
68
|
+
|---|---|
|
|
69
|
+
| **Writing a paper** | Catch the inconsistencies before a reviewer does. Run it on your draft the way you run a spellchecker. |
|
|
70
|
+
| **Submitting** | The stale abstract number, the citation that does not resolve, the config that no longer matches your methods section. |
|
|
71
|
+
| **Reviewing** | A five-minute read of a submission's statistics and bibliography. Runs fully offline, so nothing confidential leaves your machine. |
|
|
72
|
+
| **Reading** | Before you spend an afternoon on someone's repository, find out whether its numbers, links, and hyperparameters agree with the paper. |
|
|
73
|
+
|
|
74
|
+
It works on any field. The statistics and bibliography rules assume nothing
|
|
75
|
+
about your discipline; the `repro/` rules assume you have code.
|
|
76
|
+
|
|
77
|
+
## Install
|
|
78
|
+
|
|
79
|
+
```console
|
|
80
|
+
pipx install resint # Python 3.11+, no other dependencies
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Quickstart
|
|
84
|
+
|
|
85
|
+
```console
|
|
86
|
+
resint check paper.tex # the paper alone
|
|
87
|
+
resint check paper.tex --repo ./code # paper against its code
|
|
88
|
+
resint check paper.tex --offline # no network at all
|
|
89
|
+
resint check paper.tex --format sarif # GitHub code scanning
|
|
90
|
+
resint rules # what it checks, and what it misses
|
|
91
|
+
resint init # write a .resint.yml
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Exits non-zero when a high-severity finding is present, so it drops into CI
|
|
95
|
+
without a wrapper.
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## What it checks
|
|
100
|
+
|
|
101
|
+
```mermaid
|
|
102
|
+
%%{init: {'theme':'base','themeVariables':{
|
|
103
|
+
'fontSize':'15px','textColor':'#15171d','primaryTextColor':'#15171d',
|
|
104
|
+
'lineColor':'#5b6472',
|
|
105
|
+
'cScale0':'#2b4acb','cScaleLabel0':'#ffffff','cScalePeer0':'#1e3596',
|
|
106
|
+
'cScale1':'#8fadf2','cScaleLabel1':'#0f1c3d','cScalePeer1':'#2b4acb',
|
|
107
|
+
'cScale2':'#6fc9a4','cScaleLabel2':'#0c2b20','cScalePeer2':'#1b7355',
|
|
108
|
+
'cScale3':'#e8b45c','cScaleLabel3':'#3a2405','cScalePeer3':'#a85800',
|
|
109
|
+
'cScale4':'#ef9a90','cScaleLabel4':'#3d100c','cScalePeer4':'#b7332a',
|
|
110
|
+
'cScale5':'#b79ae0','cScaleLabel5':'#241040','cScalePeer5':'#6b3fa0'
|
|
111
|
+
}}}%%
|
|
112
|
+
mindmap
|
|
113
|
+
root((resint))
|
|
114
|
+
numbers
|
|
115
|
+
internal-mismatch
|
|
116
|
+
abstract vs table
|
|
117
|
+
table-arithmetic
|
|
118
|
+
totals that don't total
|
|
119
|
+
stats
|
|
120
|
+
pvalue-mismatch
|
|
121
|
+
recompute p from the statistic
|
|
122
|
+
grim
|
|
123
|
+
means impossible for the N
|
|
124
|
+
significance-unsupported
|
|
125
|
+
reliable claims, no test
|
|
126
|
+
bib
|
|
127
|
+
unresolved
|
|
128
|
+
references in no index
|
|
129
|
+
metadata-drift
|
|
130
|
+
year or title disagrees
|
|
131
|
+
orphans
|
|
132
|
+
cited but undefined
|
|
133
|
+
repro
|
|
134
|
+
hparam-drift
|
|
135
|
+
paper vs effective config
|
|
136
|
+
seed-claim
|
|
137
|
+
five seeds, one seed
|
|
138
|
+
entrypoint-missing
|
|
139
|
+
README points at nothing
|
|
140
|
+
ghost-repo
|
|
141
|
+
no code, only promises
|
|
142
|
+
unpinned-deps
|
|
143
|
+
no record of the environment
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
| Rule | Catches | Needs |
|
|
147
|
+
|---|---|---|
|
|
148
|
+
| `numbers/internal-mismatch` | The abstract and the results table disagree about one value | |
|
|
149
|
+
| `numbers/table-arithmetic` | Stated totals that do not equal the entries above them | |
|
|
150
|
+
| `stats/pvalue-mismatch` | A reported *p* that the test statistic does not produce | |
|
|
151
|
+
| `stats/grim` | A mean arithmetically impossible for the stated *N* | |
|
|
152
|
+
| `stats/significance-unsupported` | Claims of reliability with no test anywhere in the paper | |
|
|
153
|
+
| `bib/unresolved` | References that exist in no index — the fabricated-citation signal | network |
|
|
154
|
+
| `bib/metadata-drift` | Entries whose year or title disagrees with the canonical record | network |
|
|
155
|
+
| `bib/orphans` | Keys cited with no entry, entries never cited | |
|
|
156
|
+
| `repro/hparam-drift` | The paper's hyperparameters against the ones a run would use | `--repo` |
|
|
157
|
+
| `repro/seed-claim` | "Averaged over five seeds" when the code fixes one | `--repo` |
|
|
158
|
+
| `repro/entrypoint-missing` | README commands pointing at files that do not exist | `--repo` |
|
|
159
|
+
| `repro/ghost-repo` | A linked repository holding no code | `--repo` |
|
|
160
|
+
| `repro/unpinned-deps` | Nothing recording the environment the results came from | `--repo` |
|
|
161
|
+
|
|
162
|
+
`resint rules` prints each rule's blind spots. **Every rule declares what it
|
|
163
|
+
cannot detect**, and that limitation travels with the finding into JSON and
|
|
164
|
+
SARIF output.
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## The two ideas
|
|
169
|
+
|
|
170
|
+
### Findings are evidence, not opinions
|
|
171
|
+
|
|
172
|
+
A finding says *"Results line 23 reports 94.2; table 1 row 2 column 1 reports
|
|
173
|
+
93.8."* There is nothing left for you to verify.
|
|
174
|
+
|
|
175
|
+
Every finding carries **at least two anchors**, enforced at construction — not
|
|
176
|
+
by convention, by the type system:
|
|
177
|
+
|
|
178
|
+
```python
|
|
179
|
+
Finding(anchors=[claim_span]) # raises AnchorError
|
|
180
|
+
Finding(anchors=[claim_span, evidence_span]) # a comparison you can check
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
One anchor is an assertion you have to go and check. Two make it a comparison
|
|
184
|
+
you can verify by reading the finding itself. That difference is the product.
|
|
185
|
+
|
|
186
|
+
The `✓` marks a finding as **computed** rather than judged.
|
|
187
|
+
|
|
188
|
+
### It tells you what it could not check
|
|
189
|
+
|
|
190
|
+
*"No findings"* and *"did not look"* are different statements, and a tool that
|
|
191
|
+
conflates them is worse than useless.
|
|
192
|
+
|
|
193
|
+
```
|
|
194
|
+
unchecked: table3 not checked: row widths disagree ([3, 4])
|
|
195
|
+
unchecked: mean at line 57 not checked: 2 sample sizes in the same sentence
|
|
196
|
+
unchecked: 5 references could not be looked up (offline); not reported as missing
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## How it works
|
|
202
|
+
|
|
203
|
+
```mermaid
|
|
204
|
+
flowchart LR
|
|
205
|
+
A["paper.tex<br/>refs.bib<br/>./code"]:::io --> B["Parse"]:::step
|
|
206
|
+
B --> C[("IR<br/>typed, span-anchored")]:::ir
|
|
207
|
+
C --> D{"Rules"}:::step
|
|
208
|
+
D -->|deterministic| E["Findings"]:::out
|
|
209
|
+
D -.->|model-assisted<br/>optional| E
|
|
210
|
+
E --> F["term · json · sarif"]:::io
|
|
211
|
+
|
|
212
|
+
classDef io fill:#f4f5f8,stroke:#c9cdd8,color:#15171d
|
|
213
|
+
classDef step fill:#ffffff,stroke:#8a91a3,color:#15171d
|
|
214
|
+
classDef ir fill:#e7eafa,stroke:#2b4acb,color:#15171d,font-weight:bold
|
|
215
|
+
classDef out fill:#e4f1eb,stroke:#1b7355,color:#15171d,font-weight:bold
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
Every character of the intermediate representation remembers where it came
|
|
219
|
+
from, so a finding that says `line 98` means line 98 of *your* file.
|
|
220
|
+
|
|
221
|
+
Rules declare what they need, and the engine builds only that. A run whose
|
|
222
|
+
rules never declare `paper.resolutions` **never opens a socket** — laziness is
|
|
223
|
+
the privacy mechanism, not a separate flag.
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## Precision over coverage
|
|
228
|
+
|
|
229
|
+
A rule that stays silent one time in five where it should have spoken is a
|
|
230
|
+
good rule. A rule that speaks wrongly one time in twenty is a liability. This
|
|
231
|
+
tool tells people something is wrong with their work, and a single confident
|
|
232
|
+
false accusation costs more trust than a hundred correct findings earn.
|
|
233
|
+
|
|
234
|
+
So resint abstains — loudly — wherever it cannot be sure:
|
|
235
|
+
|
|
236
|
+
- A mean is checked only when **exactly one** sample size sits in its sentence.
|
|
237
|
+
- A reference is reported missing only when the indices were actually reached.
|
|
238
|
+
**A lookup that fails is never a finding.**
|
|
239
|
+
- A prose value is compared to a table cell only when it is *near* one. A
|
|
240
|
+
distant value is a different quantity, not a stale number.
|
|
241
|
+
- A hyperparameter is compared only when the repository yields **one**
|
|
242
|
+
effective value. Two configs disagreeing at the same precedence level means
|
|
243
|
+
a run's actual value cannot be known.
|
|
244
|
+
- A seed read from an argument or set inside a loop counts as varying, even
|
|
245
|
+
though the source shows one call.
|
|
246
|
+
- A table whose grid did not parse is skipped and reported, never guessed at.
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## Configuration
|
|
251
|
+
|
|
252
|
+
```yaml
|
|
253
|
+
# .resint.yml
|
|
254
|
+
suppress:
|
|
255
|
+
- rule: bib/metadata-drift
|
|
256
|
+
match: "[vaswani2017]"
|
|
257
|
+
reason: "Cites the proceedings version deliberately."
|
|
258
|
+
expires: "2027-01-01"
|
|
259
|
+
|
|
260
|
+
rules:
|
|
261
|
+
stats/grim: off # no integer-scale response data in this work
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
**Every suppression states a reason.** This file is the record of each
|
|
265
|
+
judgement made about the work, and a silenced finding with no explanation is
|
|
266
|
+
unauditable six months later. Suppressed findings still appear in JSON and
|
|
267
|
+
SARIF marked with their reason, so a suppression can never hide a regression.
|
|
268
|
+
|
|
269
|
+
## Privacy
|
|
270
|
+
|
|
271
|
+
resint runs entirely on your machine. The only network access is reference
|
|
272
|
+
resolution, which sends the **titles and DOIs of works your paper already
|
|
273
|
+
cites publicly**. The manuscript itself is never transmitted. `--offline`
|
|
274
|
+
disables even that, and the reference rules abstain rather than guess.
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
## Documentation
|
|
279
|
+
|
|
280
|
+
| | |
|
|
281
|
+
|---|---|
|
|
282
|
+
| [docs/rules.md](docs/rules.md) | Every rule, what it catches, what it cannot detect |
|
|
283
|
+
| [docs/architecture.md](docs/architecture.md) | The IR, the rule engine, the pipeline |
|
|
284
|
+
| [docs/configuration.md](docs/configuration.md) | `.resint.yml` in full |
|
|
285
|
+
| [docs/rule-authoring.md](docs/rule-authoring.md) | How to write a rule, and the bar it has to clear |
|
|
286
|
+
| [CHANGELOG.md](CHANGELOG.md) | What shipped, when |
|
|
287
|
+
|
|
288
|
+
## Status
|
|
289
|
+
|
|
290
|
+
**Early — v0.1.** Thirteen of eighteen planned rules are implemented and
|
|
291
|
+
tested. The API is not stable yet.
|
|
292
|
+
|
|
293
|
+
Next: `repro/dead-asset`, and the model-assisted tier (`claim/`, `eval/`) —
|
|
294
|
+
which checks whether the code implements what the paper claims. That tier
|
|
295
|
+
needs a provider and stays **optional**; everything above runs with no key.
|
|
296
|
+
|
|
297
|
+
Found a false positive? [That's the most valuable issue you can
|
|
298
|
+
open](https://github.com/ArjunSharma06/resint/issues) — each one becomes a
|
|
299
|
+
regression fixture.
|
|
300
|
+
|
|
301
|
+
## Licence
|
|
302
|
+
|
|
303
|
+
Apache-2.0.
|