-
Notifications
You must be signed in to change notification settings - Fork 85
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
or just a question on difference with invocation of pynwb.validate #1321
Comments
You can also just tell the validation routine to not use the cached spec and the validation error can be reproduced:
|
The series_index validation issue was introduced in hdmf-dev/hdmf-common-schema@2851b46. Changing from a signed to unsigned integer is strictly speaking a breaking change. I would say that the files MIES creates are still valid as they use a cached schema. But of course I can be persuaded otherwise. |
Another odd thing is that the old type (int32) can hold all values of uint8 so even when validating against the stock pynwb schema this should not give a warning. AFAIR we allow bigger types instead of smaller ones. |
The validation error
is from dandi or? Can you explain what is wrong here? The HDF5 file type of
which is supported in all the other places where |
Sample file: HardwareTests-V2-MIES-187d9143.zip |
@yarikoptic I'm doing validation using pynwb with subprocess, see https://github.com/AllenInstitute/MIES/blob/bcb8f4ff185394729f99f5b31b3dfb9f18acbd59/tools/nwb-read-tests/nwbv2-read-test.py#L22. This at least avoids that pynwb loads the stock schema. The code might be brittle as I'm only using that in a docker container without real world users. |
@yarikoptic @rly How do we proceed here? Should the fix be in pynwb or in dandi? |
@t-b @yarikoptic To summarize, if I understand correctly, the file is valid against the schema that is cached, but the schema was updated and the file is not valid against the latest schema. In my opinion, DANDI should set a requirement for the minimum NWB version for validation, and it should validate against the cached schema if the version is >= the minimum requirement. It should not validate against the latest schema because older files are not guaranteed to be valid against the latest schema. After upload of a given dandiset, DANDI should verify that all files in the dandiset use the same schema version of NWB and then display that version on the dandiset page so that users know whether the files can be read by tools that have a min version requirement. Separately, PyNWB should include an option in the |
This looks like an issue with compatibility with h5py 3.0 where strings are read as bytes instead of str. Which version of h5py was installed? |
Yes this was a h5py issue indeed, going back to 2.10.0 solved it. |
@t-b asked and provided a sample file on dandi slack channel, which seems to validate "fine" if
$> python3 -m pynwb.validate 496035.05.02.nwb Validating 496035.05.02.nwb against cached namespace information using namespace ndx-mies. - no errors found.
but errors are returned if
and that is the ones we consider to be errors and report by `dandi validate`
the last one is "dandi specific" since we do require subject_id value.
so why is such a difference and either we should somehow become more lenient in dandi?
edit 1: FWIW the same with load_namespaces=True
The text was updated successfully, but these errors were encountered: