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

Diag fig fix #73

Merged
merged 2 commits into from
Jul 11, 2024
Merged

Diag fig fix #73

merged 2 commits into from
Jul 11, 2024

Conversation

kerriegeil
Copy link
Contributor

Fixing diag_fig to accept an xarray data array (in addition to dataset). The documentation says this is possible but it is not due to the direct call to create_raster_polygons which skips the wrapper where data arrays are converted to datasets. I've copied the dataset conversion lines to diag_fig from the pixel_overlaps wrapper.

I ran the tests and found 4 fails but they are unrelated to my edits as the fails were present beforehand. This PR includes a fix for two of the fails. They were related to trying to delete the test.nc temporary file while it is open in test_to_netcdf.

The other two fails are related to precision/tolerance, which I didn't look into. (platform win32 -- Python 3.12.4, pytest-8.2.2, pluggy-1.5.0)

FAILED tests/test_export.py::test_to_dataframe - AssertionError: MultiIndex level [0] are different
FAILED tests/test_export.py::test_to_dataframe_renamelocdim - AssertionError: MultiIndex level [0] are different

Copy link

codecov bot commented Jul 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.48%. Comparing base (e637331) to head (6a3e621).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #73      +/-   ##
==========================================
+ Coverage   90.49%   94.48%   +3.99%     
==========================================
  Files          15       14       -1     
  Lines        1136     1088      -48     
==========================================
  Hits         1028     1028              
+ Misses        108       60      -48     
Flag Coverage Δ
unittests 94.48% <100.00%> (+3.99%) ⬆️

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.

@ks905383 ks905383 merged commit d8ad4f3 into ks905383:main Jul 11, 2024
6 checks passed
@ks905383
Copy link
Owner

Great, thanks!

Odd that the tests are failing locally but not on the GitHub Actions, I wonder if there's something in a newer version of xarray or numpy that's changing tolerance behavior...

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