NeurodataWithoutBorders / nwbinspector

Tool to help inspect NWB files for compliance with NWB Best Practices
https://nwbinspector.readthedocs.io/
Other
17 stars 10 forks source link

[Bug]: check_column_binary_capability ignores limitations set by schema #347

Closed janhohenheim closed 1 year ago

janhohenheim commented 1 year ago

What happened?

I used add_unit with units that are only recorded by a single electrode each. I have only two electrodes, so my code looks something like this:

nwb.add_unit(
            ...
            electrodes=[0],
            ...
)
nwb.add_unit(
            ...
            electrodes=[1],
            ...
)

This however triggers check_column_binary_capability, telling me "Consider making it boolean instead and renaming the column to start with 'is_'; doing so will save 28.00B.". I cannot do this however, since I want to actually fill electrodes like this.

Steps to Reproduce

No response

Traceback

No response

Operating System

Linux

Python Executable

Python

Python Version

3.10

Usage

Library (Python code)

Were you streaming with ROS3?

I'm not sure what that is

Package Versions

aiohttp==3.8.4 aiosignal==1.3.1 anyio==3.6.2 appdirs==1.4.4 argon2-cffi==21.3.0 argon2-cffi-bindings==21.2.0 arrow==1.2.3 asciitree==0.3.3 asttokens==2.2.1 async-timeout==4.0.2 attrs==22.2.0 backcall==0.2.0 beautifulsoup4==4.11.2 bidsschematools==0.6.0 black==23.1.0 bleach==6.0.0 blessings==1.7 bqplot==0.12.36 certifi==2022.12.7 cffi==1.15.1 charset-normalizer==3.0.1 ci-info==0.3.0 click==8.1.3 click-didyoumean==0.3.0 comm==0.1.2 contourpy==1.0.7 cryptography==39.0.1 cycler==0.11.0 dandi==0.48.1 dandischema==0.7.1 debugpy==1.6.6 decorator==5.1.1 defusedxml==0.7.1 dill==0.3.6 dnspython==2.3.0 email-validator==1.3.1 entrypoints==0.4 etelemetry==0.3.0 executing==1.2.0 fasteners==0.18 fastjsonschema==2.16.3 fonttools==4.38.0 fqdn==1.5.1 frozenlist==1.3.3 fscacher==0.2.0 fsspec==2023.3.0 gast==0.4.0 h5py==3.8.0 hdmf==3.5.1 humanize==4.6.0 idna==3.4 imageio==2.26.1 importlib-metadata==4.13.0 interleave==0.2.1 ipydatagrid==1.1.15 ipydatawidgets==4.3.2 ipykernel==6.21.2 ipympl==0.9.3 ipython==8.11.0 ipython-genutils==0.2.0 ipyvolume==0.6.1 ipyvue==1.9.0 ipyvuetify==1.8.5 ipywebrtc==0.6.0 ipywidgets==8.0.4 isodate==0.6.1 isoduration==20.11.0 jaraco.classes==3.2.3 jedi==0.18.2 jeepney==0.8.0 Jinja2==3.1.2 joblib==1.2.0 jsonpointer==2.3 jsonschema==4.17.3 jupyter==1.0.0 jupyter-console==6.6.2 jupyter-events==0.6.3 jupyter_client==8.0.3 jupyter_core==5.2.0 jupyter_server==2.3.0 jupyter_server_terminals==0.4.4 jupyterlab-pygments==0.2.2 jupyterlab-widgets==3.0.5 keyring==23.13.1 keyrings.alt==4.2.0 kiwisolver==1.4.4 lazy-ops==0.2.0 lazy_loader==0.2 MarkupSafe==2.1.2 matplotlib==3.7.0 matplotlib-inline==0.1.6 mistune==2.0.5 more-itertools==9.0.0 multidict==6.0.4 mypy-extensions==1.0.0 natsort==8.2.0 nbclassic==0.5.2 nbclient==0.7.2 nbconvert==7.2.9 nbformat==5.7.3 ndx-grayscalevolume==0.0.2 ndx-icephys-meta==0.1.0 ndx-spectrum==0.2.2 nest-asyncio==1.5.6 networkx==3.0 neuroconv==0.2.4 nixio==1.5.3 notebook==6.5.2 notebook_shim==0.2.2 numcodecs==0.11.0 numpy==1.23.5 nwbinspector==0.4.26 nwbwidgets==0.10.2 packaging==23.0 pandas==1.5.3 pandocfilters==1.5.0 parso==0.8.3 pathspec==0.11.0 pexpect==4.8.0 pickleshare==0.7.5 Pillow==9.4.0 platformdirs==3.0.0 plotly==5.13.1 prometheus-client==0.16.0 prompt-toolkit==3.0.38 psutil==5.9.4 ptyprocess==0.7.0 pure-eval==0.2.2 py2vega==0.6.1 pycparser==2.21 pycryptodomex==3.17 pydantic==1.10.4 Pygments==2.14.0 pynwb==2.2.0 pyout==0.7.2 pyparsing==3.0.9 pyrsistent==0.19.3 python-dateutil==2.8.2 python-json-logger==2.0.7 pythreejs==2.4.2 pytz==2022.7.1 PyWavelets==1.4.1 PyYAML==6.0 pyzmq==25.0.0 qtconsole==5.4.0 QtPy==2.3.0 regex==2022.10.31 requests==2.28.2 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rfc3987==1.3.8 roiextractors==0.5.1 ruamel.yaml==0.17.21 scikit-image==0.20.0 scipy==1.9.3 SecretStorage==3.3.3 semantic-version==2.10.0 Send2Trash==1.8.0 six==1.16.0 sniffio==1.3.0 soupsieve==2.4 stack-data==0.6.2 tenacity==8.2.1 terminado==0.17.1 tifffile==2023.3.21 tinycss2==1.2.1 tokenize-rt==5.0.0 tornado==6.2 tqdm==4.64.1 traitlets==5.9.0 traittypes==0.2.1 trimesh==3.21.0 typing_extensions==4.4.0 uri-template==1.2.0 urllib3==1.26.14 wcwidth==0.2.6 webcolors==1.12 webencodings==0.5.1 websocket-client==1.5.1 widgetsnbextension==4.0.5 yarl==1.8.2 zarr==2.13.6 zipp==3.13.0

Code of Conduct

CodyCBakerPhD commented 1 year ago

@janhohenheim Thanks fort the report!

I've started a fix for this on #349, should be out and released soon.

Let us know if you spot anything else while using the NWB Inspector 😃

janhohenheim commented 1 year ago

Thanks for the quick fix! When do you expect to release a new version containing it?

CodyCBakerPhD commented 1 year ago

v0.4.27 was released this morning, and contains the latest fix 🙂