Skip to content

Model reference

Every field of every scholarcore model.

All models extend ScholarModel, which sets extra="allow", populate_by_name=True, and str_strip_whitespace=True. Every model therefore also accepts and preserves fields not listed here.

Import from the top level (from scholarcore import Paper) or from the submodule (from scholarcore.biblio import Paper). scholarcore/__init__.py imports every submodule eagerly, so both forms load the whole package; the submodule form only saves a name lookup.

Each core entity has a matching XRef model (PersonRef, PaperRef, AwardRef, OpportunityRef) holding the join key plus one cached display field. Use a ref when one record points at another without needing the full record: a paper with twenty authors carries twenty PersonRefs, not twenty Researcher records. It is the foreign-key pattern, with one denormalized field so a display does not need a lookup.

Identifier functions (scholarcore.identity)

Section titled “Identifier functions (scholarcore.identity)”
FunctionReturns
validate_rid(v)The rid unchanged. Raises ValueError naming what failed: the ORCID pattern, the ORCID check digit, or the local: pattern.
is_rid(v)True when v is a well-formed rid of either form. Never raises.
is_local(rid)True when the rid is a locally-minted id rather than an ORCID.
orcid_of(rid)The ORCID carried by the rid; None for a local id or an empty value.
mint_local_rid(name)A new local:<slug>-<6 hex> rid, e.g. local:josiah-carberry-a3f19c.
normalize_doi(value, *, lowercase=False)The bare DOI, with https://doi.org/, http://dx.doi.org/, or doi: stripped. Case is preserved unless lowercase=True. None for an empty value.
normalize_pmid(value)The bare numeric PMID as a string, with an older ncbi.nlm.nih.gov/pubmed/ URL prefix or a pmid: prefix stripped. None for an empty value or one carrying no digits.

See Canonical identifiers for what each identifier is and when to mint a local rid.

A pointer to a person: the join key plus a cached name. Carried by systems that do not own person records.

FieldTypeNotes
ridstrRequired. Validated by validate_rid.
namestr | NoneA cached display name, for rendering without a lookup. Not authoritative.

PersonRef plus biographical and contact fields.

FieldTypeNotes
(inherits rid, name)
given_namestr | None
family_namestr | None
affiliationslist[Affiliation] | NoneAppointments and roles, past and current.
emailstr | None

Person plus the fields specific to someone who does research. It is the shared shape a researcher record takes across systems. researcher-profiles reuses Training and CareerEntry from here directly.

FieldTypeNotes
(inherits rid, name, and the Person fields)
traininglist[Training]Default []. Degrees, postdocs, clinical training.
careerlist[CareerEntry]Default []. Positions held.
fieldstr | NonePrimary research field or discipline.
subfieldslist[str]Default []. More specific areas within the field.
summarystr | NoneA brief biographical summary.

One training or education entry.

FieldTypeNotes
kind"degree" | "postdoc" | "clinical_training"Required. A postdoc is a span, never a degree.
degreestrRequired. The degree or training title.
institutionstrRequired.
year_startint | NoneOptional for a degree.
year_endint | NoneFor a degree, the completion year.
advisorstr | None
fieldstr | NoneField of study.

One career or employment entry.

FieldTypeNotes
rolestrRequired. The position title.
institutionstrRequired.
start_yearint | NoneNone when the start is genuinely unknown.
end_yearint | NoneNone means the position is still held.
FieldTypeNotes
namestrRequired.
ror_idstr | NoneResearch Organization Registry id.
typestr | NoneFree text, e.g. "university", "funder", "nonprofit".
addressstr | NoneFree text.

One person’s relationship to an organization. Serves both a Person’s appointment (with title and dates) and an Authorship’s institution (usually organization and department only).

FieldTypeNotes
organizationOrganizationRequired.
departmentstr | NoneFree text. Most departments have no ROR id, so this is not a nested Organization.
titlestr | NoneThe role, e.g. "Professor".
startdate | None
enddate | NoneAbsent means current.

Affiliation.current is a property, True when end is unset. It is derived, never stored.

A bare string is accepted in place of the whole object and loads as a low-fidelity affiliation: "MIT" becomes {"organization": {"name": "MIT"}}.

A pointer to a paper: the DOI plus a cached title.

FieldTypeNotes
doistrRequired. The join key. Prefix stripped on load; case preserved.
titlestr | NoneA cached title, for rendering without a lookup.
FieldTypeNotes
titlestrRequired.
authorslist[Authorship] | None
yearint | None
venuestr | NoneJournal or conference.
doistr | NoneNormalized on load: resolver prefix stripped, case preserved.
pmidstr | NoneNormalized on load. A value carrying no digits loads as None.
pmcidstr | None
openalex_idstr | None
arxiv_idstr | None
abstractstr | None

There is no full-text field. Full text is a storage and retrieval concern for the system that keeps it.

One person’s authorship of one work.

FieldTypeNotes
personPersonRefRequired.
positionint | NoneByline order. Pick 0- or 1-based numbering and use it consistently; scholarcore does not impose one.
correspondingboolDefault False.
equal_contributionboolDefault False.
affiliationslist[Affiliation]Default []. The institutions for this work.
credit_roleslist[CreditRole]Default [].

Byline rendering (superscript numbering, affiliation dedup across authors, per-author verification flags) is not modeled here.

The 14 NISO CRediT contributor roles. Values are NISO’s hyphenated slugs, not the Python member names:

conceptualization, data-curation, formal-analysis, funding-acquisition, investigation, methodology, project-administration, resources, software, supervision, validation, visualization, writing-original-draft, writing-review-editing.

A pointer to an award: the join key plus a cached title.

FieldTypeNotes
application_idstrRequired. The join key.
titlestr | NoneA cached title, for rendering without a lookup.

A funded or proposed award of financial support.

FieldTypeNotes
application_idstr | NoneThe join key, assigned by the external system of record.
titlestrRequired.
funderstr | None
numberstr | NoneThe award or grant number. Distinct from application_id.
activity_codestr | NoneThe funder’s mechanism code, e.g. "R01", "U01", "K99".
piPersonRef | None
co_investigatorslist[PersonRef]Default [].
roleGrantRole | NoneSet when the record represents one person’s participation rather than the award as a whole.
statusAwardStatus | NoneAn unrecognized value loads as None.
submission_typeSubmissionType | NoneAn unrecognized value loads as None.
startdate | None
enddate | None
effortfloat | NoneFTE fraction, 0-1.
directsint | NoneDirect costs, whole US dollars.
indirectsint | NoneIndirect costs, whole US dollars.
totalint | NoneTotal costs, whole US dollars.
abstractstr | None

role, status, and submission_type load an unrecognized value as None instead of raising. See Extend the models for how to keep a finer-grained vocabulary alongside them.

pi, co_pi, co_i, other.

planning, submitted, pending, funded, active, completed, rejected, withdrawn.

new, renewal, resubmission, supplement.

A pointer to a funding opportunity: the join key plus a cached title.

FieldTypeNotes
opportunity_numberstrRequired. The join key.
titlestr | NoneA cached title, for rendering without a lookup.

A published funding opportunity, a call for applications.

FieldTypeNotes
opportunity_numberstrRequired. The join key, e.g. "PA-25-168".
agencystr | None
titlestr | None
urlstr | NoneThe published announcement.
document_typestr | Nonee.g. "NOFO", "RFA", "PA".
activity_codeslist[str]Default [].
posted_datedate | None
expiration_datedate | None
budget_maxint | None
purposestr | None
keywordslist[str]Default [].

scholarcore/schemas/ holds one committed JSON Schema per model, generated by scholarcore.schema_export.export_schemas(). build_schemas() returns the same schemas as a {name: dict} mapping without writing files:

affiliation.schema.json, authorship.schema.json, award.schema.json, opportunity.schema.json, organization.schema.json, paper.schema.json, person.schema.json, person_ref.schema.json.

A test compares the committed files against the models and fails when they differ. The XRef models and Researcher have no separate schema file: a ref is two fields, and person.schema.json covers the person hierarchy.