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

Forbid slashes in datatree coordinate names #9492

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

TomNicholas
Copy link
Contributor

@TomNicholas TomNicholas commented Sep 13, 2024

Follow-up to #9378 (cc @etienneschalk ). This PR also forbids forward slashes in child names, and in coordinate variable names set via dt.coords.__setitem__.

Not the cleanest PR ever (we raise basically the same error message in 4 different places in the code...) but the point is to prevent inconsistent state now so that we don't release something broken, and then I can make sure to get the obviously-needed refactor mentioned in #9485 (comment) right.

cc @shoyer

@TomNicholas TomNicholas added the topic-DataTree Related to the implementation of a DataTree class label Sep 13, 2024
@TomNicholas TomNicholas changed the title Forbid slashes in child & coord names Forbid slashes in datatree coordinate names Sep 16, 2024
@TomNicholas
Copy link
Contributor Author

This has now been updated in light of #9494. What this adds is:

  1. Also forbidding slashes in names of datatree coordinate variables (a temporary solution before we fully fix Assigning to DataTree.coords should support full paths #9485),
  2. More tests
  3. Very minor refactoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-DataTree Related to the implementation of a DataTree class
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Forbid path-like child names
1 participant