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

Don't require consecutive Node IDs #885

Merged
merged 3 commits into from
Dec 14, 2023
Merged

Don't require consecutive Node IDs #885

merged 3 commits into from
Dec 14, 2023

Conversation

visr
Copy link
Member

@visr visr commented Dec 11, 2023

Fixes #694

It basically was already fixed in the metagraphs refactor, I just had to remove the validation check from Python.

This also adds support for 0, but not negative IDs, as I feel those could be confusing.

I used the trivial model to add some ID variations, and directly added some tests of the Arrow file results that we didn't really have yet.

@visr visr marked this pull request as ready for review December 11, 2023 21:46
@@ -248,7 +248,7 @@ function create_callbacks(
save_subgrid_level,
saved_subgrid_level;
saveat,
save_start = false,
save_start = true,
Copy link
Member Author

Choose a reason for hiding this comment

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

@Huite I'm now saving initial subgrid levels as well, just like the regular basin.arrow. I assume you copied this from flow, which is undefined at t0 so we don't save it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, this sounds fine.

Comment on lines +82 to +83
# TODO The original subgrid IDs are lost and mapped to 1, 2, 3
@test subgrid.subgrid_id[1:3] == [11, 22, 33] broken = true
Copy link
Member Author

Choose a reason for hiding this comment

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

@Huite I assume you want to keep the original subgrid IDs right? If so let's create an issue to fix this. We'd have to store them in the struct Subgrid.

Copy link
Contributor

@Huite Huite Dec 14, 2023

Choose a reason for hiding this comment

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

Yes, I think we should keep them around. Are you opening an issue?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, I opened #895

@Hofer-Julian Hofer-Julian merged commit f20ef47 into main Dec 14, 2023
14 checks passed
@Hofer-Julian Hofer-Julian deleted the any-id branch December 14, 2023 10:27
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.

numbering of nodes
3 participants