dapla-toolbelt-metadata 0.8.2__py3-none-any.whl → 0.8.4__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 dapla-toolbelt-metadata might be problematic. Click here for more details.
- dapla_metadata/datasets/code_list.py +5 -6
- dapla_metadata/datasets/core.py +13 -0
- {dapla_toolbelt_metadata-0.8.2.dist-info → dapla_toolbelt_metadata-0.8.4.dist-info}/METADATA +1 -1
- {dapla_toolbelt_metadata-0.8.2.dist-info → dapla_toolbelt_metadata-0.8.4.dist-info}/RECORD +6 -6
- {dapla_toolbelt_metadata-0.8.2.dist-info → dapla_toolbelt_metadata-0.8.4.dist-info}/WHEEL +1 -1
- {dapla_toolbelt_metadata-0.8.2.dist-info → dapla_toolbelt_metadata-0.8.4.dist-info}/LICENSE +0 -0
|
@@ -90,10 +90,6 @@ class CodeList(GetExternalSource):
|
|
|
90
90
|
execution of data fetching.
|
|
91
91
|
classification_id: The ID of the classification to retrieve.
|
|
92
92
|
"""
|
|
93
|
-
self.supported_languages = [
|
|
94
|
-
SupportedLanguages.NORSK_BOKMÅL,
|
|
95
|
-
SupportedLanguages.ENGLISH,
|
|
96
|
-
]
|
|
97
93
|
self._classifications: list[CodeListItem] = []
|
|
98
94
|
self.classification_id = classification_id
|
|
99
95
|
self.classifications_dataframes: (
|
|
@@ -117,12 +113,15 @@ class CodeList(GetExternalSource):
|
|
|
117
113
|
and returns None.
|
|
118
114
|
"""
|
|
119
115
|
classifications_dataframes: dict[SupportedLanguages, pd.DataFrame] = {}
|
|
120
|
-
for i in
|
|
116
|
+
for i in [
|
|
117
|
+
SupportedLanguages.NORSK_BOKMÅL,
|
|
118
|
+
SupportedLanguages.ENGLISH,
|
|
119
|
+
]:
|
|
121
120
|
try:
|
|
122
121
|
classifications_dataframes[i] = (
|
|
123
122
|
KlassClassification(
|
|
124
123
|
str(self.classification_id),
|
|
125
|
-
i,
|
|
124
|
+
str(i), # type: ignore [arg-type]
|
|
126
125
|
)
|
|
127
126
|
.get_codes()
|
|
128
127
|
.data
|
dapla_metadata/datasets/core.py
CHANGED
|
@@ -517,6 +517,19 @@ class Datadoc:
|
|
|
517
517
|
"""
|
|
518
518
|
return dataset_path.parent / (dataset_path.stem + METADATA_DOCUMENT_FILE_SUFFIX)
|
|
519
519
|
|
|
520
|
+
def datadoc_model(self) -> all_optional_model.MetadataContainer:
|
|
521
|
+
"""Return the underlying datadoc model."""
|
|
522
|
+
datadoc: ValidateDatadocMetadata = ValidateDatadocMetadata(
|
|
523
|
+
percentage_complete=self.percent_complete,
|
|
524
|
+
dataset=self.dataset,
|
|
525
|
+
variables=self.variables,
|
|
526
|
+
)
|
|
527
|
+
if self.container:
|
|
528
|
+
res = copy.deepcopy(self.container)
|
|
529
|
+
res.datadoc = datadoc
|
|
530
|
+
return res
|
|
531
|
+
return all_optional_model.MetadataContainer(datadoc=datadoc)
|
|
532
|
+
|
|
520
533
|
def write_metadata_document(self) -> None:
|
|
521
534
|
"""Write all currently known metadata to file.
|
|
522
535
|
|
|
@@ -6,8 +6,8 @@ dapla_metadata/_shared/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
|
|
|
6
6
|
dapla_metadata/dapla/__init__.py,sha256=tkapF-YwmruPPrKvN3pEoCZqb7xvJx_ogBM8XyGMuJI,130
|
|
7
7
|
dapla_metadata/dapla/user_info.py,sha256=bENez-ICt9ySR8orYebO68Q3_2LkIW9QTL58DTctmEQ,4833
|
|
8
8
|
dapla_metadata/datasets/__init__.py,sha256=TvzskpdFC6hGcC9_55URT5jr5wNAPzXuISd2UjJWM_8,280
|
|
9
|
-
dapla_metadata/datasets/code_list.py,sha256=
|
|
10
|
-
dapla_metadata/datasets/core.py,sha256=
|
|
9
|
+
dapla_metadata/datasets/code_list.py,sha256=6lrPVhXW97kHxhmszuKSQ8kOHERCpVSqX1s7ogefBuI,9054
|
|
10
|
+
dapla_metadata/datasets/core.py,sha256=R_FJbU7y4hWe9jjqKUChe1MyNftt0ZxWeFnWeiUfLNM,25936
|
|
11
11
|
dapla_metadata/datasets/dapla_dataset_path_info.py,sha256=WPeV_mwKk2B9sXd14SaP-kTb1bOQ_8W2KtrqOG7sJIY,26867
|
|
12
12
|
dapla_metadata/datasets/dataset_parser.py,sha256=3dtRXNy1C8SfG8zTYWdY26nV4l-dG25IC_0J5t2bYwI,8285
|
|
13
13
|
dapla_metadata/datasets/external_sources/__init__.py,sha256=qvIdXwqyEmXNUCB94ZtZXRzifdW4hiXASFFPtC70f6E,83
|
|
@@ -86,7 +86,7 @@ dapla_metadata/variable_definitions/vardef.py,sha256=WUpiKfvgFGPhMdjYSFSmdlXQKAo
|
|
|
86
86
|
dapla_metadata/variable_definitions/vardok_id.py,sha256=8T23BUHyVQr5hovTVc2E4HVY7f7e_jdi3YL1qzMQgFw,1268
|
|
87
87
|
dapla_metadata/variable_definitions/vardok_vardef_id_pair.py,sha256=8MDdd2-9L30MXkoQrk7NDcueaoxdeYie-TJhgoskTzk,1389
|
|
88
88
|
dapla_metadata/variable_definitions/variable_definition.py,sha256=uSWvSuVDh5zmSXGUb7vitiNd0VThU5DzFV3Rd6gumYE,14620
|
|
89
|
-
dapla_toolbelt_metadata-0.8.
|
|
90
|
-
dapla_toolbelt_metadata-0.8.
|
|
91
|
-
dapla_toolbelt_metadata-0.8.
|
|
92
|
-
dapla_toolbelt_metadata-0.8.
|
|
89
|
+
dapla_toolbelt_metadata-0.8.4.dist-info/LICENSE,sha256=np3IfD5m0ZUofn_kVzDZqliozuiO6wrktw3LRPjyEiI,1073
|
|
90
|
+
dapla_toolbelt_metadata-0.8.4.dist-info/METADATA,sha256=lQW9sHoFon1T7smQS2A9MpxNCCVazxpxZ7JhYxUQqlc,4905
|
|
91
|
+
dapla_toolbelt_metadata-0.8.4.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
92
|
+
dapla_toolbelt_metadata-0.8.4.dist-info/RECORD,,
|
|
File without changes
|