Skip to content

Conversation

@samuelveigarangel
Copy link
Collaborator

O que esse PR faz?

Adiciona Suporte ao Formato articlemeta

  • Adição de ArticlemetaIssueFormatter e ArticlemetaJournalFormatter
  • Implementação do Formato articlemeta

Onde a revisão poderia começar?

pelos commits

Como este poderia ser testado manualmente?

Acessar API de issue: http://0.0.0.0:8009/api/v1/issue/?formats=articlemeta
Acessar API de Journal: http://0.0.0.0:8009/api/v1/journal/?formats=articlemeta

paramentros de issue:
"collection", "from_publication_year", "until_publication_year", "from_date_created", "until_date_created", "from_date_updated", "until_date_updated", "issn_print", "issn_electronic", "issn", "volume", "number", "supplement", "formats", "code",

paramentros de journal:
"issn_print", "issn_electronic", "issn", "title", "thematic_areas", "toc_item", "collection", "from_date_created", "until_date_created", "from_date_updated", "until_date_updated", "formats", "issnl",

Algum cenário de contexto que queira dar?

N/A

Screenshots

image
image

Quais são tickets relevantes?

CLOSED #903
CLOSED #902

Referências

N/A

return dict_a

def _format_journal_history(self):
journal_history = self.scielo_journal.journal_history.all()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quando self.scielo_journal é None, ocorre AttributeError.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@samuelveigarangel verficar esta questão

"issn_print",
"issn_electronic",
"issn_electronic",
"issn",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@samuelveigarangel existe o campo issn (não seria issnl)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Na api articlemeta, há o paramentro issn, que faz a busca tanto em issn_print quanto issn_electronic.

if self.journal.official and self.journal.official.iso_short_title:
add_to_result("v151", self.journal.official.iso_short_title, self.result['issue'])

if self.journal.official and hasattr(self.journal.official, 'parallel_titles'):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@samuelveigarangel por que tem que ser testado desta forma hasattr(self.journal.official, 'parallel_titles')?


def _format_title_in_database(self):
medline_data = self.medline_titles
add_items("v421", [medline.title for medline in medline_data], self.result['issue'])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@samuelveigarangel v421 não existe sempre

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Se medline_data for None, ele não adiciona achave. add_items faz essa verificação

def _format_metadata(self):
"""Metadados e relacionamentos"""
key_to_code = {
"publication_date": self.obj.year,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@samuelveigarangel não há casos de data completa ou pelo menos mes(es)?


def _format_supplement_info(self):
"""Informações de suplemento"""
if not self.obj.number:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@samuelveigarangel adicionar somente se há self.obj.supplement

@samuelveigarangel samuelveigarangel merged commit 56325ca into scieloorg:main Jul 10, 2025
3 of 5 checks passed
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.

Disponibilizar dados de issue em formato JSON para alimentar AM Disponibilizar dados de journal em formato JSON para alimentar AM

3 participants