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

Fix: aff advice #880

Merged
merged 3 commits into from
Feb 13, 2025
Merged

Conversation

Rossi-Luciano
Copy link
Collaborator

O que esse PR faz?

Ajusta o conteúdo de advice nas funções de validação de aff.

Onde a revisão poderia começar?

Por commit.

Como este poderia ser testado manualmente?

NA.

Algum cenário de contexto que queira dar?

NA.

Screenshots

NA.

Quais são tickets relevantes?

TK #878

Referências

NA.

is_valid=bool(original),
expected="original affiliation",
obtained=original,
advice='mark complete institutional affiliation with <aff><institution content-type="original">',
Copy link
Member

Choose a reason for hiding this comment

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

@Rossi-Luciano Use 'original' no lugar de 'complete'

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

is_valid=bool(orgname),
expected="orgname",
obtained=orgname,
advice='mark institutional affiliation name with <aff><institution content-type="orgname">',
Copy link
Member

Choose a reason for hiding this comment

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

@Rossi-Luciano Para escrever 'advice', consulte o guia SPS 1.10:

orgname Representa a instituição de primeiro nível hierárquico mencionada na afiliação.
orgdiv1 Representa, hierarquicamente, a primeira divisão da instituição mencionada.
orgdiv2 Representa, hierarquicamente, a segunda divisão da instituição mencionada.
original Identifica a afiliação completa conforme consta no texto do artigo

Copy link
Member

@robertatakenaka robertatakenaka Feb 10, 2025

Choose a reason for hiding this comment

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

  • orgname: Mark the main institution with <aff><institution content-type="orgname">
  • orgdiv1: Mark the first hierarchical subdivision with <aff><institution content-type="orgdiv1">
  • orgdiv2: Mark the second hierarchical subdivision with <aff><institution content-type="orgdiv2">
  • original: Mark the complete original affiliation text with <aff><institution content-type="original">

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

country_code if is_valid else f"one of {country_codes_list}"
),
obtained=country_code,
advice=f"add @country in <aff><country country=VALUE> and replace VALUE with one of {country_codes_list}",
Copy link
Member

Choose a reason for hiding this comment

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

@Rossi-Luciano

f'Complete country="" in <aff><country country=""> with a valid value: {country_codes_list}'

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

is_valid=bool(state),
expected="state",
obtained=state,
advice='mark affiliation state with <aff><addr-line><named-content content-type="state">',
Copy link
Member

Choose a reason for hiding this comment

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

@Rossi-Luciano

Mark affiliation state with <aff><addr-line><state>

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

is_valid=bool(city),
expected="city",
obtained=city,
advice='mark affiliation city with <aff><addr-line><named-content content-type="city">',
Copy link
Member

Choose a reason for hiding this comment

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

Troque <named-content content-type="city"> por <city>

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

is_valid=bool(aff_id),
expected="affiliation ID",
obtained=aff_id,
advice="add @id in <aff id=VALUE> and replace VALUE with affiliation identifier",
Copy link
Member

Choose a reason for hiding this comment

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

advice='Complete id="" in <aff id=""> with affiliation identifier. Consult the documentation of SPS of the current version',

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@@ -411,9 +401,9 @@ def validate_comparison(self, main_aff: dict):
got = result["got"]
items = result["items"]
if self.affiliation.get("id"):
advice = f"Review affiliation ({self.affiliation.get('id')})"
advice = f"Low similarity detected. Review and adjust affiliation ({self.affiliation.get('id')}) to better match the main text."
Copy link
Member

Choose a reason for hiding this comment

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

@Rossi-Luciano Use um texto menos técnico.

The affiliation {self.affiliation} is inconsistent with {main_aff}. Check if {self.affiliation} is translation of {main_aff}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

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.

@Rossi-Luciano fazer as correções

@@ -401,9 +401,9 @@ def validate_comparison(self, main_aff: dict):
got = result["got"]
items = result["items"]
if self.affiliation.get("id"):
advice = f"Low similarity detected. Review and adjust affiliation ({self.affiliation.get('id')}) to better match the main text."
advice = f"The affiliation {self.affiliation.get("id")} is inconsistent with {main_aff}. Check if {self.affiliation.get("id")} is translation of {main_aff}"
Copy link
Member

Choose a reason for hiding this comment

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

@Rossi-Luciano ajuste as aspas do início e do fim
f'The affiliation {self.affiliation.get("id")} is inconsistent with {main_aff}. Check if {self.affiliation.get("id")} is translation of {main_aff}'

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@robertatakenaka robertatakenaka merged commit d10e005 into scieloorg:master Feb 13, 2025
2 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.

2 participants