Skip to content

Commit

Permalink
support previous_vendor_id attribute on System model (#182)
Browse files Browse the repository at this point in the history
* support previous_vendor_id attribute on System model

* update changelog, create section for 2.2.1 release
  • Loading branch information
adamsachs authored Nov 6, 2023
1 parent f5ab584 commit 1bcbd0a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,19 @@ The types of changes are:
- `Fixed` for any bug fixes.
- `Security` in case of vulnerabilities.

## [Unreleased](https://github.com/ethyca/fideslang/compare/2.2.0...main)
## [Unreleased](https://github.com/ethyca/fideslang/compare/2.2.1...main)

## [2.2.0](https://github.com/ethyca/fideslang/compare/2.1.0...2.2.0)
## [2.2.1](https://github.com/ethyca/fideslang/compare/2.2.0...2.2.1)

### Added

- Added a `System.cookies` property to support `Cookie` records explicitly associated with a `System` generally [#181](https://github.com/ethyca/fideslang/pull/181)
- Added a `System.previous_vendor_id` property to support to associate a `System` record with a "deprecated" vendor record [#182](https://github.com/ethyca/fideslang/pull/182)

## [2.2.0](https://github.com/ethyca/fideslang/compare/2.1.0...2.2.0)

### Added

- Added support for new TCF-based `System` fields [#173](https://github.com/ethyca/fideslang/pull/173)
- Added support for `PrivacyDeclaration.flexible_legal_basis_for_profiling` field [#177](https://github.com/ethyca/fideslang/pull/177) [#178](https://github.com/ethyca/fideslang/pull/178)
- Added GVL data category mapping and functions [#175](https://github.com/ethyca/fideslang/pull/175) [#180](https://github.com/ethyca/fideslang/pull/180)
Expand Down
3 changes: 3 additions & 0 deletions src/fideslang/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1165,6 +1165,9 @@ class System(FidesModel):
vendor_id: Optional[str] = Field(
description="The unique identifier for the vendor that's associated with this system."
)
previous_vendor_id: Optional[str] = Field(
description="If specified, the unique identifier for the vendor that was previously associated with this system."
)
dataset_references: List[FidesKey] = Field(
default_factory=list,
description="Referenced Dataset fides keys used by the system.",
Expand Down
9 changes: 7 additions & 2 deletions tests/fideslang/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ def test_privacy_declaration_data_qualifier_deprecation(self) -> None:


class TestSystem:
# TODO: these tests are not effectively evaluating whether the provided constructor args
# are actually supported, because our `System` model does not prohibit "extra" fields.
# We need to update these tests to assert that the provided args are actually being set
# as attributes on the System instance that's instantiated.
def test_system_valid(self) -> None:
assert System(
description="Test Policy",
Expand Down Expand Up @@ -390,13 +394,14 @@ def test_expanded_system(self):
data_shared_with_third_parties=True,
third_parties="advertising; marketing",
shared_categories=[],
flexible_legal_basis_for_processing=True,
cookies=[
{"name": "ANON_ID", "path": "/", "domain": "tribalfusion.com"}
],
)
],
third_country_transfers=["ARM"],
vendor_id="1",
vendor_id="gvl.1",
dataset_references=["test_fides_key_dataset"],
processes_personal_data=True,
exempt_from_privacy_regulations=False,
Expand All @@ -419,7 +424,7 @@ def test_expanded_system(self):
cookie_refresh=True,
uses_non_cookie_access=True,
legitimate_interest_disclosure_url="http://www.example.com/legitimate_interest_disclosure",
flexible_legal_basis_for_processing=True,
previous_vendor_id="gacp.10",
cookies=[
{
"name": "COOKIE_ID_EXAMPLE",
Expand Down

0 comments on commit 1bcbd0a

Please sign in to comment.