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.

@@ -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 self.supported_languages:
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
@@ -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
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: dapla-toolbelt-metadata
3
- Version: 0.8.2
3
+ Version: 0.8.4
4
4
  Summary: Dapla Toolbelt Metadata
5
5
  License: MIT
6
6
  Author: Team Metadata
@@ -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=kp1O6sUiUAP9WKlWY8IgHWx_1IOzJA63WveHqolgKmg,9082
10
- dapla_metadata/datasets/core.py,sha256=SKD7FaxmzEjnmaSjXHvtxM52xa2ygoaWRAaP9xvnP-Y,25409
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.2.dist-info/LICENSE,sha256=np3IfD5m0ZUofn_kVzDZqliozuiO6wrktw3LRPjyEiI,1073
90
- dapla_toolbelt_metadata-0.8.2.dist-info/METADATA,sha256=X9CSckR-l2DJ6cuHEAEZ-MvcbNYkVJg4dfQ2bnWdokc,4905
91
- dapla_toolbelt_metadata-0.8.2.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
92
- dapla_toolbelt_metadata-0.8.2.dist-info/RECORD,,
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,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.1.2
2
+ Generator: poetry-core 2.1.3
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any