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

Cria Métodos de Classe no Modelo Article #832

Merged
merged 7 commits into from
Oct 1, 2024

Conversation

samuelveigarangel
Copy link
Collaborator

O que esse PR faz?

Cria Métodos de Classe no Modelo Article

Onde a revisão poderia começar?

pelos commits

Como este poderia ser testado manualmente?

make up

python manage.py runscript load_articles --script-args admin

Algum cenário de contexto que queira dar?

N/A

Screenshots

N/A

Quais são tickets relevantes?

#820

Referências

N/A

def get_or_create(cls, doi, pid_v2, fundings, user):
def get(
cls,
doi,
Copy link
Member

Choose a reason for hiding this comment

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

@samuelveigarangel acho melhor remover o doi. Se é necessário recuperar artigos por DOI, melhor ter um método específico para isso.

Comment on lines 248 to 249
doi=None,
fundings=None,
Copy link
Member

Choose a reason for hiding this comment

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

@samuelveigarangel remover doi e fundings. O método create deveria somente aceitar pid_v3

Comment on lines 269 to 270
doi=None,
fundings=None,
Copy link
Member

Choose a reason for hiding this comment

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

@samuelveigarangel remover doi e fundings, deixar apenas pid_v3

@@ -28,11 +28,9 @@ def harvest_preprints(URL, user):
identifier = get_doi(article_info["identifier"])
doi = get_or_create_doi(doi=identifier, user=user)

article = models.Article.get_or_create(
article = models.Article.create(
Copy link
Member

@robertatakenaka robertatakenaka Aug 14, 2024

Choose a reason for hiding this comment

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

No caso, seria:

article = models.Article.objects.create(...)

Os metodos de criação de Article exigem pid_v3

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.

@samuelveigarangel Realizar correção

@@ -28,7 +28,7 @@ def harvest_preprints(URL, user):
identifier = get_doi(article_info["identifier"])
doi = get_or_create_doi(doi=identifier, user=user)

article = models.Article.create(
article = models.Article.objects.create(
Copy link
Member

Choose a reason for hiding this comment

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

@samuelveigarangel Os artigos provenientes do preprint podem vir a entrar em alguma coleção SciELO. Então, isso tem que ser tratado para não duplicar...

@samuelveigarangel samuelveigarangel merged commit e2a02fe into scieloorg:main Oct 1, 2024
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.

2 participants