-
Notifications
You must be signed in to change notification settings - Fork 115
/
setup.py
82 lines (69 loc) · 2.42 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
import re
from pathlib import Path
from setuptools import find_packages, setup
ROOT_PATH = Path(__file__).parent
LICENSE_PATH = ROOT_PATH / "LICENSE"
README_PATH = ROOT_PATH / "README.md"
REQUIREMENTS = {
f"{req}": ROOT_PATH / "requirements" / f"{req}.txt"
for req in ["main", "webapp", "cli"]
}
with open(ROOT_PATH / "src/aequitas/version.py", "r") as version_file:
version = re.search(r'__version__ = "(.*?)"', version_file.read()).group(1)
long_description = README_PATH.read_text()
def stream_requirements(fd):
"""For a given requirements file descriptor, generate lines of
distribution requirements, ignoring comments and chained requirement
files.
"""
for line in fd:
cleaned = re.sub(r"#.*$", "", line).strip()
if cleaned and not cleaned.startswith("-r"):
yield cleaned
for req, path in REQUIREMENTS.items():
with path.open() as requirements_file:
REQUIREMENTS[req] = list(stream_requirements(requirements_file))
setup(
name="aequitas",
version=version,
description="The bias and fairness audit toolkit.",
long_description=long_description,
long_description_content_type="text/markdown",
author="Center for Data Science and Public Policy",
author_email="[email protected]",
url="https://github.com/dssg/aequitas",
packages=find_packages("src", exclude=["tests", "tests.*"]),
package_dir={"": "src"},
include_package_data=True,
package_data={
"": [
"flow/plots/pareto/template.html",
"flow/plots/pareto/js/dist/fairAutoML.js",
]
},
install_requires=REQUIREMENTS["main"],
extras_require={
"webapp": REQUIREMENTS["webapp"],
"cli": REQUIREMENTS["cli"],
},
license="MIT",
zip_safe=False,
keywords="fairness bias aequitas",
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
],
entry_points={
"console_scripts": [
"aequitas-report=aequitas_cli.aequitas_audit:main",
],
},
)