Thanks to visit codestin.com
Credit goes to github.com

Skip to content

test_rasterio_ascii fails for GDAL 3.8.3 #774

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

Closed
JoerivanEngelen opened this issue Jan 24, 2024 · 0 comments Β· Fixed by #775
Closed

test_rasterio_ascii fails for GDAL 3.8.3 #774

JoerivanEngelen opened this issue Jan 24, 2024 · 0 comments Β· Fixed by #775
Assignees

Comments

@JoerivanEngelen
Copy link
Contributor

Build in #760 fails for test_rasterio_ascii

Relevant updates in lock file are:

GDAL 3.7.3 -> 3.8.3
pandas 2.1.4 -> 2.2.0

Setting back pandas 2.1.4 doesn't fix the issue, so it is due to GDAL.
It appears as if GDAL now writes right indented numbers instead of left indented or something.

I think testing strings are identical here defeats the purpose, important is that GDAL can read the file and interprets the file equal as if it were written with GDAL. Replacing assert_equal_content with the following code fixes the errors:

    def assert_equal_content(path_a, path_b):
        assert Path(path_a).exists()
        assert Path(path_b).exists()
        ds_a = xr.open_dataset(path_a, engine="rasterio")
        ds_b = xr.open_dataset(path_b, engine="rasterio")

        xr.testing.assert_identical(ds_a, ds_b)
@github-project-automation github-project-automation bot moved this to πŸ“― New in iMOD Suite Jan 24, 2024
@JoerivanEngelen JoerivanEngelen moved this from πŸ“― New to πŸ— In Progress in iMOD Suite Jan 24, 2024
@JoerivanEngelen JoerivanEngelen self-assigned this Jan 24, 2024
@JoerivanEngelen JoerivanEngelen moved this from πŸ— In Progress to 🧐 In Review in iMOD Suite Jan 24, 2024
github-merge-queue bot pushed a commit that referenced this issue Jan 24, 2024
Fixes #774 

# Description
Build in #760 fails for
test_rasterio_ascii

``test_rasterio_ascii`` doesn't work for GDAL 3.8.3 compared to 3.7.3. 

Previously it was tested if files are exactly identical. This defeats
the purpose, more important is that GDAL can read the file and
interprets the file equal as if it were written with GDAL. Replacing
``assert_equal_content`` with the changes fixes things.

# Checklist
<!---
Before requesting review, please go through this checklist:
-->

- [x] Links to correct issue
- [ ] Update changelog, if changes affect users
- [x] PR title starts with ``Issue #nr``, e.g. ``Issue #737``
- [x] Unit tests were added
- [ ] **If feature added**: Added/extended example
@github-project-automation github-project-automation bot moved this from 🧐 In Review to βœ… Done in iMOD Suite Jan 24, 2024
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 a pull request may close this issue.

1 participant