setup.py 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #!/usr/bin/env python
  2. import os
  3. from setuptools import setup
  4. pwd = os.path.abspath(os.path.dirname(__file__))
  5. INSTALL_REQUIRES = [
  6. 'numpy >= 1.14.3',
  7. 'matplotlib >= 2.2.2',
  8. 'mako ==1.0.12',
  9. 'pandas >= 0.24.2',
  10. 'scikit-learn >= 0.20.2',
  11. 'pytest >= 4.6.2',
  12. 'python-dateutil >= 2.7.3',
  13. 'setuptools >= 39.1.0'
  14. ]
  15. LONG_DESCRIPTION = """
  16. The recent enforcement of data privacy protection regulations, such as GDPR,
  17. has made data sharing more difficult. This tool intends to facilitate data
  18. sharing from a customer by synthesizing a dataset based on the original dataset
  19. for later machine learning.
  20. There are two parts to this tool:
  21. - Data synthesizer
  22. Synthesize a dataset based on the original dataset. It accepts CSV data as
  23. input, and output a synthesized dataset based on Differential Privacy. The
  24. algorithm in the data synthesizer reference to the paper (
  25. http://dimacs.rutgers.edu/~graham/pubs/papers/privbayes-tods.pdf).
  26. - Data utility evaluation
  27. Evaluate the data utility for the synthesized dataset. The original dataset
  28. and the synthesized dataset as the input, one utility evaluation report will
  29. be generated with several indicators.
  30. """
  31. about = {}
  32. with open(os.path.join(pwd, 'ds4ml', '__version__.py'), mode='r',
  33. encoding='utf-8') as f:
  34. exec(f.read(), about)
  35. def main():
  36. setup(name=about['__title__'],
  37. description=about['__description__'],
  38. long_description=LONG_DESCRIPTION,
  39. long_description_content_type='text/markdown',
  40. url=about['__url__'],
  41. project_urls={
  42. "Bug Tracker": about['__url__'] + "/issues",
  43. "Documentation": about['__url__'],
  44. "Source Code": about['__url__'],
  45. },
  46. version=about['__version__'],
  47. packages=['ds4ml', 'ds4ml.command'],
  48. package_data={
  49. '': ['template/*.html']
  50. },
  51. entry_points={
  52. 'console_scripts': [
  53. 'data-pattern = ds4ml.command.pattern:main',
  54. 'data-synthesize = ds4ml.command.synthesize:main',
  55. 'data-evaluate = ds4ml.command.evaluate:main'
  56. ]
  57. },
  58. maintainer=about['__maintainer__'],
  59. maintainer_email=about['__maintainer_email__'],
  60. install_requires=INSTALL_REQUIRES,
  61. platform='any')
  62. if __name__ == '__main__':
  63. main()