Skip to content

Commit b9077bb

Browse files
authored
feat(privacy): convert enum into string value (#30)
1 parent 6060fad commit b9077bb

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.github/workflows/pull_request.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ jobs:
4343
run: |
4444
python -m pip install --upgrade pip
4545
python -m pip install -r requirements-dev.txt
46+
python -m pip install ydata-core
4647
4748
- name: Lint
4849
run: make lint PYTHON=$PYTHON

src/datascience/ydata/datascience/common/privacy.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
from enum import Enum, auto
1+
from ydata.core.enum import StringEnum
22

33

4-
class PrivacyLevel(Enum):
4+
class PrivacyLevel(StringEnum):
55
"""Privacy level exposed to the end-user."""
6-
HIGH_FIDELITY = auto()
6+
HIGH_FIDELITY = "HIGH_FIDELITY"
77
"""High fidelity"""
8-
HIGH_PRIVACY = auto()
8+
HIGH_PRIVACY = "HIGH_PRIVACY"
99
"""High privacy"""
10-
BALANCED_PRIVACY_FIDELITY = auto()
10+
BALANCED_PRIVACY_FIDELITY = "BALANCED_PRIVACY_FIDELITY"
1111
"""Balanced privacy/fidelity"""
1212

1313
def __str__(self):

0 commit comments

Comments
 (0)