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

fixed module search flag in nwbinspector #446

Merged
merged 4 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Upcoming

# v0.4.34

### Fixes

* Fixed --modules flag in nwbinspector to allow for import of additional modules in the command line. This was necessary to be able to register new customized checks to the nwbinspector
CodyCBakerPhD marked this conversation as resolved.
Show resolved Hide resolved

# v0.4.33

### Fixes
Expand Down
1 change: 1 addition & 0 deletions src/nwbinspector/nwbinspector.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ def inspect_all_cli(
DANDI archive (i.e., https://dandiarchive.org/dandiset/{dandiset_id}/{version_id}), or a six-digit Dandiset ID.
"""
levels = ["importance", "file_path"] if levels is None else levels.split(",")
modules = [] if modules is None else modules.split(",")
reverse = [False] * len(levels) if reverse is None else [strtobool(x) for x in reverse.split(",")]
progress_bar = strtobool(progress_bar) if progress_bar is not None else True
if config is not None:
Expand Down
3 changes: 2 additions & 1 deletion tests/test_inspector.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,8 @@ def test_command_line_runs_cli_only(self):
console_output_file = self.tempdir / "test_console_output.txt"
os.system(
f"nwbinspector {str(self.tempdir)} --overwrite --select check_timestamps_match_first_dimension,"
"check_data_orientation,check_regular_timestamps,check_small_dataset_compression"
"check_data_orientation,check_regular_timestamps,check_small_dataset_compression "
"--modules random,math,datetime"
f"> {console_output_file}"
)
self.assertLogFileContentsEqual(
Expand Down