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

Autoconvert legacy geoboxes #1574

Merged
merged 3 commits into from Apr 9, 2024
Merged

Conversation

SpacemanPaul
Copy link
Contributor

@SpacemanPaul SpacemanPaul commented Apr 9, 2024

Reason for this pull request

If you pass in a legacy GeoBox to dc.load() you eventually get an error from deep in the loading code

This is the 1.9 equivalent of @robbibt 's #1551 PR to 1.8.

Proposed changes

  • Check for legacy datacube.utils.geometry.GeoBox objects in the datacube.Datacube API before calling loading code and convert to odc.geo.geobox.GeoBox.

  • Unit test

  • do class check without importing the deprecated legacy class to avoid deprecation warnings.

  • Tests added / passed

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

@SpacemanPaul SpacemanPaul marked this pull request as draft April 9, 2024 06:18
@SpacemanPaul SpacemanPaul changed the base branch from develop to develop-1.9 April 9, 2024 06:18
Copy link

codecov bot commented Apr 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.78%. Comparing base (a8ec892) to head (7424bcb).

Additional details and impacted files
@@               Coverage Diff               @@
##           develop-1.9    #1574      +/-   ##
===============================================
+ Coverage        85.58%   85.78%   +0.19%     
===============================================
  Files              140      140              
  Lines            15384    15386       +2     
===============================================
+ Hits             13167    13199      +32     
+ Misses            2217     2187      -30     

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

@SpacemanPaul SpacemanPaul marked this pull request as ready for review April 9, 2024 06:55
Copy link
Contributor

@Ariana-B Ariana-B left a comment

Choose a reason for hiding this comment

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

lgtm

@SpacemanPaul SpacemanPaul merged commit e318d1f into develop-1.9 Apr 9, 2024
26 checks passed
@SpacemanPaul SpacemanPaul deleted the autoconvert_legacy_geoboxes branch April 9, 2024 09:47
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.

None yet

2 participants