generated from ydataai/opensource-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add privacy level enum [SD-781] (#25)
* feat: add privacy level enum * fix: lint error * feat: move privacy level enum * feat: add documentation * feat: move privacy level enum to new data science package
- Loading branch information
1 parent
0245844
commit 0990b5b
Showing
6 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from pathlib import Path | ||
from setuptools import setup, find_packages | ||
|
||
here = Path(__file__).parent.resolve() | ||
root = here.parent.parent.resolve() | ||
|
||
long_description = (root / 'README.md').read_text(encoding='utf-8') | ||
version = (root / 'VERSION').read_text().rstrip("\n") | ||
|
||
setup(name='ydata-datascience', | ||
version=version, | ||
description='Data science functionalities for all python packages at YData', | ||
long_description=long_description, | ||
long_description_content_type='text/markdown', | ||
author='YData', | ||
author_email='[email protected]', | ||
classifiers=[ | ||
'Intended Audience :: Developers', | ||
'Programming Language :: Python :: 3 :: Only', | ||
'Topic :: Software Development :: Libraries :: Python Modules' | ||
], | ||
url='https://github.com/ydataai/python-core', | ||
packages=find_packages(exclude=['ydata', 'tests']), | ||
include_package_data=True, | ||
options={"bdist_wheel": {"universal": True}}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__path__ = __import__('pkgutil').extend_path(__path__, __name__) |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from .privacy import PrivacyLevel | ||
|
||
|
||
__all__ = [ | ||
"PrivacyLevel" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from enum import Enum, auto | ||
|
||
|
||
class PrivacyLevel(Enum): | ||
"""Privacy level exposed to the end-user.""" | ||
HIGH_FIDELITY = auto() | ||
"""High fidelity""" | ||
HIGH_PRIVACY = auto() | ||
"""High privacy""" | ||
BALANCED_PRIVACY_FIDELITY = auto() | ||
"""Balanced privacy/fidelity""" | ||
|
||
def __str__(self): | ||
if self.value == self.HIGH_FIDELITY.value: | ||
return "High Fidelity" | ||
if self.value == self.HIGH_PRIVACY.value: | ||
return "High Privacy" | ||
if self.value == self.BALANCED_PRIVACY_FIDELITY.value: | ||
return "Balanced Privacy/Fidelity" | ||
return "N/D" |