Skip to content

Commit

Permalink
Data use changes to support Purpose 11 (#171)
Browse files Browse the repository at this point in the history
Co-authored-by: Adam Sachs <[email protected]>
Co-authored-by: Dawn Pattison <[email protected]>
  • Loading branch information
3 people authored Oct 5, 2023
1 parent 2f364dc commit 94f9174
Show file tree
Hide file tree
Showing 9 changed files with 115 additions and 32 deletions.
2 changes: 1 addition & 1 deletion data_files/data_categories.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ data_category:
fides_key: user.authorization
organization_fides_key: default_organization
tags: null
name: Authorization Information.
name: Authorization Information
description: Scope of permissions and access to a system.
parent_key: user
- version_added: 2.0.0
Expand Down
4 changes: 3 additions & 1 deletion data_files/data_uses.csv
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ marketing.communications.sms,True,,,,Marketing SMS Communications,default_organi
operations,True,,,,Operations,default_organization,data_use,,,,,2.0.0,,Supports business processes necessary to the organization's operation.
personalize,True,,,,Personalize,default_organization,data_use,,,,,2.0.0,,"Personalizes the product, service, application or system."
personalize.content,True,,,,Content Personalization,default_organization,personalize,,,,,2.0.0,,"Personalizes the content of the product, service, application or system."
personalize.profiling,True,,,,Personalized Profiling,default_organization,personalize,,,,,2.0.0,,Creates profiles for the purpose of serving content.
personalize.system,True,,,,System Personalization,default_organization,personalize,,,,,2.0.0,,Personalizes the system.
personalize.content.limited,True,,,,Limited Content Personalization,default_organization,personalize.content,,,,,2.1.1,,Uses limited data for the purpose of serving content.
personalize.content.profiling,True,,,,Profiling for Personalization,default_organization,personalize.content,,,,,2.1.1,,Creates profiles for the purpose of serving content.
personalize.content.profiled,True,,,,Targeted Content Personalization,default_organization,personalize.content,,,,,2.1.1,,Uses profiles for the purpose of serving content.
sales,True,,,,Sales,default_organization,data_use,,,,,2.0.0,,Supports sales activities such as communications and outreach.
third_party_sharing,True,,,,Third Party Sharing,default_organization,data_use,,,,,2.0.0,,Transfers data to third parties outside of the system or service's scope.
third_party_sharing.legal_obligation,True,,,,Sharing for Legal Obligation,default_organization,third_party_sharing,,,,,2.0.0,,"Shares data for legal obligations, including contracts, applicable laws or regulations."
Expand Down
50 changes: 42 additions & 8 deletions data_files/data_uses.json
Original file line number Diff line number Diff line change
Expand Up @@ -787,11 +787,11 @@
"version_deprecated": null,
"replaced_by": null,
"is_default": true,
"fides_key": "personalize.profiling",
"fides_key": "personalize.system",
"organization_fides_key": "default_organization",
"tags": null,
"name": "Personalized Profiling",
"description": "Creates profiles for the purpose of serving content.",
"name": "System Personalization",
"description": "Personalizes the system.",
"parent_key": "personalize",
"legal_basis": null,
"special_category": null,
Expand All @@ -800,16 +800,50 @@
"legitimate_interest_impact_assessment": null
},
{
"version_added": "2.0.0",
"version_added": "2.1.1",
"version_deprecated": null,
"replaced_by": null,
"is_default": true,
"fides_key": "personalize.system",
"fides_key": "personalize.content.limited",
"organization_fides_key": "default_organization",
"tags": null,
"name": "System Personalization",
"description": "Personalizes the system.",
"parent_key": "personalize",
"name": "Limited Content Personalization",
"description": "Uses limited data for the purpose of serving content.",
"parent_key": "personalize.content",
"legal_basis": null,
"special_category": null,
"recipients": null,
"legitimate_interest": null,
"legitimate_interest_impact_assessment": null
},
{
"version_added": "2.1.1",
"version_deprecated": null,
"replaced_by": null,
"is_default": true,
"fides_key": "personalize.content.profiling",
"organization_fides_key": "default_organization",
"tags": null,
"name": "Profiling for Personalization",
"description": "Creates profiles for the purpose of serving content.",
"parent_key": "personalize.content",
"legal_basis": null,
"special_category": null,
"recipients": null,
"legitimate_interest": null,
"legitimate_interest_impact_assessment": null
},
{
"version_added": "2.1.1",
"version_deprecated": null,
"replaced_by": null,
"is_default": true,
"fides_key": "personalize.content.profiled",
"organization_fides_key": "default_organization",
"tags": null,
"name": "Targeted Content Personalization",
"description": "Uses profiles for the purpose of serving content.",
"parent_key": "personalize.content",
"legal_basis": null,
"special_category": null,
"recipients": null,
Expand Down
46 changes: 38 additions & 8 deletions data_files/data_uses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -720,27 +720,57 @@ data_use:
version_deprecated: null
replaced_by: null
is_default: true
fides_key: personalize.profiling
fides_key: personalize.system
organization_fides_key: default_organization
tags: null
name: Personalized Profiling
description: Creates profiles for the purpose of serving content.
name: System Personalization
description: Personalizes the system.
parent_key: personalize
legal_basis: null
special_category: null
recipients: null
legitimate_interest: null
legitimate_interest_impact_assessment: null
- version_added: 2.0.0
- version_added: 2.1.1
version_deprecated: null
replaced_by: null
is_default: true
fides_key: personalize.system
fides_key: personalize.content.limited
organization_fides_key: default_organization
tags: null
name: System Personalization
description: Personalizes the system.
parent_key: personalize
name: Limited Content Personalization
description: Uses limited data for the purpose of serving content.
parent_key: personalize.content
legal_basis: null
special_category: null
recipients: null
legitimate_interest: null
legitimate_interest_impact_assessment: null
- version_added: 2.1.1
version_deprecated: null
replaced_by: null
is_default: true
fides_key: personalize.content.profiling
organization_fides_key: default_organization
tags: null
name: Profiling for Personalization
description: Creates profiles for the purpose of serving content.
parent_key: personalize.content
legal_basis: null
special_category: null
recipients: null
legitimate_interest: null
legitimate_interest_impact_assessment: null
- version_added: 2.1.1
version_deprecated: null
replaced_by: null
is_default: true
fides_key: personalize.content.profiled
organization_fides_key: default_organization
tags: null
name: Targeted Content Personalization
description: Uses profiles for the purpose of serving content.
parent_key: personalize.content
legal_basis: null
special_category: null
recipients: null
Expand Down
4 changes: 3 additions & 1 deletion mkdocs/docs/csv/data_uses.csv
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ marketing.communications.sms,True,,,,Marketing SMS Communications,default_organi
operations,True,,,,Operations,default_organization,data_use,,,,,2.0.0,,Supports business processes necessary to the organization's operation.
personalize,True,,,,Personalize,default_organization,data_use,,,,,2.0.0,,"Personalizes the product, service, application or system."
personalize.content,True,,,,Content Personalization,default_organization,personalize,,,,,2.0.0,,"Personalizes the content of the product, service, application or system."
personalize.profiling,True,,,,Personalized Profiling,default_organization,personalize,,,,,2.0.0,,Creates profiles for the purpose of serving content.
personalize.system,True,,,,System Personalization,default_organization,personalize,,,,,2.0.0,,Personalizes the system.
personalize.content.limited,True,,,,Limited Content Personalization,default_organization,personalize.content,,,,,2.1.1,,Uses limited data for the purpose of serving content.
personalize.content.profiling,True,,,,Profiling for Personalization,default_organization,personalize.content,,,,,2.1.1,,Creates profiles for the purpose of serving content.
personalize.content.profiled,True,,,,Targeted Content Personalization,default_organization,personalize.content,,,,,2.1.1,,Uses profiles for the purpose of serving content.
sales,True,,,,Sales,default_organization,data_use,,,,,2.0.0,,Supports sales activities such as communications and outreach.
third_party_sharing,True,,,,Third Party Sharing,default_organization,data_use,,,,,2.0.0,,Transfers data to third parties outside of the system or service's scope.
third_party_sharing.legal_obligation,True,,,,Sharing for Legal Obligation,default_organization,third_party_sharing,,,,,2.0.0,,"Shares data for legal obligations, including contracts, applicable laws or regulations."
Expand Down
21 changes: 18 additions & 3 deletions src/fideslang/default_taxonomy/data_uses.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,10 +306,25 @@
parent_key="personalize",
),
default_use_factory(
fides_key="personalize.profiling",
name="Personalized Profiling",
fides_key="personalize.content.limited",
name="Limited Content Personalization",
description="Uses limited data for the purpose of serving content.",
parent_key="personalize.content",
version_added="2.1.1",
),
default_use_factory(
fides_key="personalize.content.profiling",
name="Profiling for Personalization",
description="Creates profiles for the purpose of serving content.",
parent_key="personalize",
parent_key="personalize.content",
version_added="2.1.1",
),
default_use_factory(
fides_key="personalize.content.profiled",
name="Targeted Content Personalization",
description="Uses profiles for the purpose of serving content.",
parent_key="personalize.content",
version_added="2.1.1",
),
default_use_factory(
fides_key="personalize.system",
Expand Down
6 changes: 3 additions & 3 deletions src/fideslang/gvl/gvl_data_use_mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"5": {
"id": 5,
"name": "Create profiles to personalise content",
"data_uses": ["personalize.profiling"],
"data_uses": ["personalize.content.profiling"],
"description": "Information about your activity on this service (for instance, forms you submit, non-advertising content you look at) can be stored and combined with other information about you (such as your previous activity on this service or other websites or apps) or similar users. This is then used to build or improve a profile about you (which might for example include possible interests and personal aspects). Your profile can be used (also later) to present content that appears more relevant based on your possible interests, such as by adapting the order in which content is shown to you, so that it is even easier for you to find content that matches your interests.",
"illustrations": [
"You read several articles on how to build a treehouse on a social media platform. This information might be added to a profile to mark your interest in content related to outdoors as well as do-it-yourself guides (with the objective of allowing the personalisation of content, so that for example you are presented with more blog posts and articles on treehouses and wood cabins in the future).",
Expand All @@ -52,7 +52,7 @@
"6": {
"id": 6,
"name": "Use profiles to select personalised content",
"data_uses": ["personalize.content"],
"data_uses": ["personalize.content.profiled"],
"description": "Content presented to you on this service can be based on your content personalisation profiles, which can reflect your activity on this or other services (for instance, the forms you submit, content you look at), possible interests and personal aspects, such as by adapting the order in which content is shown to you, so that it is even easier for you to find (non-advertising) content that matches your interests.",
"illustrations": [
"You read articles on vegetarian food on a social media platform and then use the cooking app of an unrelated company. The profile built about you on the social media platform will be used to present you vegetarian recipes on the welcome screen of the cooking app.",
Expand Down Expand Up @@ -102,7 +102,7 @@
"11": {
"id": 11,
"name": "Use limited data to select content",
"data_uses": [],
"data_uses": ["personalize.content.limited"],
"description": "Content presented to you on this service can be based on limited data, such as the website or app you are using, your non-precise location, your device type, or which content you are (or have been) interacting with (for example, to limit the number of times a video or an article is presented to you).",
"illustrations": [
"A travel magazine has published an article on its website about the new online courses proposed by a language school, to improve travelling experiences abroad. The school’s blog posts are inserted directly at the bottom of the page, and selected on the basis of your non-precise location (for instance, blog posts explaining the course curriculum for different languages than the language of the country you are situated in).",
Expand Down
4 changes: 1 addition & 3 deletions tests/fideslang/gvl/test_gvl.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ def test_purpose_to_data_use():
"marketing.advertising.third_party.targeted",
]

assert (
purpose_to_data_use(11) == []
) # purpose 11 is valid, but has no associated data uses
assert purpose_to_data_use(11) == ["personalize.content.limited"]

# assert invalid uses raise KeyErrors
with pytest.raises(KeyError):
Expand Down
10 changes: 6 additions & 4 deletions tests/fideslang/test_default_taxonomy.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
from fideslang.default_taxonomy import DEFAULT_TAXONOMY
import pytest
from typing import Tuple
from collections import Counter
from typing import Tuple

import pytest

from fideslang.default_taxonomy import DEFAULT_TAXONOMY

taxonomy_counts = {
"data_category": 85,
"data_use": 52,
"data_use": 54,
"data_subject": 15,
"data_qualifier": 5,
}
Expand Down

0 comments on commit 94f9174

Please sign in to comment.