-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
topic: python utilsIssue related to the python utilitiesIssue related to the python utilities
Description
#224 add this code:
aqnwb/resources/utils/schematype_to_aqnwb.py
Lines 543 to 555 in fd66ef7
| # Determine the actual namespace this type belongs to | |
| # Check if this type comes from an included namespace | |
| type_namespace = namespace.name # Default to current namespace | |
| # Look through all namespaces in the catalog to find the original namespace | |
| for ns_name in type_map.namespace_catalog.namespaces: | |
| ns = type_map.namespace_catalog.get_namespace(ns_name) | |
| if ns != namespace and spec_name in ns.catalog.get_registered_types(): | |
| # This type is originally from a different namespace | |
| type_namespace = ns_name | |
| break | |
| type_to_namespace_map[spec.neurodata_type_def] = type_namespace |
A get_namespace_for_type method will be added to the namespace catalog in https://github.com/hdmf-dev/hdmf/pull/1312/files#diff-0458c07608cd941f7b8f1cfa52c52faa016b6c2a17e913e820a2a5108609776dR336 which should behave similarly to this section. We should check if the code can be replaced to use this new method in HDMF instead.
Metadata
Metadata
Assignees
Labels
topic: python utilsIssue related to the python utilitiesIssue related to the python utilities