esgvoc 0.2.1__py3-none-any.whl → 0.4.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of esgvoc might be problematic. Click here for more details.
- esgvoc/__init__.py +3 -1
- esgvoc/api/__init__.py +96 -72
- esgvoc/api/data_descriptors/__init__.py +18 -12
- esgvoc/api/data_descriptors/activity.py +8 -45
- esgvoc/api/data_descriptors/area_label.py +6 -0
- esgvoc/api/data_descriptors/branded_suffix.py +5 -0
- esgvoc/api/data_descriptors/branded_variable.py +5 -0
- esgvoc/api/data_descriptors/consortium.py +16 -56
- esgvoc/api/data_descriptors/data_descriptor.py +106 -0
- esgvoc/api/data_descriptors/date.py +3 -46
- esgvoc/api/data_descriptors/directory_date.py +3 -46
- esgvoc/api/data_descriptors/experiment.py +19 -54
- esgvoc/api/data_descriptors/forcing_index.py +3 -45
- esgvoc/api/data_descriptors/frequency.py +6 -43
- esgvoc/api/data_descriptors/grid_label.py +6 -44
- esgvoc/api/data_descriptors/horizontal_label.py +6 -0
- esgvoc/api/data_descriptors/initialisation_index.py +3 -44
- esgvoc/api/data_descriptors/institution.py +11 -54
- esgvoc/api/data_descriptors/license.py +4 -44
- esgvoc/api/data_descriptors/mip_era.py +6 -44
- esgvoc/api/data_descriptors/model_component.py +7 -45
- esgvoc/api/data_descriptors/organisation.py +3 -40
- esgvoc/api/data_descriptors/physic_index.py +3 -45
- esgvoc/api/data_descriptors/product.py +4 -43
- esgvoc/api/data_descriptors/realisation_index.py +3 -44
- esgvoc/api/data_descriptors/realm.py +4 -42
- esgvoc/api/data_descriptors/resolution.py +6 -44
- esgvoc/api/data_descriptors/source.py +18 -53
- esgvoc/api/data_descriptors/source_type.py +3 -41
- esgvoc/api/data_descriptors/sub_experiment.py +3 -41
- esgvoc/api/data_descriptors/table.py +6 -48
- esgvoc/api/data_descriptors/temporal_label.py +6 -0
- esgvoc/api/data_descriptors/time_range.py +3 -27
- esgvoc/api/data_descriptors/variable.py +13 -71
- esgvoc/api/data_descriptors/variant_label.py +3 -47
- esgvoc/api/data_descriptors/vertical_label.py +5 -0
- esgvoc/api/project_specs.py +3 -2
- esgvoc/api/projects.py +727 -446
- esgvoc/api/py.typed +0 -0
- esgvoc/api/report.py +29 -16
- esgvoc/api/search.py +140 -95
- esgvoc/api/universe.py +362 -156
- esgvoc/apps/__init__.py +3 -4
- esgvoc/apps/drs/constants.py +1 -1
- esgvoc/apps/drs/generator.py +185 -198
- esgvoc/apps/drs/report.py +272 -136
- esgvoc/apps/drs/validator.py +132 -145
- esgvoc/apps/py.typed +0 -0
- esgvoc/cli/drs.py +32 -21
- esgvoc/cli/get.py +35 -31
- esgvoc/cli/install.py +11 -8
- esgvoc/cli/main.py +0 -2
- esgvoc/cli/status.py +5 -5
- esgvoc/cli/valid.py +40 -40
- esgvoc/core/constants.py +1 -1
- esgvoc/core/db/__init__.py +2 -4
- esgvoc/core/db/connection.py +5 -3
- esgvoc/core/db/models/project.py +50 -8
- esgvoc/core/db/models/universe.py +51 -12
- esgvoc/core/db/project_ingestion.py +60 -46
- esgvoc/core/db/universe_ingestion.py +58 -29
- esgvoc/core/exceptions.py +33 -0
- esgvoc/core/logging_handler.py +1 -1
- esgvoc/core/repo_fetcher.py +4 -3
- esgvoc/core/service/__init__.py +37 -5
- esgvoc/core/service/configuration/config_manager.py +188 -0
- esgvoc/core/service/configuration/setting.py +88 -0
- esgvoc/core/service/state.py +49 -32
- {esgvoc-0.2.1.dist-info → esgvoc-0.4.0.dist-info}/METADATA +34 -3
- esgvoc-0.4.0.dist-info/RECORD +80 -0
- esgvoc/api/_utils.py +0 -39
- esgvoc/cli/config.py +0 -82
- esgvoc/core/service/settings.py +0 -73
- esgvoc/core/service/settings.toml +0 -17
- esgvoc/core/service/settings_default.toml +0 -17
- esgvoc-0.2.1.dist-info/RECORD +0 -73
- {esgvoc-0.2.1.dist-info → esgvoc-0.4.0.dist-info}/WHEEL +0 -0
- {esgvoc-0.2.1.dist-info → esgvoc-0.4.0.dist-info}/entry_points.txt +0 -0
- {esgvoc-0.2.1.dist-info → esgvoc-0.4.0.dist-info}/licenses/LICENSE.txt +0 -0
|
@@ -1,60 +1,25 @@
|
|
|
1
|
+
from pydantic import Field
|
|
2
|
+
from esgvoc.api.data_descriptors.data_descriptor import PlainTermDataDescriptor
|
|
1
3
|
|
|
2
|
-
from __future__ import annotations
|
|
3
|
-
from typing import (
|
|
4
|
-
List,
|
|
5
|
-
Optional
|
|
6
|
-
)
|
|
7
|
-
from pydantic.version import VERSION as PYDANTIC_VERSION
|
|
8
|
-
if int(PYDANTIC_VERSION[0])>=2:
|
|
9
|
-
from pydantic import (
|
|
10
|
-
BaseModel,
|
|
11
|
-
ConfigDict,
|
|
12
|
-
Field
|
|
13
|
-
)
|
|
14
|
-
else:
|
|
15
|
-
from pydantic import (
|
|
16
|
-
BaseModel,
|
|
17
|
-
Field
|
|
18
|
-
)
|
|
19
4
|
|
|
20
|
-
|
|
21
|
-
version = "None"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
class ConfiguredBaseModel(BaseModel):
|
|
25
|
-
model_config = ConfigDict(
|
|
26
|
-
validate_assignment = True,
|
|
27
|
-
validate_default = True,
|
|
28
|
-
extra = "allow",
|
|
29
|
-
arbitrary_types_allowed = True,
|
|
30
|
-
use_enum_values = True,
|
|
31
|
-
strict = False,
|
|
32
|
-
)
|
|
33
|
-
pass
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
class Experiment(ConfiguredBaseModel):
|
|
5
|
+
class Experiment(PlainTermDataDescriptor):
|
|
37
6
|
"""
|
|
38
|
-
|
|
7
|
+
An 'experiment' refers to a specific, controlled simulation conducted using climate models to \
|
|
8
|
+
investigate particular aspects of the Earth's climate system. These experiments are designed \
|
|
9
|
+
with set parameters, such as initial conditions, external forcings (like greenhouse gas \
|
|
10
|
+
concentrations or solar radiation), and duration, to explore and understand climate behavior \
|
|
11
|
+
under various scenarios and conditions.
|
|
39
12
|
"""
|
|
40
|
-
|
|
41
|
-
id: str
|
|
42
|
-
validation_method: str = Field(default ="list")
|
|
43
|
-
activity: List[str] = Field(default_factory=list)
|
|
13
|
+
activity: list[str] = Field(default_factory=list)
|
|
44
14
|
description: str
|
|
45
|
-
tier:
|
|
15
|
+
tier: int|None
|
|
46
16
|
experiment_id: str
|
|
47
|
-
sub_experiment_id:
|
|
48
|
-
experiment: str
|
|
49
|
-
required_model_components:
|
|
50
|
-
|
|
51
|
-
start_year:
|
|
52
|
-
end_year:
|
|
53
|
-
min_number_yrs_per_sim:
|
|
54
|
-
parent_activity_id:
|
|
55
|
-
parent_experiment_id:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
# Model rebuild
|
|
59
|
-
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
|
|
60
|
-
Experiment.model_rebuild()
|
|
17
|
+
sub_experiment_id: list[str]|None
|
|
18
|
+
experiment: str
|
|
19
|
+
required_model_components: list[str]|None
|
|
20
|
+
additional_allowed_model_components: list[str] = Field(default_factory=list)
|
|
21
|
+
start_year: int|None
|
|
22
|
+
end_year: int|None
|
|
23
|
+
min_number_yrs_per_sim: int|None
|
|
24
|
+
parent_activity_id: list[str]|None
|
|
25
|
+
parent_experiment_id: list[str]|None
|
|
@@ -1,47 +1,5 @@
|
|
|
1
|
+
from esgvoc.api.data_descriptors.data_descriptor import PatternTermDataDescriptor
|
|
1
2
|
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
from __future__ import annotations
|
|
8
|
-
from pydantic.version import VERSION as PYDANTIC_VERSION
|
|
9
|
-
if int(PYDANTIC_VERSION[0])>=2:
|
|
10
|
-
from pydantic import (
|
|
11
|
-
BaseModel,
|
|
12
|
-
ConfigDict
|
|
13
|
-
)
|
|
14
|
-
else:
|
|
15
|
-
from pydantic import (
|
|
16
|
-
BaseModel
|
|
17
|
-
)
|
|
18
|
-
|
|
19
|
-
metamodel_version = "None"
|
|
20
|
-
version = "None"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
class ConfiguredBaseModel(BaseModel):
|
|
24
|
-
model_config = ConfigDict(
|
|
25
|
-
validate_assignment = True,
|
|
26
|
-
validate_default = True,
|
|
27
|
-
extra = "allow",
|
|
28
|
-
arbitrary_types_allowed = True,
|
|
29
|
-
use_enum_values = True,
|
|
30
|
-
strict = False,
|
|
31
|
-
)
|
|
32
|
-
pass
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
class ForcingIndex(ConfiguredBaseModel):
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
id: str
|
|
43
|
-
type : str
|
|
44
|
-
regex : str
|
|
45
|
-
# Model rebuild
|
|
46
|
-
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
|
|
47
|
-
ForcingIndex.model_rebuild()
|
|
4
|
+
class ForcingIndex(PatternTermDataDescriptor):
|
|
5
|
+
pass
|
|
@@ -1,45 +1,8 @@
|
|
|
1
|
+
from esgvoc.api.data_descriptors.data_descriptor import PlainTermDataDescriptor
|
|
1
2
|
|
|
2
|
-
from __future__ import annotations
|
|
3
|
-
from pydantic.version import VERSION as PYDANTIC_VERSION
|
|
4
|
-
if int(PYDANTIC_VERSION[0])>=2:
|
|
5
|
-
from pydantic import (
|
|
6
|
-
BaseModel,
|
|
7
|
-
ConfigDict
|
|
8
|
-
)
|
|
9
|
-
else:
|
|
10
|
-
from pydantic import (
|
|
11
|
-
BaseModel
|
|
12
|
-
)
|
|
13
3
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
model_config = ConfigDict(
|
|
20
|
-
validate_assignment = True,
|
|
21
|
-
validate_default = True,
|
|
22
|
-
extra = "allow",
|
|
23
|
-
arbitrary_types_allowed = True,
|
|
24
|
-
use_enum_values = True,
|
|
25
|
-
strict = False,
|
|
26
|
-
)
|
|
27
|
-
pass
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
class Frequency(ConfiguredBaseModel):
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
id: str
|
|
38
|
-
description :str
|
|
39
|
-
long_name :str
|
|
40
|
-
name : str
|
|
41
|
-
unit : str
|
|
42
|
-
type : str
|
|
43
|
-
# Model rebuild
|
|
44
|
-
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
|
|
45
|
-
Frequency.model_rebuild()
|
|
4
|
+
class Frequency(PlainTermDataDescriptor):
|
|
5
|
+
description: str
|
|
6
|
+
long_name: str
|
|
7
|
+
name: str
|
|
8
|
+
unit: str
|
|
@@ -1,46 +1,8 @@
|
|
|
1
|
+
from esgvoc.api.data_descriptors.data_descriptor import PlainTermDataDescriptor
|
|
1
2
|
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
ConfigDict
|
|
9
|
-
)
|
|
10
|
-
else:
|
|
11
|
-
from pydantic import (
|
|
12
|
-
BaseModel
|
|
13
|
-
)
|
|
14
|
-
|
|
15
|
-
metamodel_version = "None"
|
|
16
|
-
version = "None"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
class ConfiguredBaseModel(BaseModel):
|
|
20
|
-
model_config = ConfigDict(
|
|
21
|
-
validate_assignment = True,
|
|
22
|
-
validate_default = True,
|
|
23
|
-
extra = "allow",
|
|
24
|
-
arbitrary_types_allowed = True,
|
|
25
|
-
use_enum_values = True,
|
|
26
|
-
strict = False,
|
|
27
|
-
)
|
|
28
|
-
pass
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
class GridLabel(ConfiguredBaseModel):
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
id: str
|
|
39
|
-
description :str
|
|
40
|
-
short_name :str
|
|
41
|
-
name : str
|
|
42
|
-
region : str
|
|
43
|
-
type : str
|
|
44
|
-
# Model rebuild
|
|
45
|
-
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
|
|
46
|
-
GridLabel.model_rebuild()
|
|
4
|
+
class GridLabel(PlainTermDataDescriptor):
|
|
5
|
+
description: str
|
|
6
|
+
short_name: str
|
|
7
|
+
name: str
|
|
8
|
+
region: str
|
|
@@ -1,46 +1,5 @@
|
|
|
1
|
+
from esgvoc.api.data_descriptors.data_descriptor import PatternTermDataDescriptor
|
|
1
2
|
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
from __future__ import annotations
|
|
7
|
-
from pydantic.version import VERSION as PYDANTIC_VERSION
|
|
8
|
-
if int(PYDANTIC_VERSION[0])>=2:
|
|
9
|
-
from pydantic import (
|
|
10
|
-
BaseModel,
|
|
11
|
-
ConfigDict
|
|
12
|
-
)
|
|
13
|
-
else:
|
|
14
|
-
from pydantic import (
|
|
15
|
-
BaseModel
|
|
16
|
-
)
|
|
17
|
-
|
|
18
|
-
metamodel_version = "None"
|
|
19
|
-
version = "None"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
class ConfiguredBaseModel(BaseModel):
|
|
23
|
-
model_config = ConfigDict(
|
|
24
|
-
validate_assignment = True,
|
|
25
|
-
validate_default = True,
|
|
26
|
-
extra = "allow",
|
|
27
|
-
arbitrary_types_allowed = True,
|
|
28
|
-
use_enum_values = True,
|
|
29
|
-
strict = False,
|
|
30
|
-
)
|
|
31
|
-
pass
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
class InitialisationIndex(ConfiguredBaseModel):
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
id: str
|
|
42
|
-
type : str
|
|
43
|
-
regex : str
|
|
44
|
-
# Model rebuild
|
|
45
|
-
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
|
|
46
|
-
InitialisationIndex.model_rebuild()
|
|
4
|
+
class InitialisationIndex(PatternTermDataDescriptor):
|
|
5
|
+
pass
|
|
@@ -1,58 +1,15 @@
|
|
|
1
|
+
from pydantic import Field
|
|
2
|
+
from esgvoc.api.data_descriptors.data_descriptor import PlainTermDataDescriptor
|
|
1
3
|
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
from typing import (
|
|
5
|
-
List,
|
|
6
|
-
Dict,
|
|
7
|
-
Optional
|
|
8
|
-
)
|
|
9
|
-
from pydantic.version import VERSION as PYDANTIC_VERSION
|
|
10
|
-
if int(PYDANTIC_VERSION[0])>=2:
|
|
11
|
-
from pydantic import (
|
|
12
|
-
BaseModel,
|
|
13
|
-
ConfigDict,
|
|
14
|
-
Field
|
|
15
|
-
)
|
|
16
|
-
else:
|
|
17
|
-
from pydantic import (
|
|
18
|
-
BaseModel,
|
|
19
|
-
Field
|
|
20
|
-
)
|
|
21
|
-
|
|
22
|
-
metamodel_version = "None"
|
|
23
|
-
version = "None"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
class ConfiguredBaseModel(BaseModel):
|
|
27
|
-
model_config = ConfigDict(
|
|
28
|
-
validate_assignment = True,
|
|
29
|
-
validate_default = True,
|
|
30
|
-
extra = "allow",
|
|
31
|
-
arbitrary_types_allowed = True,
|
|
32
|
-
use_enum_values = True,
|
|
33
|
-
strict = False,
|
|
34
|
-
)
|
|
35
|
-
pass
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
class Institution(ConfiguredBaseModel):
|
|
39
|
-
|
|
4
|
+
class Institution(PlainTermDataDescriptor):
|
|
40
5
|
"""
|
|
41
|
-
|
|
6
|
+
An registered institution for WCRP modelisation MIP.
|
|
42
7
|
"""
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
established: Optional[int]
|
|
49
|
-
type: Optional[str]
|
|
50
|
-
labels: Optional[List[str]] = Field(default_factory=list)
|
|
51
|
-
location: Optional[Dict] = Field(default_factory=dict)
|
|
8
|
+
acronyms: list[str] = Field(default_factory=list)
|
|
9
|
+
aliases: list[str] = Field(default_factory=list)
|
|
10
|
+
established: int|None
|
|
11
|
+
labels: list[str] = Field(default_factory=list)
|
|
12
|
+
location: dict = Field(default_factory=dict)
|
|
52
13
|
name: str
|
|
53
|
-
ror:
|
|
54
|
-
url:
|
|
55
|
-
|
|
56
|
-
# Model rebuild
|
|
57
|
-
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
|
|
58
|
-
Institution.model_rebuild()
|
|
14
|
+
ror: str|None
|
|
15
|
+
url: list[str] = Field(default_factory=list)
|
|
@@ -1,47 +1,7 @@
|
|
|
1
|
+
from esgvoc.api.data_descriptors.data_descriptor import PlainTermDataDescriptor
|
|
1
2
|
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
from typing import (
|
|
5
|
-
Optional
|
|
6
|
-
)
|
|
7
|
-
from pydantic.version import VERSION as PYDANTIC_VERSION
|
|
8
|
-
if int(PYDANTIC_VERSION[0])>=2:
|
|
9
|
-
from pydantic import (
|
|
10
|
-
BaseModel,
|
|
11
|
-
ConfigDict,
|
|
12
|
-
Field
|
|
13
|
-
)
|
|
14
|
-
else:
|
|
15
|
-
from pydantic import (
|
|
16
|
-
BaseModel,
|
|
17
|
-
Field
|
|
18
|
-
)
|
|
19
|
-
|
|
20
|
-
metamodel_version = "None"
|
|
21
|
-
version = "None"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
class ConfiguredBaseModel(BaseModel):
|
|
25
|
-
model_config = ConfigDict(
|
|
26
|
-
validate_assignment = True,
|
|
27
|
-
validate_default = True,
|
|
28
|
-
extra = "allow",
|
|
29
|
-
arbitrary_types_allowed = True,
|
|
30
|
-
use_enum_values = True,
|
|
31
|
-
strict = False,
|
|
32
|
-
)
|
|
33
|
-
pass
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
class License(ConfiguredBaseModel):
|
|
38
|
-
|
|
39
|
-
id: str
|
|
40
|
-
validation_method: str = Field(default = "list")
|
|
4
|
+
class License(PlainTermDataDescriptor):
|
|
41
5
|
kind: str
|
|
42
|
-
license:
|
|
43
|
-
url:
|
|
44
|
-
|
|
45
|
-
# Model rebuild
|
|
46
|
-
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
|
|
47
|
-
License.model_rebuild()
|
|
6
|
+
license: str|None
|
|
7
|
+
url: str|None
|
|
@@ -1,46 +1,8 @@
|
|
|
1
|
+
from esgvoc.api.data_descriptors.data_descriptor import PlainTermDataDescriptor
|
|
1
2
|
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
ConfigDict
|
|
9
|
-
)
|
|
10
|
-
else:
|
|
11
|
-
from pydantic import (
|
|
12
|
-
BaseModel
|
|
13
|
-
)
|
|
14
|
-
|
|
15
|
-
metamodel_version = "None"
|
|
16
|
-
version = "None"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
class ConfiguredBaseModel(BaseModel):
|
|
20
|
-
model_config = ConfigDict(
|
|
21
|
-
validate_assignment = True,
|
|
22
|
-
validate_default = True,
|
|
23
|
-
extra = "allow",
|
|
24
|
-
arbitrary_types_allowed = True,
|
|
25
|
-
use_enum_values = True,
|
|
26
|
-
strict = False,
|
|
27
|
-
)
|
|
28
|
-
pass
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
class MipEra(ConfiguredBaseModel):
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
id: str
|
|
39
|
-
start : int
|
|
40
|
-
end : int
|
|
41
|
-
name : str
|
|
42
|
-
type : str
|
|
43
|
-
url : str
|
|
44
|
-
# Model rebuild
|
|
45
|
-
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
|
|
46
|
-
MipEra.model_rebuild()
|
|
4
|
+
class MipEra(PlainTermDataDescriptor):
|
|
5
|
+
start: int
|
|
6
|
+
end: int
|
|
7
|
+
name: str
|
|
8
|
+
url: str
|
|
@@ -1,47 +1,9 @@
|
|
|
1
|
+
from esgvoc.api.data_descriptors.data_descriptor import PlainTermDataDescriptor
|
|
1
2
|
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
ConfigDict
|
|
10
|
-
)
|
|
11
|
-
else:
|
|
12
|
-
from pydantic import (
|
|
13
|
-
BaseModel
|
|
14
|
-
)
|
|
15
|
-
|
|
16
|
-
metamodel_version = "None"
|
|
17
|
-
version = "None"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class ConfiguredBaseModel(BaseModel):
|
|
21
|
-
model_config = ConfigDict(
|
|
22
|
-
validate_assignment = True,
|
|
23
|
-
validate_default = True,
|
|
24
|
-
extra = "allow",
|
|
25
|
-
arbitrary_types_allowed = True,
|
|
26
|
-
use_enum_values = True,
|
|
27
|
-
strict = False,
|
|
28
|
-
)
|
|
29
|
-
pass
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
class ModelComponent(ConfiguredBaseModel):
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
id: str
|
|
40
|
-
description :str
|
|
41
|
-
name : str
|
|
42
|
-
type : str
|
|
43
|
-
realm : dict
|
|
44
|
-
nominal_resolution : dict
|
|
45
|
-
# Model rebuild
|
|
46
|
-
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
|
|
47
|
-
ModelComponent.model_rebuild()
|
|
4
|
+
class ModelComponent(PlainTermDataDescriptor):
|
|
5
|
+
description: str
|
|
6
|
+
name: str
|
|
7
|
+
realm: dict
|
|
8
|
+
nominal_resolution: dict
|
|
9
|
+
version: int
|
|
@@ -1,42 +1,5 @@
|
|
|
1
|
+
from esgvoc.api.data_descriptors.data_descriptor import PlainTermDataDescriptor
|
|
1
2
|
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
from pydantic.version import VERSION as PYDANTIC_VERSION
|
|
6
|
-
if int(PYDANTIC_VERSION[0])>=2:
|
|
7
|
-
from pydantic import (
|
|
8
|
-
BaseModel,
|
|
9
|
-
ConfigDict,
|
|
10
|
-
Field
|
|
11
|
-
)
|
|
12
|
-
else:
|
|
13
|
-
from pydantic import (
|
|
14
|
-
BaseModel,
|
|
15
|
-
Field
|
|
16
|
-
)
|
|
17
|
-
|
|
18
|
-
metamodel_version = "None"
|
|
19
|
-
version = "None"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
class ConfiguredBaseModel(BaseModel):
|
|
23
|
-
model_config = ConfigDict(
|
|
24
|
-
validate_assignment = True,
|
|
25
|
-
validate_default = True,
|
|
26
|
-
extra = "allow",
|
|
27
|
-
arbitrary_types_allowed = True,
|
|
28
|
-
use_enum_values = True,
|
|
29
|
-
strict = False,
|
|
30
|
-
)
|
|
31
|
-
pass
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
class Organisation(ConfiguredBaseModel):
|
|
36
|
-
|
|
37
|
-
id: str
|
|
38
|
-
validation_method: str = Field(default = "list")
|
|
39
|
-
type : str
|
|
40
|
-
# Model rebuild
|
|
41
|
-
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
|
|
42
|
-
Organisation.model_rebuild()
|
|
4
|
+
class Organisation(PlainTermDataDescriptor):
|
|
5
|
+
pass
|
|
@@ -1,47 +1,5 @@
|
|
|
1
|
+
from esgvoc.api.data_descriptors.data_descriptor import PatternTermDataDescriptor
|
|
1
2
|
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
from __future__ import annotations
|
|
8
|
-
from pydantic.version import VERSION as PYDANTIC_VERSION
|
|
9
|
-
if int(PYDANTIC_VERSION[0])>=2:
|
|
10
|
-
from pydantic import (
|
|
11
|
-
BaseModel,
|
|
12
|
-
ConfigDict
|
|
13
|
-
)
|
|
14
|
-
else:
|
|
15
|
-
from pydantic import (
|
|
16
|
-
BaseModel
|
|
17
|
-
)
|
|
18
|
-
|
|
19
|
-
metamodel_version = "None"
|
|
20
|
-
version = "None"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
class ConfiguredBaseModel(BaseModel):
|
|
24
|
-
model_config = ConfigDict(
|
|
25
|
-
validate_assignment = True,
|
|
26
|
-
validate_default = True,
|
|
27
|
-
extra = "allow",
|
|
28
|
-
arbitrary_types_allowed = True,
|
|
29
|
-
use_enum_values = True,
|
|
30
|
-
strict = False,
|
|
31
|
-
)
|
|
32
|
-
pass
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
class PhysicIndex(ConfiguredBaseModel):
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
id: str
|
|
43
|
-
type : str
|
|
44
|
-
regex : str
|
|
45
|
-
# Model rebuild
|
|
46
|
-
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
|
|
47
|
-
PhysicIndex.model_rebuild()
|
|
4
|
+
class PhysicIndex(PatternTermDataDescriptor):
|
|
5
|
+
pass
|
|
@@ -1,45 +1,6 @@
|
|
|
1
|
+
from esgvoc.api.data_descriptors.data_descriptor import PlainTermDataDescriptor
|
|
1
2
|
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
if int(PYDANTIC_VERSION[0])>=2:
|
|
7
|
-
from pydantic import (
|
|
8
|
-
BaseModel,
|
|
9
|
-
ConfigDict
|
|
10
|
-
)
|
|
11
|
-
else:
|
|
12
|
-
from pydantic import (
|
|
13
|
-
BaseModel
|
|
14
|
-
)
|
|
15
|
-
|
|
16
|
-
metamodel_version = "None"
|
|
17
|
-
version = "None"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class ConfiguredBaseModel(BaseModel):
|
|
21
|
-
model_config = ConfigDict(
|
|
22
|
-
validate_assignment = True,
|
|
23
|
-
validate_default = True,
|
|
24
|
-
extra = "allow",
|
|
25
|
-
arbitrary_types_allowed = True,
|
|
26
|
-
use_enum_values = True,
|
|
27
|
-
strict = False,
|
|
28
|
-
)
|
|
29
|
-
pass
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
class Product(ConfiguredBaseModel):
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
id: str
|
|
40
|
-
description : str
|
|
41
|
-
type : str
|
|
42
|
-
kind : str
|
|
43
|
-
# Model rebuild
|
|
44
|
-
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
|
|
45
|
-
Product.model_rebuild()
|
|
4
|
+
class Product(PlainTermDataDescriptor):
|
|
5
|
+
description: str
|
|
6
|
+
kind: str
|