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

[Bug]: datetimes in pynwb.validate on NWB Zarr #220

Open
3 tasks done
CodyCBakerPhD opened this issue Sep 25, 2024 · 1 comment
Open
3 tasks done

[Bug]: datetimes in pynwb.validate on NWB Zarr #220

CodyCBakerPhD opened this issue Sep 25, 2024 · 1 comment
Assignees
Labels
category: bug errors in the code or code behavior priority: low alternative solution already working and/or relevant to only specific user(s)
Milestone

Comments

@CodyCBakerPhD
Copy link
Contributor

CodyCBakerPhD commented Sep 25, 2024

What happened?

Ran across this while debugging Zarr support for NWB Inspector NeurodataWithoutBorders/nwbinspector#513

I can bypass it there since it's a flag whether or not to trigger validation checks, but this should be fixed in the validation (either PyNWB or HDMF Zarr) soonish so that dandi validate (which does enforce it) can work on Zarr files

Steps to Reproduce

import datetime
import uuid

import hdmf_zarr
import pynwb

nwbfile = pynwb.NWBFile(
    session_description="",
    identifier=str(uuid.uuid4()),
    session_start_time=datetime.datetime.now().astimezone()
)

nwbfile_path = "..somewhere/test_validation.nwb.zarr"
with hdmf_zarr.NWBZarrIO(path=nwbfile_path, mode="w") as io:
    io.write(nwbfile)

with hdmf_zarr.NWBZarrIO(path=nwbfile_path, mode="r") as io:
    invalidations = pynwb.validate(io=io)

print(invalidations)

Traceback

[root/file_create_date (file_create_date): incorrect type - expected 'isodatetime', got '['int', 'int', 'int', 'int', 'int']']

Operating System

Windows

Python Executable

Conda

Python Version

3.12

Package Versions

No response

Code of Conduct

@mavaylon1
Copy link
Contributor

Thanks for raising this issue. We will take a look after SFN.

@mavaylon1 mavaylon1 self-assigned this Oct 17, 2024
@mavaylon1 mavaylon1 added category: bug errors in the code or code behavior priority: low alternative solution already working and/or relevant to only specific user(s) labels Oct 17, 2024
@mavaylon1 mavaylon1 added this to the Next Major Release: 1.0.0 milestone Oct 17, 2024
@rly rly modified the milestones: Next Major Release: 1.0.0, 1.0.0 Nov 27, 2024
@rly rly modified the milestones: 1.0.0, 0.11.0 Dec 19, 2024
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 priority: low alternative solution already working and/or relevant to only specific user(s)
Projects
None yet
Development

No branches or pull requests

3 participants