-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathpyproject.toml
More file actions
152 lines (129 loc) · 2.95 KB
/
pyproject.toml
File metadata and controls
152 lines (129 loc) · 2.95 KB
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
[build-system]
requires = ["setuptools>=77.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "error-parity"
description = "Achieve error-rate parity between protected groups for any predictor"
license = "MIT"
license-files = ["LICENSE"]
authors = [
{ name = "AndreFCruz" },
]
# Keywords to be used by PyPI search
keywords = ["ml", "optimization", "fairness", "error-parity", "equal-odds"]
# PyPI classifiers, see https://pypi.org/classifiers/
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
requires-python = ">=3.9"
# These are defined below dynamically:
dynamic = [
"version",
"readme",
"dependencies",
"optional-dependencies",
]
[tool.setuptools.packages.find]
include = ["error_parity*"]
exclude = ["tests*"]
[tool.setuptools.dynamic]
version = { attr = "error_parity._version.__version__" }
readme = { file = "README.md", content-type = "text/markdown" }
# Main package dependencies
dependencies = {file = "requirements/main.txt"}
# Optional dependencies
[tool.setuptools.dynamic.optional-dependencies]
test = {file = "requirements/test.txt"}
dev = {file = "requirements/dev.txt"}
docs = {file = "requirements/docs.txt"}
all = {file = [
"requirements/dev.txt",
"requirements/test.txt",
"requirements/docs.txt",
]}
[project.urls]
homepage = "https://github.com/socialfoundations/error-parity"
# flake8
[tool.flake8]
max-complexity = 10
max-line-length = 120
per-file-ignores = """
# imported but unused
**/__init__.py: F401
"""
exclude = [
"docs/",
".tox/",
"build/",
"dist/",
]
[tool.pytest.ini_options]
minversion = "8.0"
testpaths = [
"tests",
]
# isort
[tool.isort]
profile = "hug"
force_single_line = false
src_paths = ["error_parity", "tests"]
# Coverage
[tool.coverage.run]
branch = true
source = ["error_parity"]
omit = ["error_parity/_version.py", "tests"]
[tool.coverage.report]
show_missing = true
# MyPy
[tool.mypy]
ignore_missing_imports = true
no_implicit_optional = false
strict_optional = false
exclude = [
"build",
"doc",
"tests",
"notebooks",
]
python_version = "3.11"
# Tox
[tool.tox]
legacy_tox_ini = """
[tox]
env_list =
py39
py310
py311
py312
lint
type
[testenv]
description = run unit tests
deps =
pytest>=8
coverage>=7
commands =
coverage erase
coverage run -m pytest {posargs:tests}
coverage report -m
[testenv:type]
description = run type checks
basepython = python3.11
deps =
mypy>=1.0
commands = mypy {posargs:error_parity}
[testenv:lint]
description = run linters
skip_install = true
deps =
flake8>=7.0
flake8-pyproject
commands = flake8 {posargs:error_parity tests}
"""