Commit 7a0763a
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
- src/communitymech
- datamodel
- schema
- tests
- test_embedding
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
71 | 75 | | |
72 | 76 | | |
73 | 77 | | |
| |||
0 commit comments