Skip to content

Commit

Permalink
Add Collections Skip Processing Flag (#165)
Browse files Browse the repository at this point in the history
* Add "skip_processing" flag underneath Collection > fides_meta for DSR processing.
  • Loading branch information
pattisdr authored Sep 13, 2023
1 parent f0563cd commit 67cba9d
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 1 deletion.
23 changes: 22 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,20 @@ The types of changes are:
- `Fixed` for any bug fixes.
- `Security` in case of vulnerabilities.

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


### Changed

- Add Collection > Fides Meta > Skip Processing Flag to skip collections in DSR processing [#165](https://github.com/ethyca/fideslang/pull/165)


## [2.0.3](https://github.com/ethyca/fideslang/compare/2.0.2...2.0.3)

### Changed

- Relax system legal basis for transfer fields [#162](https://github.com/ethyca/fideslang/pull/162)


## [2.0.2](https://github.com/ethyca/fideslang/compare/2.0.1...2.0.2)

Expand All @@ -39,6 +52,14 @@ The types of changes are:
- Updated the Data Categories and Data Uses to support GVL [#144](https://github.com/ethyca/fideslang/pull/144)
- Add version metadata to the default taxonomy items [#147](https://github.com/ethyca/fideslang/pull/147)


## [1.4.6 (Hotfix)](https://github.com/ethyca/fideslang/compare/1.4.5...1.4.6)

### Changed

- Relax system legal basis for transfer fields [#162](https://github.com/ethyca/fideslang/pull/162)


## [1.4.5 (Hotfix)](https://github.com/ethyca/fideslang/compare/1.4.4...1.4.5)

### Changed
Expand Down
1 change: 1 addition & 0 deletions src/fideslang/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,7 @@ class CollectionMeta(BaseModel):
"""Collection-level specific annotations used for query traversal"""

after: Optional[List[FidesCollectionKey]]
skip_processing: Optional[bool] = False


class DatasetCollection(FidesopsMetaBackwardsCompat):
Expand Down
29 changes: 29 additions & 0 deletions tests/fideslang/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,35 @@ def test_dataset_deprecated_fields(self, deprecated_field, value) -> None:
}
)

def test_dataset_collection_skip_processing(self):
collection = DatasetCollection(
name="dataset_collection_1",
data_qualifier="data_collection_data_qualifier_1",
data_categories=["dataset_collection_data_category_1"],
fields=[],
)
assert not collection.fides_meta

collection = DatasetCollection(
name="dataset_collection_1",
data_qualifier="data_collection_data_qualifier_1",
data_categories=["dataset_collection_data_category_1"],
fides_meta={"after": ["third_dataset.blue_collection"]},
fields=[],
)

assert collection.fides_meta.skip_processing is False

collection = DatasetCollection(
name="dataset_collection_1",
data_qualifier="data_collection_data_qualifier_1",
data_categories=["dataset_collection_data_category_1"],
fides_meta={"skip_processing": True},
fields=[],
)

assert collection.fides_meta.skip_processing


class TestDataUse:
def test_minimal_data_use(self):
Expand Down

0 comments on commit 67cba9d

Please sign in to comment.