Skip to content

anonymize_dataset fails if dataset contains RawDataElement #85

Description

@GuillaumeDehaene

Hello,

Thank you for this great project.

While using it in our codebase, I have found the following issue.

anonymize_dataset fails if dataset contains RawDataElement

anonymize_dataset fails if the dataset contains RawDataElement:

Proposed solution

I would be happy to create a PR to fix this issue here too.

I see two possibilities:

  1. Sanitize dataset as part of anonymize_dataset:
    • iterate over the dataset and replace RawDataElements,
    • continue with the current code of anonymize_dataset.
  2. Modify current replace_element code to handle the RawDataElement case.

I'm partial to solution 1.:
- it's simple and easy to understand and review.
- it makes it easier for the user to add custom-rules since they are able to assume that all elements are RawDataElement, and they can use the simpler: element.value = new_value syntax.
- however, it also means that input dataset are walked-through twice. I feel that this price is worth paying.

Best
Guillaume

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions