Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions dandi/cli/tests/test_ls.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def load(s):


@mark.skipif_no_network
@pytest.mark.xfail(reason="https://github.com/dandi/dandi-cli/issues/1097")
def test_ls_bids_file(bids_examples):
bids_file_path = "asl003/sub-Sub1/anat/sub-Sub1_T1w.nii.gz"
bids_file_path = os.path.join(bids_examples, bids_file_path)
Expand Down
4 changes: 4 additions & 0 deletions dandi/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ class DandiInstance(NamedTuple):
VIDEO_FILE_EXTENSIONS = [".mp4", ".avi", ".wmv", ".mov", ".flv", ".mkv"]
VIDEO_FILE_MODULES = ["processing", "acquisition"]

ZARR_EXTENSIONS = [".ngff", ".zarr"]

#: Maximum allowed depth of a Zarr directory tree
MAX_ZARR_DEPTH = 7

Expand All @@ -166,3 +168,5 @@ class DandiInstance(NamedTuple):

#: Maximum number of Zarr directory entries to delete at once
ZARR_DELETE_BATCH_SIZE = 100

BIDS_DATASET_DESCRIPTION = "dataset_description.json"
5 changes: 2 additions & 3 deletions dandi/delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@

import click

from .consts import DRAFT, dandiset_metadata_file
from .consts import DRAFT, ZARR_EXTENSIONS, dandiset_metadata_file
from .dandiapi import DandiAPIClient, RemoteAsset, RemoteDandiset
from .dandiarchive import BaseAssetIDURL, DandisetURL, ParsedDandiURL, parse_dandi_url
from .exceptions import NotFoundError
from .files import ZarrAsset
from .utils import get_instance, is_url


Expand Down Expand Up @@ -231,7 +230,7 @@ def find_local_asset(filepath: str) -> Tuple[str, str]:
"Use 'dandi download' or 'organize' first"
)
relpath = path.relative_to(dandiset.path).as_posix()
if path.is_dir() and path.suffix not in ZarrAsset.EXTENSIONS:
if path.is_dir() and path.suffix not in ZARR_EXTENSIONS:
relpath += "/"
return (dandiset.identifier, relpath)

Expand Down
Loading