Closed luiztauffer closed 2 years ago
OK so - according to the annotation typing of inspect_nwb
and inspect_all
this is not technically a bug, but rather the expected input to the argument is one of the actual Importance
attributes
As such, your library usage code can be easily corrected via
from nwbinspector import inspect_nwb, Importance
inspection_generator = inspect_nwb(
nwbfile_path=file_path,
importance_threshold=Importance.BEST_PRACTICE_VIOLATION
)
inspection_messages = list(inspection_generator)
which is the intended and currently supported approach.
That said, I'll re-name & label this issue and corresponding PR to the goal of adding a new feature allowing string inputs for this argument, which you might notice is something required of the CLI level code.
It could be specific to Python 3.8, from what I gathered googling it.
Enum
indeed has very specific behavior differences going from 3.7 to 3.8, particularly when it comes to cross-type comparison errors.
What happened?
When passing
importance_threshold
as a string, it can't be checked against Importance members. It could be specific to Python 3.8, from what I gathered googling it.Steps to Reproduce
Traceback
Operating System
Linux
Python Executable
Python
Python Version
3.8
Package Versions
No response
Code of Conduct