torchcell.datamodels.schema.Publication
- class Publication(*, pubmed_id: str | None = None, pubmed_url: str | None = None, doi: str | None = None, doi_url: str | None = None, source_type: SourceType = SourceType.journal_article, title: str | None = None, identifier: str | None = None, identifier_url: str | None = None)[source]
Bases:
ModelStrictThe source document a record’s values come from.
source_typesays what kind of document it is, and the identity rule follows from it:journal_article(the default, so every record written before this field existed reads exactly as before) keeps the original rule: a DOI and/or a PubMed ID, plus at least one URL.every other
source_typerequirestitleandidentifier, and makes doi/pubmed optional, because a dissertation or an in-house report has neither.identifieris the DEPOSITED document: its mirror-relative path plussha256:<hex>, e.g."si/prelim-report.pdf sha256:<64 hex>". That pair is what the provenance principle calls canonical, and it is resolvable from our own mirror without a live URL.identifier_urlis optional retrieval metadata, never the identity.
- check_pub_info() Publication[source]
A journal article needs a DOI/PMID and a URL; any other source a title + id.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].