forked from Paige-AI/paige-ml-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
182 lines (170 loc) · 3.83 KB
/
pyproject.toml
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
[build-system]
requires = [
"setuptools >= 65.2.0",
"wheel",
]
build-backend = "setuptools.build_meta"
[project]
name = "paige-ml-sdk"
description = "Paige ml-sdk library"
readme = "README.md"
authors = [
{name = "Paige AI", email = "[email protected]"}
]
license = {file = "LICENSE.txt"}
requires-python = ">=3.10"
classifiers = [
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Operating System :: OS Independent",
]
dependencies = [
"numpy~=1.24",
"jsonargparse[signatures]",
"lightning~=2.1",
"torch>=2.1,<2.3",
"pandas>=2.0,<3",
"environs>=9.3,<12",
"scikit-learn~=1.1",
]
dynamic = ["version"]
[tool.setuptools.dynamic]
version = {attr = "paige.ml_sdk.version.__version__"}
[project.optional-dependencies]
all = [
"paige-ml-sdk[test]",
]
wandb = [
"wandb==0.16.2"
]
test = [
"black>=22.12,<25",
"flake8>=6.0,<8",
"flake8-pyproject>=1.1",
"flake8-future-import>=0.4",
"flake8-quotes~=3.3",
"hypothesis>=6.36",
"isort~=5.11",
"mypy>=0.961",
"pytest>=7.1",
"pytest-cov>=3.0",
"unify>=0.5"
]
[tool.pytest.ini_options]
# Specifying `testpaths = ["tests"]` would exclude doctests
testpaths = ["tests", "src"]
addopts = """
--doctest-modules
--durations=10 --durations-min=1.0
"""
markers = [
"gpu: tests that rely only on the gpu.",
"integration: integration tests but rely only on the cpu.",
"integration_gpu: integration tests that require a gpu.",
"non_ci: tests that can't run on CI, for now. (deselect with '-m \"not non_ci\"')",
]
[tool.coverage.run]
branch = true
concurrency = ["multiprocessing", "thread"]
parallel = true
source = ["src/"] # exclude pytest fixtures from other libs
omit = [
"**/*/venv/*",
"**/*/.git/*"
]
[tool.coverage.report]
show_missing = true
skip_covered = true
sort = "cover"
omit = [
"**/*/venv/*",
"**/*/.git/*"
]
[tool.black]
line-length = 100
skip-string-normalization = 1
target-version = ['py38']
[tool.isort]
line_length = 100
profile = "black"
multi_line_output = 3
skip_glob = [
'*.git/*'
]
[tool.flake8]
max-line-length = 100
select = [
"C",
"E",
"F",
"W",
"B",
"B950",
"B902",
"Q0",
"ABS101"
]
ignore = [
"D203", # ignore 1 blank line required before class docstring
"E203", # ignore whitespace before ':'
"E501", # ignore line length too long
"E704", # multiple statements on one line (def)
"W503", # line break occurred before a binary operator
"FI10", # disallow future import via flake8-future-imports
"FI11",
"FI12",
"FI13",
"FI14",
"FI15",
"FI16",
"FI17",
"FI18"
]
inline-quotes = "single"
multiline-quotes = "'''"
docstring-quotes = '"""'
exclude = [
"build/*",
"dist/*",
".eggs/*",
".venv/*",
".git/*"
]
[tool.mypy]
mypy_path = "src/"
plugins = "numpy.typing.mypy_plugin"
# in order for mypy to recognise "paige" as a namespace package
namespace_packages = true
explicit_package_bases = true
# if another library is not type hinted, let's ignore it
ignore_missing_imports = true
show_column_numbers = true
# mirroring --strict
# NOTE: this is not a final configuration discussion on what to type check will always be welcomed
warn_unused_configs = true
# TODO: type hint Any generics
#disallow_any_generics = true
disallow_subclassing_any = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
# as long as we have non-type hinted dependencies we cannot enable this
#disallow_untyped_decorators = true
no_implicit_optional = true
warn_redundant_casts = true
warn_return_any = true
strict_equality = true
exclude = [
]
[[tool.mypy.overrides]]
module = [
"torch.cuda.*"
]
follow_imports = "skip"
follow_imports_for_stubs = true
[[tool.mypy.overrides]]
module = [
"torch",
"torch.*"
]
implicit_reexport = false