rrdoctor 0.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. rrdoctor-0.2.1/.github/CODEOWNERS +1 -0
  2. rrdoctor-0.2.1/.github/ISSUE_TEMPLATE/bug_report.yml +38 -0
  3. rrdoctor-0.2.1/.github/ISSUE_TEMPLATE/config.yml +5 -0
  4. rrdoctor-0.2.1/.github/ISSUE_TEMPLATE/false_negative.yml +37 -0
  5. rrdoctor-0.2.1/.github/ISSUE_TEMPLATE/false_positive.yml +40 -0
  6. rrdoctor-0.2.1/.github/ISSUE_TEMPLATE/feature_request.yml +11 -0
  7. rrdoctor-0.2.1/.github/ISSUE_TEMPLATE/rule_request.yml +36 -0
  8. rrdoctor-0.2.1/.github/ISSUE_TEMPLATE/scan_case.yml +32 -0
  9. rrdoctor-0.2.1/.github/PULL_REQUEST_TEMPLATE.md +9 -0
  10. rrdoctor-0.2.1/.github/workflows/action-smoke-test.yml +25 -0
  11. rrdoctor-0.2.1/.github/workflows/ci.yml +36 -0
  12. rrdoctor-0.2.1/.github/workflows/release.yml +29 -0
  13. rrdoctor-0.2.1/.gitignore +22 -0
  14. rrdoctor-0.2.1/.pre-commit-config.yaml +7 -0
  15. rrdoctor-0.2.1/.rrdoctor-badge.json +6 -0
  16. rrdoctor-0.2.1/.rrdoctor.yml +29 -0
  17. rrdoctor-0.2.1/AGENTS.md +71 -0
  18. rrdoctor-0.2.1/CHANGELOG.md +50 -0
  19. rrdoctor-0.2.1/CITATION.cff +10 -0
  20. rrdoctor-0.2.1/CODE_OF_CONDUCT.md +9 -0
  21. rrdoctor-0.2.1/CONTRIBUTING.md +40 -0
  22. rrdoctor-0.2.1/LICENSE +21 -0
  23. rrdoctor-0.2.1/Makefile +16 -0
  24. rrdoctor-0.2.1/PKG-INFO +321 -0
  25. rrdoctor-0.2.1/README.md +284 -0
  26. rrdoctor-0.2.1/RELEASE_NOTES_v0.1.0.md +54 -0
  27. rrdoctor-0.2.1/RELEASE_NOTES_v0.2.0.md +54 -0
  28. rrdoctor-0.2.1/ROADMAP.md +36 -0
  29. rrdoctor-0.2.1/SECURITY.md +19 -0
  30. rrdoctor-0.2.1/action.yml +145 -0
  31. rrdoctor-0.2.1/docs/agent-workflows.md +53 -0
  32. rrdoctor-0.2.1/docs/autofix.md +56 -0
  33. rrdoctor-0.2.1/docs/checks.md +54 -0
  34. rrdoctor-0.2.1/docs/configuration.md +58 -0
  35. rrdoctor-0.2.1/docs/faq.md +23 -0
  36. rrdoctor-0.2.1/docs/github-action.md +58 -0
  37. rrdoctor-0.2.1/docs/index.md +17 -0
  38. rrdoctor-0.2.1/docs/initial-issues.md +346 -0
  39. rrdoctor-0.2.1/docs/launch-checklist.md +192 -0
  40. rrdoctor-0.2.1/docs/maintainer-workflows.md +42 -0
  41. rrdoctor-0.2.1/docs/pull-request-automation.md +76 -0
  42. rrdoctor-0.2.1/docs/pypi-publishing.md +30 -0
  43. rrdoctor-0.2.1/docs/quickstart.md +93 -0
  44. rrdoctor-0.2.1/docs/report-format.md +68 -0
  45. rrdoctor-0.2.1/docs/research-reproducibility.md +25 -0
  46. rrdoctor-0.2.1/docs/rule-authoring.md +41 -0
  47. rrdoctor-0.2.1/examples/github-workflow.yml +17 -0
  48. rrdoctor-0.2.1/examples/minimal-research-project/LICENSE +1 -0
  49. rrdoctor-0.2.1/examples/minimal-research-project/README.md +17 -0
  50. rrdoctor-0.2.1/examples/minimal-research-project/requirements.txt +1 -0
  51. rrdoctor-0.2.1/examples/minimal-research-project/scripts/reproduce.sh +3 -0
  52. rrdoctor-0.2.1/examples/ml-paper-repo/CITATION.cff +6 -0
  53. rrdoctor-0.2.1/examples/ml-paper-repo/LICENSE +1 -0
  54. rrdoctor-0.2.1/examples/ml-paper-repo/README.md +23 -0
  55. rrdoctor-0.2.1/examples/ml-paper-repo/configs/default.yaml +1 -0
  56. rrdoctor-0.2.1/examples/ml-paper-repo/data/README.md +3 -0
  57. rrdoctor-0.2.1/examples/ml-paper-repo/pyproject.toml +6 -0
  58. rrdoctor-0.2.1/examples/ml-paper-repo/results/README.md +3 -0
  59. rrdoctor-0.2.1/examples/ml-paper-repo/scripts/train.py +4 -0
  60. rrdoctor-0.2.1/examples/pr-comment-workflow.yml +27 -0
  61. rrdoctor-0.2.1/examples/reports/fix-plan.md +110 -0
  62. rrdoctor-0.2.1/examples/reports/healthy-report.md +36 -0
  63. rrdoctor-0.2.1/examples/reports/missing-basics-report.md +155 -0
  64. rrdoctor-0.2.1/examples/reports/report.json +274 -0
  65. rrdoctor-0.2.1/examples/reports/report.sarif +1033 -0
  66. rrdoctor-0.2.1/examples/reports/self-scan-report.md +36 -0
  67. rrdoctor-0.2.1/examples/rrdoctor.yml +20 -0
  68. rrdoctor-0.2.1/pyproject.toml +91 -0
  69. rrdoctor-0.2.1/src/rrdoctor/__init__.py +3 -0
  70. rrdoctor-0.2.1/src/rrdoctor/__main__.py +6 -0
  71. rrdoctor-0.2.1/src/rrdoctor/baseline.py +81 -0
  72. rrdoctor-0.2.1/src/rrdoctor/cli.py +556 -0
  73. rrdoctor-0.2.1/src/rrdoctor/config.py +145 -0
  74. rrdoctor-0.2.1/src/rrdoctor/fixers.py +281 -0
  75. rrdoctor-0.2.1/src/rrdoctor/mcp_server.py +67 -0
  76. rrdoctor-0.2.1/src/rrdoctor/models.py +244 -0
  77. rrdoctor-0.2.1/src/rrdoctor/reporting/__init__.py +1 -0
  78. rrdoctor-0.2.1/src/rrdoctor/reporting/agent.py +132 -0
  79. rrdoctor-0.2.1/src/rrdoctor/reporting/appendix.py +231 -0
  80. rrdoctor-0.2.1/src/rrdoctor/reporting/badge.py +81 -0
  81. rrdoctor-0.2.1/src/rrdoctor/reporting/json_report.py +13 -0
  82. rrdoctor-0.2.1/src/rrdoctor/reporting/markdown.py +108 -0
  83. rrdoctor-0.2.1/src/rrdoctor/reporting/sarif.py +67 -0
  84. rrdoctor-0.2.1/src/rrdoctor/rules/__init__.py +1 -0
  85. rrdoctor-0.2.1/src/rrdoctor/rules/base.py +128 -0
  86. rrdoctor-0.2.1/src/rrdoctor/rules/ci.py +91 -0
  87. rrdoctor-0.2.1/src/rrdoctor/rules/citation.py +75 -0
  88. rrdoctor-0.2.1/src/rrdoctor/rules/data.py +130 -0
  89. rrdoctor-0.2.1/src/rrdoctor/rules/environment.py +323 -0
  90. rrdoctor-0.2.1/src/rrdoctor/rules/experiments.py +186 -0
  91. rrdoctor-0.2.1/src/rrdoctor/rules/governance.py +88 -0
  92. rrdoctor-0.2.1/src/rrdoctor/rules/license.py +28 -0
  93. rrdoctor-0.2.1/src/rrdoctor/rules/notebooks.py +248 -0
  94. rrdoctor-0.2.1/src/rrdoctor/rules/paths.py +77 -0
  95. rrdoctor-0.2.1/src/rrdoctor/rules/project_metadata.py +75 -0
  96. rrdoctor-0.2.1/src/rrdoctor/rules/readme.py +141 -0
  97. rrdoctor-0.2.1/src/rrdoctor/rules/registry.py +55 -0
  98. rrdoctor-0.2.1/src/rrdoctor/rules/release.py +80 -0
  99. rrdoctor-0.2.1/src/rrdoctor/rules/security.py +90 -0
  100. rrdoctor-0.2.1/src/rrdoctor/rules/tests.py +66 -0
  101. rrdoctor-0.2.1/src/rrdoctor/scanner.py +132 -0
  102. rrdoctor-0.2.1/src/rrdoctor/scoring.py +44 -0
  103. rrdoctor-0.2.1/src/rrdoctor/verification.py +262 -0
  104. rrdoctor-0.2.1/tests/fixtures/healthy-research-repo/.github/workflows/ci.yml +8 -0
  105. rrdoctor-0.2.1/tests/fixtures/healthy-research-repo/.gitignore +8 -0
  106. rrdoctor-0.2.1/tests/fixtures/healthy-research-repo/CHANGELOG.md +5 -0
  107. rrdoctor-0.2.1/tests/fixtures/healthy-research-repo/CITATION.cff +8 -0
  108. rrdoctor-0.2.1/tests/fixtures/healthy-research-repo/LICENSE +13 -0
  109. rrdoctor-0.2.1/tests/fixtures/healthy-research-repo/README.md +29 -0
  110. rrdoctor-0.2.1/tests/fixtures/healthy-research-repo/configs/default.yaml +2 -0
  111. rrdoctor-0.2.1/tests/fixtures/healthy-research-repo/data/README.md +3 -0
  112. rrdoctor-0.2.1/tests/fixtures/healthy-research-repo/pyproject.toml +9 -0
  113. rrdoctor-0.2.1/tests/fixtures/healthy-research-repo/scripts/reproduce.sh +3 -0
  114. rrdoctor-0.2.1/tests/fixtures/healthy-research-repo/tests/test_placeholder.py +2 -0
  115. rrdoctor-0.2.1/tests/fixtures/missing-basics-repo/src/model.py +2 -0
  116. rrdoctor-0.2.1/tests/fixtures/ml-project-repo/.github/workflows/ci.yml +8 -0
  117. rrdoctor-0.2.1/tests/fixtures/ml-project-repo/.gitignore +8 -0
  118. rrdoctor-0.2.1/tests/fixtures/ml-project-repo/CHANGELOG.md +5 -0
  119. rrdoctor-0.2.1/tests/fixtures/ml-project-repo/CITATION.cff +6 -0
  120. rrdoctor-0.2.1/tests/fixtures/ml-project-repo/LICENSE +1 -0
  121. rrdoctor-0.2.1/tests/fixtures/ml-project-repo/README.md +21 -0
  122. rrdoctor-0.2.1/tests/fixtures/ml-project-repo/configs/default.yaml +2 -0
  123. rrdoctor-0.2.1/tests/fixtures/ml-project-repo/data/README.md +3 -0
  124. rrdoctor-0.2.1/tests/fixtures/ml-project-repo/pyproject.toml +6 -0
  125. rrdoctor-0.2.1/tests/fixtures/ml-project-repo/results/README.md +3 -0
  126. rrdoctor-0.2.1/tests/fixtures/ml-project-repo/scripts/train.py +12 -0
  127. rrdoctor-0.2.1/tests/fixtures/ml-project-repo/tests/test_train.py +2 -0
  128. rrdoctor-0.2.1/tests/fixtures/notebook-issues-repo/README.md +3 -0
  129. rrdoctor-0.2.1/tests/fixtures/notebook-issues-repo/leaky.py +1 -0
  130. rrdoctor-0.2.1/tests/fixtures/notebook-issues-repo/notebooks/problem.ipynb +46 -0
  131. rrdoctor-0.2.1/tests/test_appendix_and_verify.py +64 -0
  132. rrdoctor-0.2.1/tests/test_baseline.py +84 -0
  133. rrdoctor-0.2.1/tests/test_cli.py +73 -0
  134. rrdoctor-0.2.1/tests/test_config.py +36 -0
  135. rrdoctor-0.2.1/tests/test_fixers.py +88 -0
  136. rrdoctor-0.2.1/tests/test_plan_badge.py +70 -0
  137. rrdoctor-0.2.1/tests/test_profiles.py +30 -0
  138. rrdoctor-0.2.1/tests/test_registry.py +27 -0
  139. rrdoctor-0.2.1/tests/test_reporting.py +34 -0
  140. rrdoctor-0.2.1/tests/test_rules_environment.py +61 -0
  141. rrdoctor-0.2.1/tests/test_rules_experiments.py +37 -0
  142. rrdoctor-0.2.1/tests/test_rules_extra.py +56 -0
  143. rrdoctor-0.2.1/tests/test_rules_notebooks.py +23 -0
  144. rrdoctor-0.2.1/tests/test_rules_readme.py +18 -0
  145. rrdoctor-0.2.1/tests/test_rules_security.py +20 -0
  146. rrdoctor-0.2.1/tests/test_scanner.py +46 -0
@@ -0,0 +1 @@
1
+ * @OWNER
@@ -0,0 +1,38 @@
1
+ name: Bug report
2
+ description: Report a scanner, CLI, or report-generation bug.
3
+ title: "[Bug]: "
4
+ labels: ["bug"]
5
+ body:
6
+ - type: textarea
7
+ id: summary
8
+ attributes:
9
+ label: Summary
10
+ validations:
11
+ required: true
12
+ - type: textarea
13
+ id: reproduce
14
+ attributes:
15
+ label: Minimal reproduction
16
+ description: Include a tiny fixture or repository structure if possible.
17
+ validations:
18
+ required: true
19
+ - type: textarea
20
+ id: expected
21
+ attributes:
22
+ label: Expected behavior
23
+ validations:
24
+ required: true
25
+ - type: textarea
26
+ id: environment
27
+ attributes:
28
+ label: Environment
29
+ description: Include rrdoctor version, Python version, OS, and command.
30
+ validations:
31
+ required: true
32
+ - type: checkboxes
33
+ id: safety
34
+ attributes:
35
+ label: Safety check
36
+ options:
37
+ - label: I removed real secrets, private data, and confidential repository content.
38
+ required: true
@@ -0,0 +1,5 @@
1
+ blank_issues_enabled: true
2
+ contact_links:
3
+ - name: Security reports
4
+ url: https://github.com/OWNER/research-repo-doctor/security/policy
5
+ about: Please report security concerns privately.
@@ -0,0 +1,37 @@
1
+ name: False negative report
2
+ description: Report a reproducibility risk that Research Repo Doctor missed.
3
+ title: "[False negative]: "
4
+ labels: ["false-negative", "rules"]
5
+ body:
6
+ - type: textarea
7
+ id: missed-risk
8
+ attributes:
9
+ label: Missed reproducibility risk
10
+ description: What should rrdoctor have flagged?
11
+ validations:
12
+ required: true
13
+ - type: textarea
14
+ id: repository-shape
15
+ attributes:
16
+ label: Minimal repository shape
17
+ description: Share a sanitized tree, fixture, or public example.
18
+ validations:
19
+ required: true
20
+ - type: input
21
+ id: expected-rule
22
+ attributes:
23
+ label: Existing or proposed rule ID
24
+ placeholder: RRD043 or new rule
25
+ - type: textarea
26
+ id: expected-finding
27
+ attributes:
28
+ label: Expected finding and remediation
29
+ validations:
30
+ required: true
31
+ - type: checkboxes
32
+ id: safety
33
+ attributes:
34
+ label: Safety check
35
+ options:
36
+ - label: I removed real secrets, private data, and confidential repository content.
37
+ required: true
@@ -0,0 +1,40 @@
1
+ name: False positive
2
+ description: Report a rule that flagged acceptable repository content.
3
+ title: "[False positive]: "
4
+ labels: ["false-positive", "rules"]
5
+ body:
6
+ - type: input
7
+ id: rule
8
+ attributes:
9
+ label: Rule ID
10
+ placeholder: RRD060
11
+ validations:
12
+ required: true
13
+ - type: textarea
14
+ id: evidence
15
+ attributes:
16
+ label: Why this is a false positive
17
+ description: Explain why the finding is misleading for this repository.
18
+ validations:
19
+ required: true
20
+ - type: textarea
21
+ id: repository-shape
22
+ attributes:
23
+ label: Minimal repository shape
24
+ description: Share a sanitized tree, fixture, or public example.
25
+ validations:
26
+ required: true
27
+ - type: textarea
28
+ id: expected
29
+ attributes:
30
+ label: Expected behavior
31
+ description: Should the rule be quiet, lower severity, or provide different guidance?
32
+ validations:
33
+ required: true
34
+ - type: checkboxes
35
+ id: safety
36
+ attributes:
37
+ label: Safety check
38
+ options:
39
+ - label: I removed real secrets, private data, and confidential repository content.
40
+ required: true
@@ -0,0 +1,11 @@
1
+ name: Feature request
2
+ description: Suggest a CLI, action, or reporting improvement.
3
+ title: "[Feature]: "
4
+ labels: ["enhancement"]
5
+ body:
6
+ - type: textarea
7
+ id: feature
8
+ attributes:
9
+ label: Feature
10
+ validations:
11
+ required: true
@@ -0,0 +1,36 @@
1
+ name: New rule request
2
+ description: Propose a deterministic reproducibility rule.
3
+ title: "[Rule]: "
4
+ labels: ["rule-request"]
5
+ body:
6
+ - type: textarea
7
+ id: problem
8
+ attributes:
9
+ label: Reproducibility problem
10
+ validations:
11
+ required: true
12
+ - type: textarea
13
+ id: heuristic
14
+ attributes:
15
+ label: Proposed deterministic heuristic
16
+ validations:
17
+ required: true
18
+ - type: textarea
19
+ id: evidence
20
+ attributes:
21
+ label: Evidence and files to inspect
22
+ description: What files, patterns, or metadata should the rule use?
23
+ validations:
24
+ required: true
25
+ - type: textarea
26
+ id: remediation
27
+ attributes:
28
+ label: Suggested remediation
29
+ description: What should maintainers do when the rule fires?
30
+ validations:
31
+ required: true
32
+ - type: textarea
33
+ id: false-positives
34
+ attributes:
35
+ label: Likely false positives
36
+ description: Describe cases where the rule should stay quiet or be configurable.
@@ -0,0 +1,32 @@
1
+ name: Research repository scan case
2
+ description: Share a public or sanitized repository scan case for rule evaluation.
3
+ title: "[Scan case]: "
4
+ labels: ["scan-case", "research-repo"]
5
+ body:
6
+ - type: input
7
+ id: repo-type
8
+ attributes:
9
+ label: Repository type
10
+ placeholder: ML paper repo, bioinformatics pipeline, R analysis project
11
+ validations:
12
+ required: true
13
+ - type: textarea
14
+ id: public-link
15
+ attributes:
16
+ label: Public link or sanitized fixture
17
+ description: Use a public URL only if you have permission to share it.
18
+ validations:
19
+ required: true
20
+ - type: textarea
21
+ id: scan-summary
22
+ attributes:
23
+ label: Scan summary
24
+ description: Paste relevant rrdoctor findings or attach a report.
25
+ validations:
26
+ required: true
27
+ - type: textarea
28
+ id: maintainer-notes
29
+ attributes:
30
+ label: What should maintainers learn from this case?
31
+ validations:
32
+ required: true
@@ -0,0 +1,9 @@
1
+ ## Summary
2
+
3
+ ## Checklist
4
+
5
+ - [ ] Tests or fixtures cover the change.
6
+ - [ ] `ruff check .` passes.
7
+ - [ ] `ruff format --check .` passes.
8
+ - [ ] Rule docs were updated if rule behavior changed.
9
+ - [ ] No network dependency was added to the core scanner.
@@ -0,0 +1,25 @@
1
+ name: Action smoke test
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches: [main]
7
+
8
+ permissions:
9
+ contents: read
10
+ pull-requests: write
11
+
12
+ jobs:
13
+ action-smoke-test:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+ - uses: ./
18
+ with:
19
+ path: examples/minimal-research-project
20
+ profile: minimal
21
+ fail-on: none
22
+ output: rrdoctor-action-report.md
23
+ plan: "true"
24
+ comment-pr: "true"
25
+ step-summary: "true"
@@ -0,0 +1,36 @@
1
+ name: CI
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches: [main]
7
+
8
+ jobs:
9
+ test:
10
+ runs-on: ubuntu-latest
11
+ strategy:
12
+ matrix:
13
+ python-version: ["3.10", "3.11", "3.12"]
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ - uses: actions/setup-python@v5
17
+ with:
18
+ python-version: ${{ matrix.python-version }}
19
+ - run: python -m pip install -e ".[dev]"
20
+ - run: ruff format --check .
21
+ - run: ruff check .
22
+ - run: mypy src/rrdoctor
23
+ - run: pytest
24
+ - name: Self-scan
25
+ run: rrdoctor scan . --profile standard --format markdown --output rrdoctor-self-report.md --fail-on none
26
+ - name: Command smoke tests
27
+ run: |
28
+ rrdoctor fix .
29
+ rrdoctor plan . --output rrdoctor-plan.md
30
+ rrdoctor badge . --output rrdoctor-badge-check.json
31
+ - uses: actions/upload-artifact@v4
32
+ with:
33
+ name: rrdoctor-self-report-${{ matrix.python-version }}
34
+ path: |
35
+ rrdoctor-self-report.md
36
+ rrdoctor-plan.md
@@ -0,0 +1,29 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ permissions:
8
+ contents: read
9
+
10
+ jobs:
11
+ publish:
12
+ name: Build and publish distribution
13
+ runs-on: ubuntu-latest
14
+ environment:
15
+ name: pypi
16
+ permissions:
17
+ contents: read
18
+ id-token: write
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+ - uses: actions/setup-python@v5
22
+ with:
23
+ python-version: "3.12"
24
+ - name: Install build frontend
25
+ run: python -m pip install --upgrade build
26
+ - name: Build distributions
27
+ run: python -m build
28
+ - name: Publish distributions to PyPI
29
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,22 @@
1
+ .DS_Store
2
+ .env
3
+ .venv/
4
+ venv/
5
+ __pycache__/
6
+ *.py[cod]
7
+ .pytest_cache/
8
+ .ruff_cache/
9
+ .mypy_cache/
10
+ dist/
11
+ build/
12
+ *.egg-info/
13
+ .coverage
14
+ htmlcov/
15
+ .ipynb_checkpoints/
16
+ data/raw/
17
+ outputs/
18
+ checkpoints/
19
+ wandb/
20
+ mlruns/
21
+ rrdoctor-report.md
22
+ rrdoctor-self-report.md
@@ -0,0 +1,7 @@
1
+ repos:
2
+ - repo: https://github.com/astral-sh/ruff-pre-commit
3
+ rev: v0.5.0
4
+ hooks:
5
+ - id: ruff
6
+ args: ["--fix"]
7
+ - id: ruff-format
@@ -0,0 +1,6 @@
1
+ {
2
+ "color": "brightgreen",
3
+ "label": "rrdoctor",
4
+ "message": "100/100",
5
+ "schemaVersion": 1
6
+ }
@@ -0,0 +1,29 @@
1
+ version: 1
2
+ profile: standard
3
+ paths:
4
+ include:
5
+ - "."
6
+ exclude:
7
+ - ".git"
8
+ - ".venv"
9
+ - "node_modules"
10
+ - "__pycache__"
11
+ - ".mypy_cache"
12
+ - ".pytest_cache"
13
+ - ".ruff_cache"
14
+ - "dist"
15
+ - "build"
16
+ - "tests/fixtures"
17
+ - "examples/reports"
18
+ - "rrdoctor-report.md"
19
+ - "rrdoctor-self-report.md"
20
+ thresholds:
21
+ large_file_mb: 50
22
+ large_notebook_output_kb: 1024
23
+ rules:
24
+ RRD032:
25
+ enabled: false
26
+ fail_on: error
27
+ report:
28
+ format: markdown
29
+ output: rrdoctor-report.md
@@ -0,0 +1,71 @@
1
+ # AGENTS.md
2
+
3
+ ## Mission
4
+
5
+ Research Repo Doctor helps researchers and lab teams audit whether public research code is reproducible, reviewable, citable, and release-ready. The CLI must stay deterministic, local-first, and useful without any AI API key.
6
+
7
+ ## Setup
8
+
9
+ ```bash
10
+ python -m pip install -e ".[dev]"
11
+ ```
12
+
13
+ ## Test commands
14
+
15
+ ```bash
16
+ pytest
17
+ python -m rrdoctor scan tests/fixtures/missing-basics-repo --format markdown --fail-on none
18
+ python -m rrdoctor plan tests/fixtures/missing-basics-repo
19
+ python -m rrdoctor fix tests/fixtures/missing-basics-repo # dry-run; add --write to apply
20
+ ```
21
+
22
+ ## Lint commands
23
+
24
+ ```bash
25
+ ruff check .
26
+ ruff format --check .
27
+ mypy src/rrdoctor
28
+ ```
29
+
30
+ ## Architecture
31
+
32
+ - `src/rrdoctor/models.py`: typed report, rule, and fix-plan models.
33
+ - `src/rrdoctor/config.py`: `.rrdoctor.yml` defaults and overrides.
34
+ - `src/rrdoctor/scanner.py`: path traversal, exclude handling, rule execution.
35
+ - `src/rrdoctor/rules/`: deterministic rule modules.
36
+ - `src/rrdoctor/fixers.py`: deterministic, idempotent auto-fixers (scaffolding only).
37
+ - `src/rrdoctor/baseline.py`: diff a scan against a stored baseline report.
38
+ - `src/rrdoctor/reporting/`: Markdown, JSON, SARIF, agent-plan, and badge renderers.
39
+ - `src/rrdoctor/cli.py`: Typer CLI (`scan`, `fix`, `plan`, `badge`, `init`, ...).
40
+
41
+ ## Rule authoring rules
42
+
43
+ - Rules must be deterministic and not require network access.
44
+ - Emit actionable findings with concise evidence and remediation.
45
+ - Respect path excludes through the scan context.
46
+ - Mask possible secrets in all evidence.
47
+ - Add tests or fixtures for every new rule.
48
+ - Update docs and rule tables.
49
+
50
+ ## Fixer authoring rules
51
+
52
+ - Fixers must be deterministic and idempotent.
53
+ - Never overwrite or delete existing files; create or safely append only.
54
+ - Never execute code from the scanned repository and never make network calls.
55
+ - Generated content may contain clearly marked placeholders for human review.
56
+ - Anything requiring judgement belongs in the agent fix plan, not a fixer.
57
+
58
+ ## Style
59
+
60
+ - Python 3.10 minimum.
61
+ - Keep heuristics simple and readable.
62
+ - Prefer small rule modules over hidden global behavior.
63
+ - Add comments only when they clarify non-obvious logic.
64
+
65
+ ## Do not do
66
+
67
+ - Do not add network calls to the core scanner.
68
+ - Do not require a hosted-service API key.
69
+ - Do not expose secrets in reports.
70
+ - Do not fabricate adoption metrics.
71
+ - Do not add vague automation features without deterministic fallback.
@@ -0,0 +1,50 @@
1
+ # Changelog
2
+
3
+ ## Unreleased (0.3.0)
4
+
5
+ - Repositioned around conference Artifact Evaluation: README leads with an
6
+ "AE-ready before you submit" wedge and zero-clone `uvx`/`pipx` install commands.
7
+ - Added `rrdoctor appendix`: generates an ACM-style Artifact Appendix skeleton and maps findings
8
+ to ACM badge tiers (Available / Functional / Reproduced) and the NeurIPS reproducibility checklist.
9
+ - Added `rrdoctor verify`: an L1 (static) / L2 (environment build) / L3 (entrypoint run)
10
+ reproducibility ladder. With `--run` it actually resolves dependencies (`uv`/`pip`/`conda`/`Rscript`)
11
+ and executes a declared entrypoint under a `--timeout`. Static by default. Only `--run` trusted repos.
12
+ - Added `rrdoctor mcp`: an MCP server exposing `scan`/`verify`/`appendix` as tools for coding
13
+ agents (optional extra: `pip install 'rrdoctor[mcp]'`).
14
+ - Added submission profiles `ml-paper`, `neurips`, `icml`, `acm`, `fair4rs`, and `joss` with
15
+ tag-based inheritance from the base profiles.
16
+ - Added rule `RRD034` (deptry-style import-vs-manifest cross-check) and `RRD054` (hardcoded
17
+ GPU/CUDA assumption without a documented requirement).
18
+ - Broadened environment checks to R (`DESCRIPTION`, `install.R`) and Julia (`Project.toml`)
19
+ manifests and runtime-version hints.
20
+ - The GitHub Action profile input now accepts the submission profiles.
21
+ - Added `docs/launch-checklist.md` with the maintainer's manual release/outreach steps.
22
+
23
+ ## v0.2.0 - 2026-06-08
24
+
25
+ - Added `rrdoctor fix`: deterministic, idempotent auto-fix that scaffolds common gaps
26
+ (LICENSE, CONTRIBUTING, SECURITY, CODE_OF_CONDUCT, AGENTS.md, CITATION.cff, DATA.md,
27
+ data/README.md, results/README.md, CHANGELOG.md, and .gitignore entries). Existing files
28
+ are never overwritten and no code from the scanned repository is executed.
29
+ - Added `rrdoctor plan` and the `agent` report format: a tool-agnostic fix plan where each
30
+ task names the deterministic check that verifies it.
31
+ - Added baseline comparison to `rrdoctor scan` via `--baseline` and `--fail-on-new`, so CI
32
+ can gate only on newly introduced findings.
33
+ - Added `rrdoctor badge`: a Shields.io endpoint document or a self-contained SVG score badge.
34
+ - Enhanced the GitHub Action with sticky pull request comments, job summaries, an optional
35
+ fix-plan artifact, baseline gating, and artifact upload, all using the built-in token.
36
+ - Added rules: RRD014 (AGENTS.md task guide), RRD033 (unpinned dependencies), RRD065
37
+ (committed notebook checkpoints), and RRD082 (pre-commit configuration).
38
+ - Added the `autofix_available` flag and a stable finding fingerprint to the report model.
39
+ - Expanded documentation, examples, and tests; refreshed the self-scan report and badge.
40
+
41
+ ## v0.1.0 - 2026-06-03
42
+
43
+ - Initial public-release-ready repository structure.
44
+ - Added `rrdoctor scan`, `init`, `list-rules`, `explain`, and `doctor` commands.
45
+ - Added deterministic rule engine with research reproducibility checks across documentation, data, environments, experiments, notebooks, citation, governance, testing, CI, security, release, and metadata.
46
+ - Added Markdown, JSON, and experimental SARIF-compatible reports.
47
+ - Added GitHub Action metadata and example workflows.
48
+ - Added tests, fixtures, docs, issue templates, PR template, roadmap, security policy, citation metadata, and maintainer workflow notes.
49
+ - Added example reports, including a self-scan report for release review.
50
+ - Completed v0.1.0 release-readiness pass covering YAML validity, package metadata, docs consistency, local Markdown links, and refreshed self-scan output.
@@ -0,0 +1,10 @@
1
+ cff-version: 1.2.0
2
+ message: "If Research Repo Doctor helps your research software release process, please cite it."
3
+ title: "Research Repo Doctor"
4
+ authors:
5
+ - family-names: "Maintainers"
6
+ given-names: "Research Repo Doctor"
7
+ version: 0.2.0
8
+ date-released: 2026-06-08
9
+ license: MIT
10
+ repository-code: "https://github.com/Tom409114/research-repo-doctor"
@@ -0,0 +1,9 @@
1
+ # Code of Conduct
2
+
3
+ This project follows the Contributor Covenant Code of Conduct, version 2.1.
4
+
5
+ Participants are expected to be respectful, constructive, and mindful that research software contributors may be students, maintainers, reviewers, or lab staff working under different constraints.
6
+
7
+ Unacceptable behavior includes harassment, personal attacks, sustained disruption, and publishing private information without consent.
8
+
9
+ Report concerns to the maintainers through the private contact listed in `SECURITY.md` until a dedicated project contact is published.
@@ -0,0 +1,40 @@
1
+ # Contributing
2
+
3
+ Thanks for helping improve Research Repo Doctor. The project is early, so small, well-tested contributions are especially valuable.
4
+
5
+ ## Setup
6
+
7
+ ```bash
8
+ python -m pip install -e ".[dev]"
9
+ pytest
10
+ ruff check .
11
+ ruff format --check .
12
+ ```
13
+
14
+ ## Good first contributions
15
+
16
+ - Add R language environment detection.
17
+ - Add Julia environment detection.
18
+ - Improve notebook path detection.
19
+ - Add Zenodo/DOI detection.
20
+ - Add Snakemake/Nextflow workflow detection.
21
+ - Add docs website deployment.
22
+
23
+ ## Rule contribution contract
24
+
25
+ Rules must be deterministic, local-first, and explainable. A rule should emit concise evidence, avoid scanning binary content except for size checks, respect configured excludes, and never print full secrets.
26
+
27
+ ## Rule contribution process
28
+
29
+ 1. Open or link a rule request describing the reproducibility risk.
30
+ 2. Propose deterministic evidence and likely false-positive cases.
31
+ 3. Add rule metadata and implementation in `src/rrdoctor/rules/`.
32
+ 4. Add a focused fixture or unit test.
33
+ 5. Update `docs/checks.md` and `docs/rule-authoring.md` when behavior changes.
34
+ 6. Run `pytest`, `ruff check .`, and `ruff format --check .`.
35
+
36
+ Every new rule should include rule metadata, tests, docs, and remediation text that a researcher can act on.
37
+
38
+ ## Review expectations
39
+
40
+ Pull requests should keep the scanner understandable. Avoid broad rewrites unless they reduce real maintenance cost. If a rule is heuristic, say so in the rule description and tests.
rrdoctor-0.2.1/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Research Repo Doctor Maintainers
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,16 @@
1
+ .PHONY: install test lint format-check self-scan
2
+
3
+ install:
4
+ python -m pip install -e ".[dev]"
5
+
6
+ test:
7
+ pytest
8
+
9
+ lint:
10
+ ruff check .
11
+
12
+ format-check:
13
+ ruff format --check .
14
+
15
+ self-scan:
16
+ rrdoctor scan . --profile standard --format markdown --output examples/reports/self-scan-report.md --fail-on none