dapla-toolbelt-metadata 0.7.0__py3-none-any.whl → 0.7.1__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/core.py +29 -1
- {dapla_toolbelt_metadata-0.7.0.dist-info → dapla_toolbelt_metadata-0.7.1.dist-info}/METADATA +1 -1
- {dapla_toolbelt_metadata-0.7.0.dist-info → dapla_toolbelt_metadata-0.7.1.dist-info}/RECORD +5 -5
- {dapla_toolbelt_metadata-0.7.0.dist-info → dapla_toolbelt_metadata-0.7.1.dist-info}/LICENSE +0 -0
- {dapla_toolbelt_metadata-0.7.0.dist-info → dapla_toolbelt_metadata-0.7.1.dist-info}/WHEEL +0 -0
dapla_metadata/datasets/core.py
CHANGED
|
@@ -665,13 +665,41 @@ class Datadoc:
|
|
|
665
665
|
return calculate_percentage(num_set_fields, num_all_fields)
|
|
666
666
|
|
|
667
667
|
def add_pseudo_variable(self, variable_short_name: str) -> None:
|
|
668
|
-
"""Adds a new pseudo variable to the list of pseudonymized variables.
|
|
668
|
+
"""Adds a new pseudo variable to the list of pseudonymized variables.
|
|
669
|
+
|
|
670
|
+
Sets is_personal_data to pseudonymized encrypted personal data.
|
|
671
|
+
"""
|
|
669
672
|
if self.variables_lookup[variable_short_name] is not None:
|
|
670
673
|
pseudo_variable = all_optional_model.PseudoVariable(
|
|
671
674
|
short_name=variable_short_name
|
|
672
675
|
)
|
|
673
676
|
self.pseudo_variables.append(pseudo_variable)
|
|
674
677
|
self.pseudo_variables_lookup[variable_short_name] = pseudo_variable
|
|
678
|
+
self.variables_lookup[
|
|
679
|
+
variable_short_name
|
|
680
|
+
].is_personal_data = (
|
|
681
|
+
all_optional_model.IsPersonalData.PSEUDONYMISED_ENCRYPTED_PERSONAL_DATA
|
|
682
|
+
)
|
|
683
|
+
|
|
684
|
+
def remove_pseudo_variable(self, variable_short_name: str) -> None:
|
|
685
|
+
"""Removes a pseudo variable by using the shortname.
|
|
686
|
+
|
|
687
|
+
Updates the pseudo variable lookup by creating a new one.
|
|
688
|
+
Sets is_personal_data to non pseudonymized encrypted personal data.
|
|
689
|
+
"""
|
|
690
|
+
if self.pseudo_variables_lookup[variable_short_name] is not None:
|
|
691
|
+
pseudo_variable = self.get_pseudo_variable(variable_short_name)
|
|
692
|
+
|
|
693
|
+
if pseudo_variable is not None:
|
|
694
|
+
self.pseudo_variables = [
|
|
695
|
+
pseudo_variable
|
|
696
|
+
for pseudo_variable in self.pseudo_variables
|
|
697
|
+
if pseudo_variable.short_name != variable_short_name
|
|
698
|
+
]
|
|
699
|
+
self._create_pseudo_variables_lookup()
|
|
700
|
+
self.variables_lookup[
|
|
701
|
+
variable_short_name
|
|
702
|
+
].is_personal_data = all_optional_model.IsPersonalData.NON_PSEUDONYMISED_ENCRYPTED_PERSONAL_DATA
|
|
675
703
|
|
|
676
704
|
def get_pseudo_variable(
|
|
677
705
|
self, variable_short_name: str
|
|
@@ -7,7 +7,7 @@ dapla_metadata/dapla/__init__.py,sha256=tkapF-YwmruPPrKvN3pEoCZqb7xvJx_ogBM8XyGM
|
|
|
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
9
|
dapla_metadata/datasets/code_list.py,sha256=kp1O6sUiUAP9WKlWY8IgHWx_1IOzJA63WveHqolgKmg,9082
|
|
10
|
-
dapla_metadata/datasets/core.py,sha256=
|
|
10
|
+
dapla_metadata/datasets/core.py,sha256=4fB9q_pUDmFfBN9RDjhUg1ney66juL1B_bDgtwijTwM,29329
|
|
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
|
|
@@ -81,7 +81,7 @@ dapla_metadata/variable_definitions/_utils/variable_definition_files.py,sha256=P
|
|
|
81
81
|
dapla_metadata/variable_definitions/exceptions.py,sha256=z6Gtd84FboDu7vWjC3wathIF7I0gF0imtRhwMkr16lY,7851
|
|
82
82
|
dapla_metadata/variable_definitions/vardef.py,sha256=KYd31nCGhxuzC0hpKR6foQjO39Tlb3vu9IDqUoMvTeY,11352
|
|
83
83
|
dapla_metadata/variable_definitions/variable_definition.py,sha256=sj49uot0e4UJW4QJ3dEJGgjY4yfCHOkxS2NdD2t60b8,14883
|
|
84
|
-
dapla_toolbelt_metadata-0.7.
|
|
85
|
-
dapla_toolbelt_metadata-0.7.
|
|
86
|
-
dapla_toolbelt_metadata-0.7.
|
|
87
|
-
dapla_toolbelt_metadata-0.7.
|
|
84
|
+
dapla_toolbelt_metadata-0.7.1.dist-info/LICENSE,sha256=np3IfD5m0ZUofn_kVzDZqliozuiO6wrktw3LRPjyEiI,1073
|
|
85
|
+
dapla_toolbelt_metadata-0.7.1.dist-info/METADATA,sha256=-fHBhP0AR_dZpEO98V4CFS97b3maRScHuO8NxzmWc8M,4905
|
|
86
|
+
dapla_toolbelt_metadata-0.7.1.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
|
|
87
|
+
dapla_toolbelt_metadata-0.7.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|