Repository navigation
Conversation
… the tutorial The example record was a skeleton of nulls that pondie's validator rejected (23 errors, e.g. Study.groups: 'groups' is multivalued but got NoneType). It is now an extraction of the example paper's text: both analyses (Gain > Neutral with its Table 1 peaks, Loss > Neutral with no table), the task and its conditions, the cluster-level FWE inference settings, the group, the table and its coordinate set, with exact-offset evidence for what the text says and not_reported for what it does not. tests/test_example_record.py reads the record against its text, which the models and the JSON Schema cannot do (they accept an all-null record). schema-tutorial.md 12.3 described three tiers; pondie has conformance in validate.py and nineteen rules in rules.py, split into error and warning rules. Rewritten from the code, and the two chapter 12 mentions of non_analysis_content now say purpose. test_stable_id pops stable_id with a default, because the record no longer carries an explicit null for it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The example record
examples/run/records/x7Ex4mpleA01.extraction.jsonwas a skeleton of nulls while the schema tutorial presents it as complete. pondie's validator reported 23 errors on it (Study.groups: 'groups' is multivalued but got NoneType, and so on).What changed
examples/corpus/x7Ex4mpleA01/processed/pubget/text.txt(71 wrapped fields, 52 spans, every span the exact text at its offsets):is_healthynot_reported), the monetary incentive delay task with Gain, Loss and Neutral conditions, oneconditionterm, and oneModelEstimation;InferenceSettingsfrom the Methods sentence (height p 0.001, extent 20 voxels, cluster-level p 0.05, family-wise error);no_significant_effect, no table), bothMassUnivariateDetails, whole-brain, n 20, MNI;result_reporting: analyses_reported.not_reported(hypothesis, blinding, design type, model family/type/stage, measure family/type, prespecification, statistic of the null analysis). Values the text implies but does not state (species, whole-brain scope,single_group, the effect outcomes) aregeneratedwith the supporting sentence. No acquisition, device, preprocessing, region or assessment is declared, because the text describes none. Nothing is invented forstable_id, which the store mints.tests/test_example_record.py: the models and the JSON Schema accept an all-null record, so these read the record against its text: no null slot, status/evidence invariants, span offsets, source hash, references resolve, parsed analyses and tables appear in the record, cells name levels their term declares.schema-tutorial.md12.3 described three tiers that do not match pondie. It now followsvalidate.py(conformance, with closed vocabulary errors and open vocabulary warnings, evidence, offsets, references, class rules) andrules.py(six error rules, twelve warning rules). I also removed the "routed to review by count" sentence, which no code in the validator does. Two mentions ofnon_analysis_contentin chapter 12 now saypurpose.Open question: pondie's convention and the layout round trip cannot both hold
tests/test_layouts.py::test_round_trip_is_byte_for_bytefails on this branch (1 failed, 219 passed, 1 skipped; it passes on main). pyarty writesmodel_dump_json, which emits an explicitnullfor every unset slot and"value": nullon anot_reportedwrapper. pondie rejects both (must be a string, got NoneType,not_reported fields must omit value). I checked: the model-canonical form of this record gives pondie about 100 errors, andstable_idalone can never be filled. So the committed record uses absent keys (pondie valid, JSON Schema and models valid) and the byte-for-byte test is red. I did not touch that test. Either pondie should read null as absent, or pyarty should dump withexclude_none, or the round trip should skip records. Needs a decision.I changed one existing test:
test_stable_id.pypopsstable_idwith a default, since the record no longer carries the key.Verified
publication-status-pin, 14542791; main cannot read this schema layout):71 fields, 52 spans checked,valid, no warnings.tools/generate_models.py --checkclean.measure, a cell level not declared by its term.Not changed, outside this item:
schema-tutorial.md1081, 1443, 1513,extraction-readme.md144 andrepresenting-models.md71 still saynon_analysis_content, which the extraction schema does not have (Table.purposeis the slot). Tutorial 9.6 saysEffectKindhas no slot, but the extraction schema hasEffect.kindand pondie checks it.🤖 Generated with Claude Code