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

Refactor ExportRequest #166

Merged
merged 1 commit into from
Jun 5, 2023
Merged

Refactor ExportRequest #166

merged 1 commit into from
Jun 5, 2023

Conversation

amandine-sahl
Copy link
Contributor

Prise en compte remarque PR #155
Ajout paramètre --skip-newer-than et utilisation de ce dernière pour les fichiers non scheduler

@amandine-sahl amandine-sahl force-pushed the workshop_refactoring branch from b9b8e3c to ac4bd49 Compare May 16, 2023 15:02
@codecov
Copy link

codecov bot commented May 16, 2023

Codecov Report

Patch coverage: 87.17% and project coverage change: +7.60 🎉

Comparison is base (8d1cd22) 53.52% compared to head (c0fca8c) 61.13%.

❗ Current head c0fca8c differs from pull request most recent head 423d835. Consider uploading reports for the commit 423d835 to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##           workshop     #166      +/-   ##
============================================
+ Coverage     53.52%   61.13%   +7.60%     
============================================
  Files            12       11       -1     
  Lines           680      669      -11     
============================================
+ Hits            364      409      +45     
+ Misses          316      260      -56     
Flag Coverage Δ
pytest 61.13% <87.17%> (+7.60%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
backend/gn_module_export/blueprint.py 56.61% <0.00%> (-0.63%) ⬇️
backend/gn_module_export/tasks.py 84.21% <ø> (+14.21%) ⬆️
backend/gn_module_export/utils_export.py 90.00% <86.20%> (+46.06%) ⬆️
backend/gn_module_export/commands.py 77.19% <100.00%> (+33.12%) ⬆️
backend/gn_module_export/models.py 95.78% <100.00%> (+0.38%) ⬆️
backend/gn_module_export/utils/export.py 96.15% <100.00%> (+0.50%) ⬆️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@amandine-sahl amandine-sahl force-pushed the workshop_refactoring branch from 6ebcb62 to 9d777be Compare May 23, 2023 13:42
raise ExportGenerationNotNeeded(self.export.id, self.skip_newer_than - age)

def get_export_url(self):
with current_app.test_request_context():
Copy link
Contributor

Choose a reason for hiding this comment

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

À priori c’est pas fait pour ça test_request_context ! C’est quoi le soucis qui t’as amené à devoir le mettre ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

C'est l'usage d'url_for qui ne peut être appeler que dans le contexte d'une requête. Sauf si on lui spécifie le SERVER_NAME.

https://flask.palletsprojects.com/en/2.3.x/api/#flask.Flask.url_for

@amandine-sahl amandine-sahl force-pushed the workshop_refactoring branch from c0fca8c to dc59527 Compare June 5, 2023 09:05
…ompte également pour export utilisateur)

Change url_for

test task and commands

Test generate schedule
@amandine-sahl amandine-sahl force-pushed the workshop_refactoring branch from dc59527 to 423d835 Compare June 5, 2023 09:54
@amandine-sahl amandine-sahl merged commit 1ca6689 into workshop Jun 5, 2023
@amandine-sahl amandine-sahl deleted the workshop_refactoring branch June 5, 2023 10:02
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.

3 participants