Skip to content

Commit 7a0763a

Browse files
realmarcinclaude
andauthored
Sharpen EvidenceItemSupportEnum descriptions in schema (#56)
* Sharpen EvidenceItemSupportEnum descriptions in schema The previous one-liner enum descriptions ("Statement is incorrect", "Evidence partially supports the claim", etc.) didn't distinguish between REFUTE and WRONG_STATEMENT, and didn't say what makes a claim "partial" versus fully supported. Curators were using WRONG_STATEMENT for misattributed references (paper doesn't address the claim) while REFUTE is meant for references that actively contradict the claim; the schema now spells out that contrast. - SUPPORT: snippet substring + surrounding context endorses the claim. - REFUTE: reference actively contradicts (opposite effect, mechanism not occurring, etc.). Currently unused, kept for future curation. - PARTIAL: supports part but not all - common cases listed. - NO_EVIDENCE: placeholder hypothesis without supporting reference. - WRONG_STATEMENT: reference is misattributed - paper does not address the claim at all (wrong DOI/PMID, different system). Explicitly contrasted with REFUTE. Also includes: - Regenerated `src/communitymech/datamodel/communitymech.py` from the schema (just gen-python). Most of the diff is generator version drift (single-quote -> double-quote, import consolidation); the semantic change is the new enum docstrings. - Incidental black auto-formatting of literature.py and two test files that were already showing as "would be reformatted" on main before this PR. `just format` picks up the entire tree, so these came along for free; reverting them would just re-create the same lint warning. Test plan: - `just validate-all`: passes (no issues found across 255 communities). - `just test`: 102 passed, 9 skipped. - `just lint`: black is now clean; ruff still has 317 pre-existing F401/etc. errors unrelated to this PR. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Address Copilot review on PR #56 - NO_EVIDENCE description rewritten so it aligns with the schema's requirement that EvidenceItem.reference and EvidenceItem.snippet are present: the enum now means "cited paper is on-topic but the curator could not locate a supporting or contradicting excerpt; the snippet records the closest on-topic excerpt examined." Explicitly contrasted with WRONG_STATEMENT (misattribution) and REFUTE (active contradiction) so curators have a clear rule. - Exclude the LinkML pythongen datamodel from ruff. The file is regenerated wholesale by `just gen-python` and not hand-edited, so E501/UP045/etc. lints on the generated output produce churn rather than signal. black still formats it via `just format`. Cuts `just lint` output from 317 -> 174 ruff errors. - Regenerated datamodel pulls in the updated NO_EVIDENCE docstring. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 710c8b1 commit 7a0763a

6 files changed

Lines changed: 1786 additions & 811 deletions

File tree

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ target-version = ["py310", "py311", "py312"]
6868
[tool.ruff]
6969
line-length = 100
7070
target-version = "py310"
71+
# The LinkML pythongen datamodel is fully regenerated by `just gen-python`
72+
# and is not hand-edited, so style lints there create churn rather than
73+
# signal. Exclude it from ruff (black still formats it via `just format`).
74+
extend-exclude = ["src/communitymech/datamodel/communitymech.py"]
7175

7276
[tool.ruff.lint]
7377
select = ["E", "F", "I", "UP", "N", "S", "B", "A", "C4", "T20", "SIM"]

0 commit comments

Comments
 (0)