Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrige o retorno de get_main_abstract e de _get_sub_article_abstracts #750

Merged
merged 3 commits into from
Nov 7, 2024

Conversation

samuelveigarangel
Copy link
Collaborator

O que esse PR faz?

Implementa codição if para ignorar abstracts do tipo gráfico em get_main_abstract e _get_sub_article_abstracts

Onde a revisão poderia começar?

pelos commits

Como este poderia ser testado manualmente?

Algum cenário de contexto que queira dar?

N/A

Screenshots

N/A

Quais são tickets relevantes?

#740

Referências

N/A

Comment on lines 267 to 271
abstract_node = None
for node in self.xmltree.findall(".//article-meta//abstract"):
if node.get("abstract-type") != "graphical":
abstract_node = node

Copy link
Member

Choose a reason for hiding this comment

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

@samuelveigarangel use no lugar das linhas 267 a 271

try:
    abstract_node = self.xmltree.xpath(".//abstract[not(@abstract-type)]")[0]
except IndexError:
   abstract_node = None

Comment on lines 341 to 345
abstract_node = None
for sub_article in self.xmltree.xpath(".//sub-article"):
for node in self.xmltree.findall(".//abstract"):
if node.get("abstract-type") != "graphical":
abstract_node = node
Copy link
Member

Choose a reason for hiding this comment

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

for sub_article in self.xmltree.xpath(".//sub-article"): 
   try:
       abstract_node = sub_article.xpath(".//abstract[not(@abstract-type)]")[0]
   except IndexError:
      abstract_node = None

Copy link
Member

@robertatakenaka robertatakenaka left a comment

Choose a reason for hiding this comment

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

Fazer as correções

@robertatakenaka robertatakenaka merged commit da7a1ca into scieloorg:master Nov 7, 2024
2 checks passed
@robertatakenaka robertatakenaka changed the title Implementa codição if para ignorar abstracts do tipo gráfico em get_main_abstract e _get_sub_article_abstracts Corrige o retorno de get_main_abstract e de _get_sub_article_abstracts Nov 22, 2024
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.

2 participants