corteva / rioxarray

geospatial xarray extension powered by rasterio
https://corteva.github.io/rioxarray
Other
517 stars 82 forks source link

BUG: Fix closing files manually #607

Closed snowman2 closed 1 year ago

snowman2 commented 1 year ago

In #606 it became evident that the files were not being closed. This fix should help users to close Datasets that have data_vars pointing to files.

codecov[bot] commented 1 year ago

Codecov Report

Base: 96.33% // Head: 96.37% // Increases project coverage by +0.04% :tada:

Coverage data is based on head (a85545d) compared to base (49f2815). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #607 +/- ## ========================================== + Coverage 96.33% 96.37% +0.04% ========================================== Files 11 11 Lines 1691 1711 +20 ========================================== + Hits 1629 1649 +20 Misses 62 62 ``` | [Impacted Files](https://codecov.io/gh/corteva/rioxarray/pull/607?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=corteva) | Coverage Δ | | |---|---|---| | [rioxarray/\_io.py](https://codecov.io/gh/corteva/rioxarray/pull/607/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=corteva#diff-cmlveGFycmF5L19pby5weQ==) | `96.55% <100.00%> (+0.10%)` | :arrow_up: | | [rioxarray/xarray\_plugin.py](https://codecov.io/gh/corteva/rioxarray/pull/607/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=corteva#diff-cmlveGFycmF5L3hhcnJheV9wbHVnaW4ucHk=) | `92.59% <100.00%> (+1.28%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=corteva). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=corteva)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

snowman2 commented 1 year ago

Thanks @justingruca :+1: