-
Notifications
You must be signed in to change notification settings - Fork 7
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
Implementar verificação de disponibilidade de artigos em scielo.br #462
Open
samuelveigarangel
wants to merge
19
commits into
scieloorg:main
Choose a base branch
from
samuelveigarangel:issue-454
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
b8901ab
Coloca _get_user em um lugar comum aos aplicativos
samuelveigarangel 490530f
realiza mudanca do _get_user
samuelveigarangel 793a84e
realiza mudanca do _get_user
samuelveigarangel 48118d4
realiza mudanca do _get_user
samuelveigarangel 783ae05
realiza mudanca do _get_user
samuelveigarangel 0e7779d
realiza mudanca do _get_user e remove _get_user em task_publish_model…
samuelveigarangel 5582b74
realiza mudanca do _get_user
samuelveigarangel 91a5b6c
Cria os modelos e seus metodos de classe (CheckArticleAvailability, S…
samuelveigarangel 4a6b2e8
Insere o paramentro date nos metodos das classes CheckArticleAvailabi…
samuelveigarangel 4db2b20
Cria tasks que realizam a verificacao da disponibilidade do artigo no…
samuelveigarangel 627c144
Cria ScieloSiteStatusAdmin
samuelveigarangel 465f4a6
script para executar initiate_article_availability_check
samuelveigarangel c47344c
migracao
samuelveigarangel f3f615f
Corrige for em initiate_article_availability_check
samuelveigarangel 9bb5aea
Cria Choices VERIFY_ARTICLE_TYPE E VERIFY_HTTP_ERROR_CODE
samuelveigarangel 4bc73af
- Adiciona campo type e available em ScieloSiteStatus
samuelveigarangel 5f978ff
- Adiciona bloco try-except em initiate_article_availability_check e …
samuelveigarangel a99427b
Adiciona novos displays e filter em ScieloSiteStatus
samuelveigarangel 2706e9d
migracao
samuelveigarangel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
141 changes: 141 additions & 0 deletions
141
article/migrations/0002_scielositestatus_checkarticleavailability.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
# Generated by Django 5.0.3 on 2024-05-23 15:09 | ||
|
||
import django.db.models.deletion | ||
from django.conf import settings | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("article", "0001_initial"), | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="ScieloSiteStatus", | ||
fields=[ | ||
( | ||
"id", | ||
models.BigAutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
( | ||
"created", | ||
models.DateTimeField( | ||
auto_now_add=True, verbose_name="Creation date" | ||
), | ||
), | ||
( | ||
"updated", | ||
models.DateTimeField( | ||
auto_now=True, verbose_name="Last update date" | ||
), | ||
), | ||
("check_date", models.DateTimeField(blank=True, null=True)), | ||
("url_site_scielo", models.SlugField(max_length=500, unique=True)), | ||
("status", models.CharField(blank=True, max_length=80, null=True)), | ||
( | ||
"type", | ||
models.CharField( | ||
blank=True, | ||
choices=[("TEXT", "Texto"), ("PDF", "pdf")], | ||
max_length=10, | ||
null=True, | ||
), | ||
), | ||
("available", models.BooleanField(default=False)), | ||
( | ||
"creator", | ||
models.ForeignKey( | ||
editable=False, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="%(class)s_creator", | ||
to=settings.AUTH_USER_MODEL, | ||
verbose_name="Creator", | ||
), | ||
), | ||
( | ||
"updated_by", | ||
models.ForeignKey( | ||
blank=True, | ||
editable=False, | ||
null=True, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="%(class)s_last_mod_user", | ||
to=settings.AUTH_USER_MODEL, | ||
verbose_name="Updater", | ||
), | ||
), | ||
], | ||
options={ | ||
"verbose_name": "Scielo Site Status", | ||
"verbose_name_plural": "Scielo Site Status", | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name="CheckArticleAvailability", | ||
fields=[ | ||
( | ||
"id", | ||
models.BigAutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
( | ||
"created", | ||
models.DateTimeField( | ||
auto_now_add=True, verbose_name="Creation date" | ||
), | ||
), | ||
( | ||
"updated", | ||
models.DateTimeField( | ||
auto_now=True, verbose_name="Last update date" | ||
), | ||
), | ||
( | ||
"article", | ||
models.ForeignKey( | ||
null=True, | ||
on_delete=django.db.models.deletion.SET_NULL, | ||
to="article.article", | ||
unique=True, | ||
), | ||
), | ||
( | ||
"creator", | ||
models.ForeignKey( | ||
editable=False, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="%(class)s_creator", | ||
to=settings.AUTH_USER_MODEL, | ||
verbose_name="Creator", | ||
), | ||
), | ||
( | ||
"updated_by", | ||
models.ForeignKey( | ||
blank=True, | ||
editable=False, | ||
null=True, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="%(class)s_last_mod_user", | ||
to=settings.AUTH_USER_MODEL, | ||
verbose_name="Updater", | ||
), | ||
), | ||
("site_status", models.ManyToManyField(to="article.scielositestatus")), | ||
], | ||
options={ | ||
"abstract": False, | ||
}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from article.tasks import initiate_article_availability_check | ||
|
||
|
||
def run(pid_v3, username=None, user_id=None): | ||
initiate_article_availability_check.apply_async( | ||
kwargs=dict( | ||
username=username, | ||
user_id=user_id, | ||
article_pid_v3=pid_v3, | ||
) | ||
) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 adicione a collection de modo que checará a disponibilidade em todas as coleções. Também deveria ser considerado a disponibilidade no site QA, inclusive saber se está disponível em ambos ou em somente um