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

Migrate to SQLAlchemy 2.0 #1432

Merged
merged 14 commits into from
Apr 11, 2023
Merged

Migrate to SQLAlchemy 2.0 #1432

merged 14 commits into from
Apr 11, 2023

Conversation

SpacemanPaul
Copy link
Contributor

Reason for this pull request

SQLAlchemy2.0 has been released with a number of backwards incompatible API changes. Datacube-1.9 is a convenient place to deal with this.

Proposed changes

  • Use the new postgresql dialect Range type hierarchy.

  • Fix all remaining SQLA1.4 query and row access API incompatibilities.

  • Update ensure_db implementations to work with SQLA2.0 transaction defaults.

  • Closes Migrate to SQLAlchemy 2.0 #1431

  • Tests added / passed

  • Fully documented, including docs/about/whats_new.rst for all changes

.github/workflows/main.yml Outdated Show resolved Hide resolved
.github/workflows/main.yml Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Apr 6, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.04 🎉

Comparison is base (91a513a) 91.91% compared to head (aa7b7c9) 91.95%.

Additional details and impacted files
@@               Coverage Diff               @@
##           develop-1.9    #1432      +/-   ##
===============================================
+ Coverage        91.91%   91.95%   +0.04%     
===============================================
  Files              135      135              
  Lines            15088    15085       -3     
===============================================
+ Hits             13868    13872       +4     
+ Misses            1220     1213       -7     
Impacted Files Coverage Δ
datacube/drivers/postgis/_api.py 87.26% <100.00%> (ø)
datacube/drivers/postgis/_core.py 98.96% <100.00%> (+4.01%) ⬆️
datacube/drivers/postgis/sql.py 83.92% <100.00%> (+0.29%) ⬆️
datacube/drivers/postgres/_api.py 96.27% <100.00%> (+0.01%) ⬆️
datacube/drivers/postgres/_core.py 99.02% <100.00%> (+2.76%) ⬆️
datacube/drivers/postgres/_fields.py 90.53% <100.00%> (ø)
datacube/drivers/postgres/sql.py 98.21% <100.00%> (+0.03%) ⬆️
datacube/index/postgis/_datasets.py 74.81% <100.00%> (ø)
datacube/index/postgres/_datasets.py 94.84% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

@SpacemanPaul SpacemanPaul marked this pull request as ready for review April 6, 2023 05:16
@SpacemanPaul SpacemanPaul requested review from pindge and omad April 6, 2023 05:16
@pindge pindge linked an issue Apr 6, 2023 that may be closed by this pull request
@SpacemanPaul SpacemanPaul mentioned this pull request Apr 6, 2023
1 task
Copy link
Member

@omad omad left a comment

Choose a reason for hiding this comment

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

I think this looks good, bar the 1 line change in the GitHub actions workflow.

And even that, the whole workflow file either needs a bunch of comments to explain what's going on, or refactoring to make it less insane...

.github/workflows/main.yml Outdated Show resolved Hide resolved
@SpacemanPaul
Copy link
Contributor Author

I think this looks good, bar the 1 line change in the GitHub actions workflow.

And even that, the whole workflow file either needs a bunch of comments to explain what's going on, or refactoring to make it less insane...

GHA workflows have long been black magic to me - I learned a lot on this PR.

@SpacemanPaul SpacemanPaul merged commit 5fcbe21 into develop-1.9 Apr 11, 2023
@SpacemanPaul SpacemanPaul deleted the sqlalchemy2 branch April 11, 2023 01:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Migrate to SQLAlchemy 2.0
3 participants