Skip to content

Add ArticleEditor model for storing peer review editors#1396

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/store-peer-review-editors
Draft

Add ArticleEditor model for storing peer review editors#1396
Copilot wants to merge 2 commits intomainfrom
copilot/store-peer-review-editors

Conversation

Copy link
Contributor

Copilot AI commented Mar 10, 2026

O que esse PR faz?

Adiciona o modelo ArticleEditor para armazenar os editores responsáveis pela revisão por pares de um artigo. Os dados são semi-estruturados, com campos para nome, ORCID, papel e instituição — todos nullable.

Onde a revisão poderia começar?

article/models.py — classe ArticleEditor (linha ~3193).

Como este poderia ser testado manualmente?

  1. Rodar makemigrations --check para confirmar que a migration está em sync
  2. Rodar os testes: pytest article/tests.py::ArticleEditorTest -v
  3. No admin Wagtail, verificar que a aba "Authors & Collaborators" de um Article agora inclui o InlinePanel de Editors

Algum cenário de contexto que queira dar?

Modelo: ArticleEditor com ParentalKeyArticle (CASCADE, related_name="editors")

Campo Tipo Observação
name CharField(255) Nome, possivelmente não estruturado
orcid CharField(19) Formato 0000-0002-1825-0097
role CharField(255) Ex: editor, academic-editor, section-editor
institution CharField(510) Instituição, semi-estruturado

Segue os mesmos padrões de ContribPerson: CommonControlField, CoreAdminModelForm, métodos get/create/create_or_update, índices em article e orcid.

editor = ArticleEditor.create_or_update(
    user=request.user,
    article=article,
    name="Dr. Maria Silva",
    orcid="0000-0002-1825-0097",
    role="editor",
    institution="Universidade de São Paulo",
)

Arquivos alterados:

  • article/models.py — novo modelo + InlinePanel em panels_authorship
  • article/migrations/0048_articleeditor.py — migration
  • article/tests.py — 13 testes unitários

Screenshots

N/A

Quais são tickets relevantes?

Referências

Padrão baseado em ContribPerson e demais modelos inline existentes no app article.

Original prompt

This section details on the original issue you should resolve

<issue_title>Armazenar os editores responsáveis pela revisão por pares</issue_title>
<issue_description>### Descrição da tarefa

Considerando que no xml há:

<author-notes>
<fn fn-type="edited-by">
<label>ASSOCIATE EDITOR:</label>
<p>Luana Patricia Marmitt <ext-link ext-link-type="uri" xlink:href="http://orcid.org/0000-0003-0526-7954">http://orcid.org/0000-0003-0526-7954</ext-link></p>
</fn>
<fn fn-type="edited-by">
<label>SCIENTIFIC EDITOR:</label>
<p>Juraci Almeida Cesar <ext-link ext-link-type="uri" xlink:href="http://orcid.org/0000-0003-0864-0486">http://orcid.org/0000-0003-0864-0486</ext-link></p>
</fn>
</author-notes>

Precisamos modelar para article.models.py para registrar quais são os editores que são responsáveis pelo artigo. É importante considerar que não necessariamente teremos todos os dados ou os dados de forma bem estruturada. Será certamente semi-estruturado. Mas certamente é relevante ter orcid e nome mesmo que não estruturado.
</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Create ArticleEditor model to store editors responsible for peer review.
Fields: name, orcid, role, institution (all nullable for semi-structured data).
Includes ParentalKey to Article, InlinePanel, migration, and tests.

Co-authored-by: robertatakenaka <505143+robertatakenaka@users.noreply.github.com>
Copilot AI changed the title [WIP] Store responsible peer review editors in article model Add ArticleEditor model for storing peer review editors Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Armazenar os editores responsáveis pela revisão por pares

2 participants