-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
153 lines (135 loc) · 2.77 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
[project]
name = "calidhayte"
version = "2.1.0dev"
requires-python = ">=3.11"
description = "Calibrate raw measurements against reference measurements using one or more variables"
authors = [
{name="Idris Hayward", email="[email protected]"}
]
license = { file = "LICENSE" }
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Operating System :: OS Independent"
]
readme = "README.md"
keywords = ["calibration", "errors", "slope", "offset", "deviation"]
dependencies = [
'numpy ~= 1.25',
'pandas ~= 2.1',
'scikit-learn ~= 1.3',
'bambi ~= 0.13',
'shap ~= 0.43',
'xgboost ~= 2.0',
'matplotlib ~= 3.8'
]
[build-system]
requires = ["setuptools>=42.0", "wheel"]
build-backend = "setuptools.build_meta"
[tool.ruff]
extend-include = ["*.ipynb"]
line-length = 79
indent-width = 4
[tool.ruff.lint]
select = [
"F", # pyflakes: General
"E", # pycodestyle: General errors
"W", # pycodestyle: General warnings
"N", # pep8-naming: Use proper names
"RUF", # Ruff-specific-rules: Extra rules
"T20", # flake8-print: No print statements, use logging!"
]
ignore = [
"Q000",
"Q001",
"N802",
"N806",
]
exclude = [
"__pycache__",
"env",
".env",
"venv",
".venv",
]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.per-file-ignores]
"tests/*.py" = [
"D100",
"D101",
"D102",
"D103",
"D104",
"D105",
"D106",
"D107",
"S101", # use of "assert"
"S102", # use of "exec"
"S106", # possible hardcoded password.
"T20"
]
[tool.black]
line-length = 79
include = '\.pyi?$'
[tool.pytest.ini_options]
testpaths = [
"tests"
]
markers = [
"plots",
"cal",
"results",
"summary"
]
addopts = [
"--html=reports/tests/index.html",
"--self-contained-html",
"--cov=calidhayte",
"--cov-report=html:reports/coverage/",
"--cov-report=term-missing",
"--cov-fail-under=95"
]
[tool.mypy]
mypy_path = "src"
check_untyped_defs = true
disallow_any_generics = true
ignore_missing_imports = true
no_implicit_optional = true
show_error_codes = true
strict_equality = true
warn_redundant_casts = true
warn_return_any = true
warn_unreachable = true
warn_unused_configs = true
no_implicit_reexport = true
[tool.tox]
legacy_tox_ini = """
[tox]
minversion = 4.0
envlist = py311, py312, ruff, mypy
isolated_build = true
allowlist_externals = ruff
[gh-actions]
python =
3.11: py311
3.12: py312, mypy, flake8
[testenv]
setenv =
PYTHONPATH = {toxinidir}
deps =
-r{toxinidir}/requirements.txt
commands =
pytest --basetemp={envtmpdir}
[testenv:ruff]
basepython = python3.12
deps = -r requirements.txt
commands = ruff check src tests
[testenv:mypy]
basepython = python3.12
deps = -r requirements.txt
commands = mypy src
"""
[tool.pyright]
venvPath = ""
venv = ".venv"