NekUpload.metadata.metadata module
- class NekUpload.metadata.metadata.InvenioMetadata(title: str, publication_date: str, creators: list[InvenioUserInfo], resource_type: ResourceType = ResourceType.DATASET)[source]
Bases:
objectMetadata model for handling metadata as prescribed in InvenioRDM. Uses a builder OOP style to allow clients to enhance the metadata description.
- add_description(description: str) None[source]
Add a description of the record to be uploaded
- Parameters:
description (str) – Description
- add_geometry_domain(min_coord: tuple[int, int, int], max_coord: tuple[int, int, int])[source]
Add domian of goemetyr
- Parameters:
min_coord (tuple[int,int,int]) – _description_
max_coord (tuple[int,int,int]) – _description_
- add_publisher(publisher: str = 'InvenioRDM') None[source]
Add publisher
- Parameters:
publisher (str, optional) – Add publisher name. Defaults to “InvenioRDM”.
Add related persistent identifiers
- Parameters:
relation (Relations) – A related identifier
- add_reynolds_number(reynolds: float) None[source]
Add reynolds number of flow
- Parameters:
reynolds (float) – _description_
- add_version(version: str) None[source]
Add the version number (of the software or dataset). Semantic versioning is recommended.
- Parameters:
version (str) – Version number
- classmethod from_json(data: dict[str, Any]) InvenioMetadata[source]
Reconstruct object from JSON serialisation
- Parameters:
data (dict[str,Any]) – Serialised JSON data
- Returns:
Reconstructed object
- Return type:
- get_metadata_payload() dict[str, Any][source]
Get the metadata payload formatted in way InvenioRDM expects
- Returns:
Metadata json payload
- Return type:
dict[str,Any]