Skip to content

Commit

Permalink
Delete functions obsoleted by PR #853
Browse files Browse the repository at this point in the history
  • Loading branch information
jwodder committed Jan 25, 2022
1 parent 1585b4d commit ebcc30c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
22 changes: 0 additions & 22 deletions dandi/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -788,28 +788,6 @@ def process_ndtypes(asset, nd_types):
return asset


def get_asset_metadata(
filepath, relpath, digest: Optional[Digest] = None, allow_any_path=True
) -> models.BareAsset:
metadata = None
if op.splitext(filepath)[1] == ".nwb":
try:
metadata = nwb2asset(filepath, digest=digest)
except Exception as e:
lgr.warning(
"Failed to extract NWB metadata from %s: %s: %s",
filepath,
type(e).__name__,
str(e),
)
if not allow_any_path:
raise
if metadata is None:
metadata = get_default_metadata(filepath, digest=digest)
metadata.path = str(relpath)
return metadata


def nwb2asset(
nwb_path, digest: Optional[Digest] = None, schema_version=None
) -> models.BareAsset:
Expand Down
6 changes: 0 additions & 6 deletions dandi/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,12 +357,6 @@ def move_file(src, dst):
return shutil.move(src, dst)


def find_dandi_files(paths):
"""Adapter to find_files to find files of interest to dandi project"""
sep = re.escape(os.sep)
yield from find_files(rf"((^|{sep})dandiset\.yaml|\.nwb)\Z", paths)


def find_parent_directory_containing(filename, path=None):
"""Find a directory, on the path to 'path' containing filename
Expand Down

0 comments on commit ebcc30c

Please sign in to comment.