Skip to content

Commit 4137abe

Browse files
committed
small fix to url parsing
1 parent 5b4df80 commit 4137abe

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

nwbinspector/nwbinspector.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,10 +239,9 @@ def inspect_all_cli(
239239
url_path = path if path.startswith("https://") else None
240240
if url_path:
241241
dandiset_id, version_id = url_path.split("/")[-2:]
242-
else:
243-
dandiset_id = path # version_id will get set automatically to most recent version if unspecified
242+
path = dandiset_id
244243
assert url_path or re.fullmatch(
245-
pattern="^[0-9]{6}$", string=dandiset_id
244+
pattern="^[0-9]{6}$", string=path
246245
), "'--stream' flag was enabled, but 'path' is neither a full link to the DANDI archive nor a DANDISet ID."
247246
if Path(path).is_dir():
248247
warn(

tests/test_inspector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ def test_dandiset_streaming_cli(self):
524524
)
525525
self.assertFileExists(path=self.tempdir / "test_nwbinspector_streaming_report_6.txt")
526526

527-
def test_dandiset_streaming_cli_parllel(self):
527+
def test_dandiset_streaming_cli_parallel(self):
528528
console_output_file = self.tempdir / "test_console_streaming_output_2.txt"
529529
os.system(
530530
f"nwbinspector https://dandiarchive.org/dandiset/000126/0.210813.0327 --stream --n-jobs 2 "

0 commit comments

Comments
 (0)