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

Ugrid1D.merge_partitions throws error if dataset contains attrs #210

Closed
JoerivanEngelen opened this issue Feb 8, 2024 · 0 comments · Fixed by #215
Closed

Ugrid1D.merge_partitions throws error if dataset contains attrs #210

JoerivanEngelen opened this issue Feb 8, 2024 · 0 comments · Fixed by #215
Assignees
Labels
bug Something isn't working

Comments

@JoerivanEngelen
Copy link
Contributor

JoerivanEngelen commented Feb 8, 2024

Related to #86, #134

If a grid contains attrs and is grid.merge_partitions is called, the following is raised:
ValueError: indexes must be provided for attrs

Because in Ugrid1D.merge_partitions, the following call is made:

...
        merged_grid = Ugrid1d(
            *node_coordinates.T,
            fill_value,
            new_edges,
            name=grid.name,
            projected=grid.projected,
            crs=grid.crs,
            attrs=grid._attrs,
        )
        return merged_grid, indexes

So no indexes are provided as arg. Ugrid2d does provide indexes. Fixing this is trivial, however what is lacking is testing of merging partitions for Ugrid1d grids. Presumably because setting up tests requires some extra manual work, since we cannot easily partition 1d grids yet.

@JoerivanEngelen JoerivanEngelen added the bug Something isn't working label Feb 8, 2024
@JoerivanEngelen JoerivanEngelen self-assigned this Feb 8, 2024
@github-project-automation github-project-automation bot moved this to 📯 New in iMOD Suite Feb 8, 2024
@JoerivanEngelen JoerivanEngelen moved this from 📯 New to 🏗 In Progress in iMOD Suite Feb 8, 2024
@Huite Huite closed this as completed in #215 Feb 9, 2024
Huite added a commit that referenced this issue Feb 9, 2024
Issue #210 fix bug in Ugrid1D.merge_partitions
@github-project-automation github-project-automation bot moved this from 🏗 In Progress to ✅ Done in iMOD Suite Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

1 participant