|
26 | 26 |
|
27 | 27 |
|
28 | 28 | if sys.version_info >= (3, 11): |
29 | | - sys.exit("Sorry, Python >= 3.11 is not supported") |
| 29 | + sys.exit('Sorry, Python >= 3.11 is not supported') |
30 | 30 |
|
31 | 31 |
|
32 | 32 | def select_constraint(default, nightly=None, git_master=None): |
33 | | - """Select dependency constraint based on TFX_DEPENDENCY_SELECTOR env var.""" |
34 | | - selector = os.environ.get("TFX_DEPENDENCY_SELECTOR") |
35 | | - if selector == "UNCONSTRAINED": |
36 | | - return "" |
37 | | - elif selector == "NIGHTLY" and nightly is not None: |
38 | | - return nightly |
39 | | - elif selector == "GIT_MASTER" and git_master is not None: |
40 | | - return git_master |
41 | | - else: |
42 | | - return default |
43 | | - |
| 33 | + """Select dependency constraint based on TFX_DEPENDENCY_SELECTOR env var.""" |
| 34 | + selector = os.environ.get('TFX_DEPENDENCY_SELECTOR') |
| 35 | + if selector == 'UNCONSTRAINED': |
| 36 | + return '' |
| 37 | + elif selector == 'NIGHTLY' and nightly is not None: |
| 38 | + return nightly |
| 39 | + elif selector == 'GIT_MASTER' and git_master is not None: |
| 40 | + return git_master |
| 41 | + else: |
| 42 | + return default |
44 | 43 |
|
45 | 44 | REQUIRED_PACKAGES = [ |
46 | | - "protobuf>=3.20.3,<5", |
47 | | - "tensorboard>=2.16.2,<2.17.0", |
48 | | - "tensorflow>=2.16,<2.17", |
49 | | - "tf-keras>=2.16,<2.17", |
50 | | - "tensorflow-model-analysis>=0.47,<0.48", |
51 | | - "werkzeug<2", |
| 45 | + 'protobuf>=3.20.3,<5', |
| 46 | + 'tensorboard>=2.16.2,<2.17.0', |
| 47 | + 'tensorflow>=2.16,<2.17', |
| 48 | + 'tf-keras>=2.16,<2.17', |
| 49 | + 'tensorflow-model-analysis>=0.47,<0.48', |
| 50 | + 'werkzeug<2', |
52 | 51 | ] |
53 | 52 |
|
54 | 53 | TEST_PACKAGES = [ |
55 | | - "pytest", |
| 54 | + 'pytest', |
56 | 55 | ] |
57 | 56 |
|
58 | | -with open("README.md", "r", encoding="utf-8") as fh: |
59 | | - long_description = fh.read() |
| 57 | +with open('README.md', 'r', encoding='utf-8') as fh: |
| 58 | + long_description = fh.read() |
60 | 59 |
|
61 | 60 | # Get version from version module. |
62 | | -with open("tensorboard_plugin_fairness_indicators/version.py") as fp: |
63 | | - globals_dict = {} |
64 | | - exec(fp.read(), globals_dict) # pylint: disable=exec-used |
65 | | -__version__ = globals_dict["__version__"] |
| 61 | +with open('tensorboard_plugin_fairness_indicators/version.py') as fp: |
| 62 | + globals_dict = {} |
| 63 | + exec(fp.read(), globals_dict) # pylint: disable=exec-used |
| 64 | +__version__ = globals_dict['__version__'] |
66 | 65 |
|
67 | 66 | setup( |
68 | | - name="tensorboard_plugin_fairness_indicators", |
| 67 | + name='tensorboard_plugin_fairness_indicators', |
69 | 68 | version=__version__, |
70 | | - description="Fairness Indicators TensorBoard Plugin", |
| 69 | + description='Fairness Indicators TensorBoard Plugin', |
71 | 70 | long_description=long_description, |
72 | | - long_description_content_type="text/markdown", |
73 | | - url="https://github.com/tensorflow/fairness-indicators", |
74 | | - author="Google LLC", |
75 | | - |
| 71 | + long_description_content_type='text/markdown', |
| 72 | + url='https://github.com/tensorflow/fairness-indicators', |
| 73 | + author='Google LLC', |
| 74 | + |
76 | 75 | packages=find_packages(), |
77 | 76 | package_data={ |
78 | | - "tensorboard_plugin_fairness_indicators": ["static/**"], |
| 77 | + 'tensorboard_plugin_fairness_indicators': ['static/**'], |
79 | 78 | }, |
80 | 79 | entry_points={ |
81 | | - "tensorboard_plugins": [ |
82 | | - "fairness_indicators = tensorboard_plugin_fairness_indicators.plugin:FairnessIndicatorsPlugin", |
| 80 | + 'tensorboard_plugins': [ |
| 81 | + 'fairness_indicators = tensorboard_plugin_fairness_indicators.plugin:FairnessIndicatorsPlugin', |
83 | 82 | ], |
84 | 83 | }, |
85 | | - python_requires=">=3.9,<4", |
| 84 | + python_requires='>=3.9,<4', |
86 | 85 | install_requires=REQUIRED_PACKAGES, |
87 | 86 | tests_require=REQUIRED_PACKAGES, |
88 | 87 | extras_require={ |
89 | | - "test": TEST_PACKAGES, |
| 88 | + 'test': TEST_PACKAGES, |
90 | 89 | }, |
91 | 90 | classifiers=[ |
92 | | - "Development Status :: 4 - Beta", |
93 | | - "Intended Audience :: Developers", |
94 | | - "Intended Audience :: Education", |
95 | | - "Intended Audience :: Science/Research", |
96 | | - "License :: OSI Approved :: Apache Software License", |
97 | | - "Operating System :: OS Independent", |
98 | | - "Programming Language :: Python :: 3", |
99 | | - "Programming Language :: Python :: 3.9", |
100 | | - "Programming Language :: Python :: 3 :: Only", |
101 | | - "Topic :: Scientific/Engineering", |
102 | | - "Topic :: Scientific/Engineering :: Mathematics", |
103 | | - "Topic :: Scientific/Engineering :: Artificial Intelligence", |
104 | | - "Topic :: Software Development", |
105 | | - "Topic :: Software Development :: Libraries", |
106 | | - "Topic :: Software Development :: Libraries :: Python Modules", |
| 91 | + 'Development Status :: 4 - Beta', |
| 92 | + 'Intended Audience :: Developers', |
| 93 | + 'Intended Audience :: Education', |
| 94 | + 'Intended Audience :: Science/Research', |
| 95 | + 'License :: OSI Approved :: Apache Software License', |
| 96 | + 'Operating System :: OS Independent', |
| 97 | + 'Programming Language :: Python :: 3', |
| 98 | + 'Programming Language :: Python :: 3.9', |
| 99 | + 'Programming Language :: Python :: 3 :: Only', |
| 100 | + 'Topic :: Scientific/Engineering', |
| 101 | + 'Topic :: Scientific/Engineering :: Mathematics', |
| 102 | + 'Topic :: Scientific/Engineering :: Artificial Intelligence', |
| 103 | + 'Topic :: Software Development', |
| 104 | + 'Topic :: Software Development :: Libraries', |
| 105 | + 'Topic :: Software Development :: Libraries :: Python Modules', |
107 | 106 | ], |
108 | | - license="Apache 2.0", |
109 | | - keywords="tensorflow model analysis fairness indicators tensorboard machine learning", |
| 107 | + license='Apache 2.0', |
| 108 | + keywords='tensorflow model analysis fairness indicators tensorboard machine learning', |
110 | 109 | ) |
0 commit comments