Repository navigation
feat(v1): add researcher, journal and research paper models - #1106
Merged
Merged
Conversation
…Paper models Backs the Invited Researchers page on the website and lays groundwork for linking datasets to the papers they come from. - Researcher: profile, affiliation, PhD, links, themes as research fields, optional link to a Data Basis account; position and description translated - InvitedResearcherTerm: one row per renewable 2-year term (cohort, start, end); end defaults to start + 2 years - Journal and ResearchPaper: citation author string plus links to registered researchers; DOI normalized on clean - Admin pages with term and paper inlines; models public in GraphQL Also applies ruff-format to three pre-existing blocks in models.py, which the pre-commit hook requires once the file is touched.
- Researcher.affiliation and Researcher.phd_institution are now FKs to Organization - InvitedResearcherTerm.cohort is a year.semester label, e.g. 2027.1 - Researcher.is_invited_researcher_alumni: had terms, all finished Migration 0056 is regenerated in place since it has not been deployed.
ResearchPaper.datasets is a many-to-many to Dataset (reverse: Dataset.research_papers), editable from both the research paper and the dataset admin pages. Migration 0056 regenerated in place (undeployed).
Researcher.affiliation (FK) becomes Researcher.affiliations (M2M to Organization). Migration 0056 regenerated in place (undeployed).
3 of 4 tasks
rdahis
force-pushed
the
feat/invited-researchers
branch
from
October 7, 2026 02:46
e0e26c9 to
5ddc32f
Compare
3 tasks done
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.
Purpose
Backend for the new Invited Researchers initiative (website page
/invited-researchers), and a first model for research papers so datasets can be linked to the papers they come from or are used in.Description
New models in
v1(single migration0056_researchers_and_research_papers):Researcher: name, slug, picture, position,affiliations(M2M toOrganization),phd_institution(FK toOrganization), PhD year, description (blurb), public email, website, LinkedIn, Google Scholar, Lattes, ORCID,themes(research fields), optional OneToOne toAccount.positionanddescriptionare translated (pt/en/es).is_invited_researcher(has an active term) andis_invited_researcher_alumni(had terms, all finished).InvitedResearcherTerm: one row per 2-year, indefinitely renewable term.cohortis aYYYY.Slabel (e.g.2027.1, validated).end_atdefaults tostart_at+ 2 years.Journal: name, abbreviation, ISSN/E-ISSN, publisher, website.ResearchPaper: title, citation author string, M2M to registeredResearchers, M2M toDataset(reverseDataset.research_papers), journal FK, publication status (published / forthcoming / working paper), year, volume/issue/pages, DOI (normalized on clean;doi_urlproperty), URL, Google Scholar link, abstract.Admin:
All models are publicly readable through the auto-generated GraphQL schema, with the default staff-only mutations.
Also applies
ruff formatto 3 pre-existing blocks inmodels.py, which the pre-commit hook requires once the file is touched.Checklist
Testing and evidence
backend/apps/api/v1/tests/test_researchers.py(10 tests) covers:mainand on this branch. Some come from the shareddataset_dados_mestresfixture, which passes anorganizationfield thatDatasetno longer has.Next steps
MODELTRANSLATION_AUTO_POPULATEcopies the first value into the others.