Changeset View
Changeset View
Standalone View
Standalone View
swh/loader/package/deposit/loader.py
Show First 20 Lines • Show All 65 Lines • ▼ Show 20 Lines | ) -> "DepositPackageInfo": | ||||
# `date` and `committer_date` are always transmitted by the deposit read api | # `date` and `committer_date` are always transmitted by the deposit read api | ||||
# which computes itself the values. The loader needs to use those to create the | # which computes itself the values. The loader needs to use those to create the | ||||
# revision. | # revision. | ||||
all_metadata_raw: List[str] = metadata["metadata_raw"] | all_metadata_raw: List[str] = metadata["metadata_raw"] | ||||
raw_info = { | raw_info = { | ||||
"origin": metadata["origin"], | "origin": metadata["origin"], | ||||
"origin_metadata": { | "origin_metadata": { | ||||
"metadata": json.dumps(metadata["metadata_dict"]), | "metadata": metadata["metadata_dict"], | ||||
"provider": metadata["provider"], | "provider": metadata["provider"], | ||||
"tool": metadata["tool"], | "tool": metadata["tool"], | ||||
}, | }, | ||||
} | } | ||||
depo = metadata["deposit"] | depo = metadata["deposit"] | ||||
return cls( | return cls( | ||||
url=url, | url=url, | ||||
filename=filename, | filename=filename, | ||||
▲ Show 20 Lines • Show All 269 Lines • Show Last 20 Lines |