dandi_compute_code.dandiset#
- class dandi_compute_code.dandiset.AssetMetadata(path, date_modified, content_size, content_id)[source]#
Bases:
objectMinimal indexed metadata for one asset path.
- class dandi_compute_code.dandiset.AssetsJsonldMetadata(content_id_to_asset, path_to_asset_metadata)[source]#
Bases:
objectIndexed metadata loaded from DANDI
assets.jsonld.- Parameters:
- path_to_asset_metadata: dict[str, AssetMetadata]#
- dandi_compute_code.dandiset.delete_dandiset_version(dandiset_directory, version)[source]#
Delete all
version-{version}directories from the DANDI archive and the local filesystem.Scans
{dandiset_directory}/derivatives/dandiset-*/for directories namedversion-{version}at any depth, runsdandi deleteon each one (answering the interactive confirmation prompt automatically), and then removes the local directory tree.- Parameters:
- Returns:
A list of version directories that were deleted, in sorted order.
- Return type:
- Raises:
RuntimeError – If the
DANDI_API_KEYenvironment variable is not set or is blank.
- dandi_compute_code.dandiset.load_assets_jsonld_metadata()[source]#
Load content-id and path metadata from the DANDI 001697 draft
assets.jsonldstream.- Returns:
Indexed assets metadata.
- Return type:
- dandi_compute_code.dandiset.scan_version_directories(dandiset_directory, version)[source]#
Find all
version-{version}*directories under dandiset_directory.Scans
{dandiset_directory}/derivatives/dandiset-*/and returns every directory whose name equalsversion-{version}or starts withversion-{version}+(to capture hash-suffixed variants such asversion-v1.0.0+fixes+20abeb6). Directories not inside adandiset-*subtree are ignored.- Parameters:
- Returns:
Sorted list of matching version directory paths.
- Return type: