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

Add RemoteDandiset.has_data_standard() convenience function #958

Draft
wants to merge 16 commits into
base: master
Choose a base branch
from
11 changes: 11 additions & 0 deletions dandi/dandiapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -1071,6 +1071,17 @@ def iter_upload_raw_asset(
self, metadata=asset_metadata, jobs=jobs, replacing=replace_asset
)

def is_nwb(self):
bendichter marked this conversation as resolved.
Show resolved Hide resolved
assetsSummary = self.get_raw_metadata()["assetsSummary"]
if "dataStandard" not in assetsSummary:
return False
return any(
[
bendichter marked this conversation as resolved.
Show resolved Hide resolved
x["identifier"] == "RRID:SCR_015242"
for x in assetsSummary["dataStandard"]
]
)


class BaseRemoteAsset(ABC, APIBase):
"""
Expand Down