-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmetadata_model.py
59 lines (38 loc) · 1.37 KB
/
metadata_model.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
"""Module for the top-level wind energy software metadata model.
"""
import datetime
from typing import Literal
import pydantic as pdt
class Author(pdt.BaseModel):
"""Details of an author, also known as creator."""
name: str
orcid: str
affiliation: str
class Distribution(pdt.BaseModel):
"""Details of a software distribution."""
distribution_platform: str
url: str
class WindEnergySoftwareMetadataDocument(pdt.BaseModel):
"""Metadata document for a piece of wind energy software."""
id: str
name: str
description: str
latest_release_version: str
latest_release_date: datetime.date
license: str
source_access_right: Literal["open", "closed"]
authors: list[Author]
programming_languages: list[str]
supported_platforms: list[str]
resource_type: Literal["software"] = "software"
resource_subtype: Literal["model", "analysis", "optimisation"]
repository_url: str
documentation_url: str
distributions: list[Distribution]
function: str # The purpose for the software to exist
time_domain: Literal["steady", "dynamic"]
representation_level: Literal["wind_farm", "turbine"]
turbine_representation: Literal["actuator", "bem", "vortex_method", "geometry_resolved"] | None
location: Literal["onshore", "offshore"] | None
input_description: str
output_description: str