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

do not allow "/" in 'name' fields of schema #11

Closed
bendichter opened this issue Jun 9, 2020 · 8 comments · Fixed by #510
Closed

do not allow "/" in 'name' fields of schema #11

bendichter opened this issue Jun 9, 2020 · 8 comments · Fixed by #510

Comments

@bendichter
Copy link
Contributor

No description provided.

@CodyCBakerPhD
Copy link
Member

CodyCBakerPhD commented May 27, 2021

@bendichter @luiztauffer Old issue, I know, but this is actually going to be hard to enforce in the json schema when it is acting on paths. They have to be converted to strings even if they are really intended to be Path objects since json doesn't make the distinction.

We can definitely do it for any strings that we hard-code for some reason within the ecosystem, however.

@luiztauffer
Copy link
Member

we might have regex rules for string fields of pynwb classes schemas, we would have to adapt our get_schema_from... functions to include that. We would probably like to exclude any special characters from name fields for example.
But yes, it is not possible to exclude / for source_data and conversion_options, which contain paths as strings.

@CodyCBakerPhD
Copy link
Member

@bendichter Can this be closed?

@bendichter
Copy link
Contributor Author

I don't think this has been fixed, has it?

@CodyCBakerPhD
Copy link
Member

Can you point to a specific place or set of places where it still needs to be fixed? Or was this an assertion type thing to apply to user specified metadata values that aren't path-like?

@bendichter
Copy link
Contributor Author

I was thinking we could use regex in the json schema to ensure that the "name" field of objects does not include a slash. If it does, this might be taken as an instruction to create a sub-group.

@CodyCBakerPhD
Copy link
Member

Aha, I see. Just applied to name or any other fields you can think of?

@bendichter
Copy link
Contributor Author

Well any field that would become the name of an HDF5 Group, but I think "name" is the only one that applies to

@CodyCBakerPhD CodyCBakerPhD changed the title do not allow "/" in string entries do not allow "/" in 'name' fields of schema Mar 21, 2022
@CodyCBakerPhD CodyCBakerPhD transferred this issue from catalystneuro/nwb-conversion-tools Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants