Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes
Code Changes
DatasetFieldBase
modes.DatasetField
to inherit fromDatasetFieldBase
.DatasetFieldBase
in__init__.py
.Steps to Confirm
fidesops
repository, modifyFidesopsDatasetField
to the following and run the test suite.Pre-Merge Checklist
CHANGELOG.md
Description Of Changes
This relates to the issue discussed here where
fidesops_meta
can't be added to thefideslang
DatasetField
. I tried several different options, and this was the only one that successfully passed thefidesops
test suite.Other things tried:
fidesops_meta
field toDatasetField
with aFidesopsMeta
type. This didn't work because doing this would requirefideslang
to importfidesops
.I tried multiple iterations of the following ideas and they all either failed the
fidesops
test suite, or caused Pydantic to error.fidesops_meta
toDatasetField
making the field that requiresfidesops
to be imported a generic in order to avoid the import.fidesops_meta
toDatasetField
making the whole field generic and controlling things fromfidesops
.fidesops_meta
toDatasetField
making the whole field generic and controlling things fromfidesops
. In addition to this, made thefields
type inDatasetField
Optional[List[Generic[T]]]
.fidesops_meta
toDatasetField
making the whole field generic and controlling things fromfidesops
. In addition to this, made thefields
type inDatasetField
Optional[List[Generic[T]]]
. Then only added validators to the inheriting class with no extra fields.fields
type inDatasetField
Optional[List[Generic[T]]]
, and only hadfidesops_meta
in the inheriting model.