-
Notifications
You must be signed in to change notification settings - Fork 179
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
odc-geo migration #1424
odc-geo migration #1424
Conversation
4247806
to
c8e846f
Compare
Hey @Ariana-B, really looking forward to this - will be fantastic to have Will it be possible to access that
|
9d37018
to
4746b7f
Compare
…Dataset wrapper, get most ingestion tests working
dd302ef
to
d21a56d
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop-1.9 #1424 +/- ##
===============================================
- Coverage 91.97% 85.63% -6.34%
===============================================
Files 135 134 -1
Lines 15070 14958 -112
===============================================
- Hits 13860 12809 -1051
- Misses 1210 2149 +939
☔ View full report in Codecov by Sentry. |
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.
Note to other reviewers: Ariana and I looked into it and the latest versions of the NetCDF library accept unicode strings, so this module is no longer required.
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.
Overall, looking great. See various minor inline comments, also you said "Mark datacube geometry utilities as deprecated but still maintain backwards compatibility for now" but that doesn't seem to have been done.
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.
Looks great, thanks Ariana.
As discussed, we'll give Kirill a chance to review before merging.
Very excited about this PR! So at the moment (
With
Is the plan that data loaded from datacube 1.9 will contain just the new automatically created My feeling is that we don't need both - we should rely on the |
This document captures the main differences of
One could expose I think there is no issue having Probably best to keep |
@@ -44,7 +50,7 @@ | |||
mid_longitude, | |||
) | |||
|
|||
from .tools import ( | |||
from .tools import ( # noqa |
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.
Adding these to __all__
below would remove the need for # noqa
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.
Thank you @Ariana-B for going through this important but tedious change. I think this is good to merge. I would probably make sure that xx.geobox
still works before making a release, it should issue deprecation warning stating that xx.odc.geobox
is the new way to access this information.
from datacube.utils.math import affine_from_axis | ||
from odc.geo import CRS, CRSError, wh_ | ||
from odc.geo.geobox import GeoBox | ||
|
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.
One more thing that I have missed in the previous review. This file should just delegate geobox extraction to .odc.geo.xr
with a warning, this extraction logic is in odc-geo
.
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.
I've implemented the change; let me know if it aligns with what you had in mind.
Thanks @Kirill888, happy with us just marking the current On a similar note, should these also be marked as deprecated? They all seem like things we can access more reliably via
|
Reason for this pull request
Geometry utilities have already been extracted from core into a separate package,
odc-geo
, however the code has not been replaced with calls to theodc-geo
library.Proposed changes
Replace all
datacube.utils.geometry
imports with the correspondingodc.geo
importsRemove geometry tests
Mark datacube geometry utilities as deprecated but still maintain backwards compatibility for now
Remove NetCDF Dataset wrapper
Mark xarray
.geobox
property as deprecatedCloses #xxxx
Tests added / passed
Fully documented, including
docs/about/whats_new.rst
for all changes📚 Documentation preview 📚: https://datacube-core--1424.org.readthedocs.build/en/1424/