Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

Should layout.get_entities return meta-data keys? #37

Open
adelavega opened this issue Feb 11, 2023 · 2 comments
Open

Should layout.get_entities return meta-data keys? #37

adelavega opened this issue Feb 11, 2023 · 2 comments
Labels
question Further information is requested

Comments

@adelavega
Copy link
Collaborator

pybids currently returns both entities and meta-data keys (all in dataset) by default.

ancp-bids does not yet support listing all meta-data keys in dataset. presumably this is a useful feature we should implement, but if we do, should this be the default thing that is returned? (presumably it will be somewhat expensive)

@adelavega adelavega added the question Further information is requested label Feb 11, 2023
@erdalkaraca
Copy link
Collaborator

@adelavega great to see that you applied the query language to search for all metadata artifacts, that is exactly how it was expected to be used... in the current implementation of the _get_unique_metadata() only hashable values are added to the final metadata dict, i.e. complex keys will be ignored... is this by purpose?

@adelavega
Copy link
Collaborator Author

adelavega commented Mar 5, 2023

Great!

Yes this is on purpose because it returns a list of unique values for each entity, and non-hashables are more difficult to do a "set" on.

This is only a problem for a minority meta-data keys, and a lazy way to temporarily solve this problem, but when we re-design the API, we can think of other ways to handle this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants