Repository navigation
Preprint ids in ArticleIdentifiers and publication_status in header and storage (preprint-ids decision 4) - #40
Merged
Merged
Conversation
ArticleIdentifiers' doi, pmid and pmcid now name the version of record
only. A preprint's identifiers sit beside them: preprint_dois (each a
{doi, server} with server from the new PreprintServer vocabulary),
preprint_pmid and preprint_pmcid. A required publication_status
(published | preprint) states which the paper has, so no consumer
re-derives it.
Storage Study gains publication_status (mvp, deterministic), copied
from the header (a new copy derivation in the extraction-to-storage
map, and an n/a priority). PublicationStatus is defined once, in the
storage analysis_enums module the paper-parse schema already imports,
so header and record share one vocabulary.
Paper-parse 0.6.0 -> 0.7.0 (a required field: breaking), storage
0.7.0 -> 0.8.0. Models and JSON Schemas regenerated; the x7Ex4mpleA01
headers updated; examples/identifiers holds a preprint-only paper, a
published paper with its PsyArXiv DOI, and two refused examples.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jdkent
marked this pull request as ready for review
October 16, 2026 16:56
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.
Implements decision 4 of the preprint-identifiers design (
reports/preprint-ids-design.md§5, work-graph itemstudy-schema-preprint-ids). User request, 2026-10-16: "I want preprint status to be clear ... on study_schema as well, which will require a separate PR."Schema change
Paper-parse header (
header.yaml, 0.6.0 → 0.7.0).ArticleIdentifiers:doi,pmidandpmcidare now described as the version of record's, and never a preprint server's DOI or PubMed's or PMC's record of a preprint.preprint_dois: a list ofPreprintDoi {doi (required), server: PreprintServer (required)}. Each separately registered version (Research Square/vN, OSF_vN) is its own entry, kept exactly as registered.preprint_pmidandpreprint_pmcid: PubMed's record of the preprint (publication typePreprint) and PMC's copy of it.publication_status: PublicationStatus, required. It ispreprintwhen apreprint_field is set anddoi,pmidandpmcidare all empty, andpublishedotherwise. The producer states it.parse_enums.yamlgainsPreprintServerwith 31 values:biorxiv,medrxiv,arxiv,researchsquare,ssrn,preprints_org,authorea,techrxiv,chemrxiv,jmir_preprints, plus one value per OSF-hosted provider:osf_preprints10.31219,arabixiv31221,metaarxiv31222,engrxiv31224,focus_archive31225frenxiv31226,ina_rxiv31227,lawarxiv31228,lis_scholarship_archive31229,marxiv31230mindrxiv31231,nutrixiv31232,paleorxiv31233,psyarxiv31234,socarxiv31235sportrxiv31236,africarxiv31730,mediarxiv33767,bodoarxiv34055,edarxiv35542,biohackrxiv37044Each provider name comes from the Crossref
group-titleof works under its prefix, checked 2026-10-16. The ingestion registry (preprint-registry) should name servers with exactly these values.Storage (0.7.0 → 0.8.0).
Study.doiis described as the version of record's DOI.Study.publication_status(mvp, deterministic, optional) is new. The extraction-to-storage map gets acopyderivation fromArticleIdentifiers.publication_status, andstorage-parameter-priorities.yamlgetspublication_status: n/a.study_typeis unchanged and keeps PubMed'sPreprintverbatim.Bibliography(includinglicenseand the separate licence proposal from ingestion #120),CorrectionandReferenceare not touched.Where this differs from the design, and why
PublicationStatuslives in storage'sanalysis_enums.yaml, notparse_enums.yaml. One vocabulary has to serve both the header andStudy. The repo already does this forCoordinateRoleandAnchorKind: the parse schema imports storage'sanalysis_enums, and storage imports nothing from the parse schema. Defining it inparse_enumswould mean storage importing every parse enum. Defining it besideStudyTypein storagestudy.yamlwould mean the parse header importing the whole storageStudytree.header.yamlnow imports../neuroimaging-study-storage/analysis_enums, ascoordinates.yamlalready did. A test asserts that the two generated enums have the same values.Study.publication_statusis optional in storage. The design marks only the header field required. Storage records built from 0.6.0 headers have nothing to copy. Making it required is a one-line change if wanted.journal-articletype for SSRN) stay in the ingestion registry. The enum descriptions only give the server and its DOI prefix, so the patterns are not kept in two places.Mappability
Every new storage field has a parse analog:
Study.publication_status←ArticleIdentifiers.publication_status, andStudy.doi←ArticleIdentifiers.doi(unchanged). The preprint ids have no storage field. Neurostore keeps them on the base study (neurostore-preprint-base-study).Release and compatibility
Adding a required header field breaks the paper-parse contract. A 0.6.0 header no longer validates against these models, and
layoutsrefuses aschema_versionmismatch.Downstream order, per design §5:
preprint-registryPR, which is independent of the contract and should use thePreprintServervalues above.neurostore-preprint-base-study, after neurostore#1843): pin this main sha. Accept 0.7.0 headers. Match base studies on the version-of-record ids and then on the preprint ids. Promote the version-of-record ids. Storepublication_status. This must deploy before ingestion writes 0.7.0 headers, otherwise uploads fail loudly (they do not corrupt anything).preprint-ids-catalog): pin this sha.paper_parse._identifierswrites the new fields andpublication_status.identifiers.jsonbecomesArticleIdentifiers.identitystage.pondie-publication-status): pin this sha and copyStudy.publication_statusfrom the header. Its submodule and checks still use the pre-Ship the LinkML source with the package #37 layout (see Tests). It can start any time after step 1.The extraction schema is unchanged (0.5.0).
Study.publication_statusis deterministic, so the projection drops it.Tests
The suite ran in fresh venvs on beast, installed with
.[test,generate,layouts,parquet] jsonschema setuptools:python tools/generate_models.py --checkis clean.pytest: 150 passed on Python 3.13 and 3.11, against 139 passed at base 8e15224, with no failures or skips.tests/test_identifiers.py(11 tests):ParsedPaperand the parsed-paper JSON Schema, and their status agrees with the documented rule;PublicationStatus;Mutations: each was applied to the YAML, followed by a regeneration and the full suite. Every one was killed:
publication_statusnot requiredPreprintDoi.servernot requiredpreprint_doisas plain stringspreprint_pmidremovedpsyarxivremovedpublication_statusrenamedPublicationStatusgainsin_presspreprint_only.jsonsayspublishedpondie schema checks were run with pondie main d722f69 and
PONDIE_SCHEMA_DIRset to a copy of this branch'ssrc/study_schema/linkmlplusstorage-parameter-priorities.yaml, then diffed against the same run at base:generate: the projected extraction tree is byte-identical to the base projection. The only changes are in the summary: 23 fields dropped as deterministic instead of 22, andPublicationStatusjoins the enums no extracted field reaches.extraction_to_storage_map: 36 derivations instead of 35, and no new problems.field_provenance: 318 fields instead of 317.linkmlandstorage_parameter_priorities: no new findings.Some pondie checks already fail at base, for reasons this PR does not touch:
generate --checkreports the committed extraction tree out of date with pondie main.Examples:
x7Ex4mpleA01: the three headers move to 0.7.0, withpublication_status: publishedand empty preprint fields. They still round-trip byte for byte.examples/identifiers/preprint_only.json: bioRxiv 10.1101/2025.05.13.653896, with PubMed's preprint record 40462995 and PMC12132522 (catalog articleqzfriham4plz).examples/identifiers/published_with_preprint.json: Dev Sci 10.1111/desc.12933, PMID 31863619, with PsyArXiv 10.31234/osf.io/5m87x (uqzotozf6jhu).examples/identifiers/invalid/: two files, one missingpublication_statusand one with a preprint DOI that has no server.tools/benchmark_parquet.pynow passespublication_statuswhen it builds headers. The README gains a "preprint is not its version of record" bullet and describes the new examples.🤖 Generated with Claude Code