22
22
23
23
24
24
if 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' )
26
26
27
27
28
28
def 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
41
39
REQUIRED_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' ,
48
46
]
49
47
50
48
TEST_PACKAGES = [
51
49
"pytest>=8.3.0,<9" ,
52
50
]
53
51
54
52
with 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 ()]
56
54
57
55
# 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 ()
64
62
setuptools .setup (
65
- name = " fairness_indicators" ,
63
+ name = ' fairness_indicators' ,
66
64
version = __version__ ,
67
- description = " Fairness Indicators" ,
65
+ description = ' Fairness Indicators' ,
68
66
long_description = long_description ,
69
- long_description_content_type = " text/markdown" ,
70
- url = " https://github.com/tensorflow/fairness-indicators" ,
71
- author = " Google LLC" ,
72
- author_email = " packages@tensorflow.org" ,
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
+ author_email = ' packages@tensorflow.org' ,
71
+ packages = setuptools .find_packages (exclude = [' tensorboard_plugin' ]),
74
72
package_data = {
75
- " fairness_indicators" : [" documentation/*" ],
73
+ ' fairness_indicators' : [' documentation/*' ],
76
74
},
77
- python_requires = " >=3.9,<4" ,
75
+ python_requires = ' >=3.9,<4' ,
78
76
install_requires = REQUIRED_PACKAGES ,
79
77
tests_require = REQUIRED_PACKAGES ,
80
78
extras_require = {
@@ -83,24 +81,25 @@ def select_constraint(default, nightly=None, git_master=None):
83
81
},
84
82
# PyPI package information.
85
83
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' ,
101
99
],
102
- license = " Apache 2.0" ,
100
+ license = ' Apache 2.0' ,
103
101
keywords = (
104
- "tensorflow model analysis fairness indicators tensorboard machine learning"
102
+ 'tensorflow model analysis fairness indicators tensorboard machine'
103
+ ' learning'
105
104
),
106
105
)
0 commit comments