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

Account for all loaded namespaces during validation #608

Open
5 tasks done
rly opened this issue May 13, 2021 · 0 comments
Open
5 tasks done

Account for all loaded namespaces during validation #608

rly opened this issue May 13, 2021 · 0 comments
Labels
category: bug errors in the code or code behavior topic: validator issues related to validation of files

Comments

@rly
Copy link
Contributor

rly commented May 13, 2021

Description

Validation on cached schema currently validates against only the most specific namespaces. For example, if one were to draw a dependency tree:

hdmf-common
   |       \
 core    hdmf-experimental
   |  \
ndx-a  ndx-b

Then validation would occur on the leaves of the tree: ndx-a, ndx-b, and hdmf-experimental. Data types are found in one namespace and not another (e.g., NWBFile is not in hdmf-experimental. NewTypeA that is defined in ndx-a is not in ndx-b.) and this causes validation to fail.

There are also other cross-namespace linking and inheritance considerations to account for. For example, if ndx-a defines a type with a dataset name: column; neurodata_type_inc: VectorData and ndx-b defines a type neurodata_type_def: MyVectorData; neurodata_type_inc: VectorData, then MyVectorData should be allowed for the 'column' dataset in ndx-a.

See also #525 and #542 (comment)

Environment

Python Executable: Conda 
Python Version: Python 3.8
Operating System: Windows
HDMF Version: dev

Checklist

  • Have you ensured the bug was not already reported ?
  • Have you included a brief and descriptive title?
  • Have you included a clear description of the problem you are trying to solve?
  • Have you included a minimal code snippet that reproduces the issue you are encountering?
  • Have you checked our Contributing document?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: bug errors in the code or code behavior topic: validator issues related to validation of files
Projects
None yet
Development

No branches or pull requests

1 participant