Skip to content

Conversation

TomNicholas
Copy link
Member

@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
Member 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

@TomNicholas TomNicholas requested a review from shoyer September 16, 2024 15:01
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