dandi / dandi-cli

DANDI command line client to facilitate common operations
https://dandi.readthedocs.io/
Apache License 2.0
22 stars 27 forks source link

dev-deps started to fail in organize: "The number of frame indices in 'starting_frame' ..." #1442

Closed yarikoptic closed 6 months ago

yarikoptic commented 6 months ago

started around May 8th

DEBUG    dandi:base.py:134 Caught exception (root/acquisition/MouseWhiskers1 GroupBuilder {'attributes': {'comments': 'no comments', 'description': 'no description', 'namespace': 'core', 'neurodata_type': 'ImageSeries', 'object_id': 'c231e662-40a4-4db6-be86-c81dbf112c91'}, 'groups': {}, 'datasets': {'data': root/acquisition/MouseWhiskers1/data DatasetBuilder {'attributes': {'conversion': 1.0, 'offset': 0.0, 'resolution': -1.0, 'unit': 'unknown'}, 'data': <Closed HDF5 dataset>}, 'external_file': root/acquisition/MouseWhiskers1/external_file DatasetBuilder {'attributes': {'starting_frame': array([0, 2])}, 'data': <StrDataset for Closed HDF5 dataset>}, 'format': root/acquisition/MouseWhiskers1/format DatasetBuilder {'attributes': {}, 'data': 'external'}, 'starting_time': root/acquisition/MouseWhiskers1/starting_time DatasetBuilder {'attributes': {'rate': 150.0, 'unit': 'seconds'}, 'data': 0.0}}, 'links': {}}, "Could not construct ImageSeries object due to: ImageSeries 'MouseWhiskers1': The number of frame indices in 'starting_frame' should have the same length as 'external_file'.")
______________________ test_video_organize_common[copy-0] ______________________
dandi/tests/test_organize.py:361: in test_video_organize_common
    assert r.exit_code == rc
E   assert 1 == 0
E    +  where 1 = <Result SystemExit(1)>.exit_code

which is a bit odd since in https://github.com/dandi/dandi-cli/blob/HEAD/dandi/tests/fixtures.py#L736 which is I believe what generates the test case we have

        image_series = ImageSeries(
            name=f"MouseWhiskers{i}",
            format="external",
            external_file=[str(vid_1), str(vid_2)],
            starting_frame=[0, 2],
            starting_time=0.0,
            rate=150.0,
        )

so it does correspond... any recent changes to hdmf/pynwb which we might want to implicate/check here @rly @bendichter ?

rly commented 6 months ago

There was a recent change in the dev branch of HDMF that had an unexpected side effect on validation. That change was reverted this morning. It is being documented here. Could you please re-run the test and see if it still appears?

yarikoptic commented 6 months ago

https://github.com/dandi/dandi-cli/pull/1443 is indeed all green today so must have indeed been addressed. Thank you @rly !