-
Notifications
You must be signed in to change notification settings - Fork 23
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
Refatoração do processamento XML PMC para melhorar o tratamento de elementos <aff> e ampliar a cobertura de testes #677
base: master
Are you sure you want to change the base?
Conversation
packtools/sps/formats/pmc.py
Outdated
named_contents = addr_line.findall(".//named-content") | ||
aff_with_address.extend([named_content.text for named_content in named_contents]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@samuelveigarangel algumas versões tem city e state no lugar de named-content. Então, você tem que considerá-los para completar aff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok.
packtools/sps/formats/pmc.py
Outdated
|
||
addr_line = aff.find("./addr-line") | ||
if addr_line is not None: | ||
named_contents = addr_line.findall(".//named-content") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No lugar de named_contents = addr_line.findall(".//named-content")
, use named_contents = addr_line.xpath(".//named-content | .//state | .//city")
named_contents = addr_line.findall(".//named-content") | ||
aff_with_address.extend([named_content.text for named_content in named_contents]) | ||
|
||
country = aff.find("./country") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@samuelveigarangel pode adicionar o country no xpath
O que esse PR faz?
Refatora processamento XML PMC para melhorar o tratamento de elementos e ampliar a cobertura de testes
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?
N/A
Referências
https://scielo.readthedocs.io/projects/scielo-publishing-schema/pt-br/latest/tagset/elemento-aff.html