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

Passage à sqlalchemy 1.4 #283

Merged
merged 13 commits into from
Jan 16, 2024
Merged

Passage à sqlalchemy 1.4 #283

merged 13 commits into from
Jan 16, 2024

Conversation

amandine-sahl
Copy link
Contributor

No description provided.

@jacquesfize
Copy link
Contributor

jacquesfize commented Dec 11, 2023

L'utilisation de la class Query est legacy depuis la 1.4. A remplacer par Select https://docs.sqlalchemy.org/en/20/core/selectable.html#sqlalchemy.sql.expression.Select . Toutes les requêtes sont nickels sinon 👍

Dans le code, il faut juste remplacer les types Query déclarés dans les méthodes de classes comme GnMonitoringGenericFilter.

Copy link
Contributor

@jacquesfize jacquesfize left a comment

Choose a reason for hiding this comment

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

Encore quelques objects Query (et quelques modifications mineurs des imports) qui trainent mais c'est bon pour moi ✔️

backend/gn_module_monitoring/command/utils.py Outdated Show resolved Hide resolved
backend/gn_module_monitoring/config/utils.py Outdated Show resolved Hide resolved
backend/gn_module_monitoring/monitoring/models.py Outdated Show resolved Hide resolved
backend/gn_module_monitoring/monitoring/models.py Outdated Show resolved Hide resolved
backend/gn_module_monitoring/monitoring/queries.py Outdated Show resolved Hide resolved
backend/gn_module_monitoring/routes/site.py Outdated Show resolved Hide resolved
backend/gn_module_monitoring/routes/site.py Outdated Show resolved Hide resolved
backend/gn_module_monitoring/routes/site.py Outdated Show resolved Hide resolved
backend/gn_module_monitoring/utils/routes.py Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jan 16, 2024

Codecov Report

Attention: 49 lines in your changes are missing coverage. Please review.

Comparison is base (c27c601) 61.05% compared to head (5db5a0c) 71.81%.
Report is 1 commits behind head on dev-suivi-eolien.

Files Patch % Lines
backend/gn_module_monitoring/monitoring/queries.py 73.58% 14 Missing ⚠️
backend/gn_module_monitoring/routes/monitoring.py 58.82% 7 Missing ⚠️
...nd/gn_module_monitoring/monitoring/repositories.py 33.33% 6 Missing ⚠️
...ackend/gn_module_monitoring/routes/sites_groups.py 64.28% 5 Missing ⚠️
backend/gn_module_monitoring/monitoring/objects.py 20.00% 4 Missing ⚠️
backend/gn_module_monitoring/routes/data_utils.py 20.00% 4 Missing ⚠️
backend/gn_module_monitoring/utils/routes.py 84.00% 4 Missing ⚠️
backend/gn_module_monitoring/routes/site.py 90.47% 2 Missing ⚠️
backend/gn_module_monitoring/command/cmd.py 83.33% 1 Missing ⚠️
backend/gn_module_monitoring/command/utils.py 95.65% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@                  Coverage Diff                  @@
##           dev-suivi-eolien     #283       +/-   ##
=====================================================
+ Coverage             61.05%   71.81%   +10.76%     
=====================================================
  Files                    32       31        -1     
  Lines                  2285     2228       -57     
=====================================================
+ Hits                   1395     1600      +205     
+ Misses                  890      628      -262     
Flag Coverage Δ
pytest 71.81% <78.12%> (+10.76%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@amandine-sahl amandine-sahl changed the title fix monitoring model and query_class Passage à sqlalchemy 1.4 Jan 16, 2024
@amandine-sahl amandine-sahl merged commit f600cd9 into dev-suivi-eolien Jan 16, 2024
7 checks passed
@amandine-sahl amandine-sahl deleted the feat/sqlalchemy2 branch January 16, 2024 10:09
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