2222
2323
2424if sys .version_info >= (3 , 11 ):
25- sys .exit (" Sorry, Python >= 3.11 is not supported" )
25+ sys .exit (' Sorry, Python >= 3.11 is not supported' )
2626
2727
2828def select_constraint (default , nightly = None , git_master = None ):
29- """Select dependency constraint based on TFX_DEPENDENCY_SELECTOR env var."""
30- selector = os .environ .get ("TFX_DEPENDENCY_SELECTOR" )
31- if selector == "UNCONSTRAINED" :
32- return ""
33- elif selector == "NIGHTLY" and nightly is not None :
34- return nightly
35- elif selector == "GIT_MASTER" and git_master is not None :
36- return git_master
37- else :
38- return default
39-
40-
29+ """Select dependency constraint based on TFX_DEPENDENCY_SELECTOR env var."""
30+ selector = os .environ .get ('TFX_DEPENDENCY_SELECTOR' )
31+ if selector == 'UNCONSTRAINED' :
32+ return ''
33+ elif selector == 'NIGHTLY' and nightly is not None :
34+ return nightly
35+ elif selector == 'GIT_MASTER' and git_master is not None :
36+ return git_master
37+ else :
38+ return default
4139REQUIRED_PACKAGES = [
42- " tensorflow>=2.17,<2.18" ,
43- " tensorflow-hub>=0.16.1,<1.0.0" ,
44- " tensorflow-data-validation>=1.17.0,<2.0.0" ,
45- " tensorflow-model-analysis>=0.48.0,<0.49.0" ,
46- " witwidget>=1.4.4,<2" ,
47- " protobuf>=4.21.6,<6.0.0" ,
40+ ' tensorflow>=2.17,<2.18' ,
41+ ' tensorflow-hub>=0.16.1,<1.0.0' ,
42+ ' tensorflow-data-validation>=1.17.0,<2.0.0' ,
43+ ' tensorflow-model-analysis>=0.48.0,<0.49.0' ,
44+ ' witwidget>=1.4.4,<2' ,
45+ ' protobuf>=4.21.6,<6.0.0' ,
4846]
4947
5048TEST_PACKAGES = [
5149 "pytest>=8.3.0,<9" ,
5250]
5351
5452with open (Path ("./requirements-docs.txt" ).expanduser ().absolute ()) as f :
55- DOCS_PACKAGES = [req .replace ( " \n " , "" ) for req in f .readlines ()]
53+ DOCS_PACKAGES = [req .strip ( ) for req in f .readlines ()]
5654
5755# Get version from version module.
58- with open (" fairness_indicators/version.py" ) as fp :
59- globals_dict = {}
60- exec (fp .read (), globals_dict ) # pylint: disable=exec-used
61- __version__ = globals_dict [" __version__" ]
62- with open (" README.md" , "r" , encoding = " utf-8" ) as fh :
63- long_description = fh .read ()
56+ with open (' fairness_indicators/version.py' ) as fp :
57+ globals_dict = {}
58+ exec (fp .read (), globals_dict ) # pylint: disable=exec-used
59+ __version__ = globals_dict [' __version__' ]
60+ with open (' README.md' , 'r' , encoding = ' utf-8' ) as fh :
61+ long_description = fh .read ()
6462setuptools .setup (
65- name = " fairness_indicators" ,
63+ name = ' fairness_indicators' ,
6664 version = __version__ ,
67- description = " Fairness Indicators" ,
65+ description = ' Fairness Indicators' ,
6866 long_description = long_description ,
69- long_description_content_type = " text/markdown" ,
70- url = " https://github.com/tensorflow/fairness-indicators" ,
71- author = " Google LLC" ,
72- 73- packages = setuptools .find_packages (exclude = [" tensorboard_plugin" ]),
67+ long_description_content_type = ' text/markdown' ,
68+ url = ' https://github.com/tensorflow/fairness-indicators' ,
69+ author = ' Google LLC' ,
70+ 71+ packages = setuptools .find_packages (exclude = [' tensorboard_plugin' ]),
7472 package_data = {
75- " fairness_indicators" : [" documentation/*" ],
73+ ' fairness_indicators' : [' documentation/*' ],
7674 },
77- python_requires = " >=3.9,<4" ,
75+ python_requires = ' >=3.9,<4' ,
7876 install_requires = REQUIRED_PACKAGES ,
7977 tests_require = REQUIRED_PACKAGES ,
8078 extras_require = {
@@ -83,24 +81,25 @@ def select_constraint(default, nightly=None, git_master=None):
8381 },
8482 # PyPI package information.
8583 classifiers = [
86- " Development Status :: 4 - Beta" ,
87- " Intended Audience :: Developers" ,
88- " Intended Audience :: Education" ,
89- " Intended Audience :: Science/Research" ,
90- " License :: OSI Approved :: Apache Software License" ,
91- " Operating System :: OS Independent" ,
92- " Programming Language :: Python :: 3" ,
93- " Programming Language :: Python :: 3.9" ,
94- " Programming Language :: Python :: 3 :: Only" ,
95- " Topic :: Scientific/Engineering" ,
96- " Topic :: Scientific/Engineering :: Mathematics" ,
97- " Topic :: Scientific/Engineering :: Artificial Intelligence" ,
98- " Topic :: Software Development" ,
99- " Topic :: Software Development :: Libraries" ,
100- " Topic :: Software Development :: Libraries :: Python Modules" ,
84+ ' Development Status :: 4 - Beta' ,
85+ ' Intended Audience :: Developers' ,
86+ ' Intended Audience :: Education' ,
87+ ' Intended Audience :: Science/Research' ,
88+ ' License :: OSI Approved :: Apache Software License' ,
89+ ' Operating System :: OS Independent' ,
90+ ' Programming Language :: Python :: 3' ,
91+ ' Programming Language :: Python :: 3.9' ,
92+ ' Programming Language :: Python :: 3 :: Only' ,
93+ ' Topic :: Scientific/Engineering' ,
94+ ' Topic :: Scientific/Engineering :: Mathematics' ,
95+ ' Topic :: Scientific/Engineering :: Artificial Intelligence' ,
96+ ' Topic :: Software Development' ,
97+ ' Topic :: Software Development :: Libraries' ,
98+ ' Topic :: Software Development :: Libraries :: Python Modules' ,
10199 ],
102- license = " Apache 2.0" ,
100+ license = ' Apache 2.0' ,
103101 keywords = (
104- "tensorflow model analysis fairness indicators tensorboard machine learning"
102+ 'tensorflow model analysis fairness indicators tensorboard machine'
103+ ' learning'
105104 ),
106105)
0 commit comments