Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
209 lines (195 loc) · 5.58 KB
/
Copy pathpyproject.toml
File metadata and controls
209 lines (195 loc) · 5.58 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
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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
[project]
name = "nonconform"
dynamic = ["version"]
description = "Conformal Anomaly Detection"
authors = [
{ name = "Oliver Hennhoefer", email = "oliver.hennhoefer@mail.de" },
]
maintainers = [
{ name = "Oliver Hennhoefer", email = "oliver.hennhoefer@mail.de" }
]
license = { file = "LICENSE" }
readme = { file = "README.md", content-type = "text/markdown" }
keywords = [
"conformal inference",
"anomaly detection",
"uncertainty quantification",
"false discovery rate",
"conformal anomaly detection"
]
classifiers = [
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Information Analysis",
"Typing :: Typed"
]
requires-python = ">=3.12"
dependencies = [
"numpy>=2.2.0",
"pandas>=2.2.2",
"scikit-learn>=1.5.2",
"scipy>=1.13.0",
"tqdm>=4.66.2",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.version]
path = "nonconform/__init__.py"
# pyproject.toml
[tool.hatch.build.targets.sdist]
include = ["nonconform", "README.md", "LICENSE", "pyproject.toml"]
exclude = [".uv-cache", ".venv", "dist", "docs/site", ".pytest_cache", ".ruff_cache", "__pycache__"]
[tool.hatch.build.targets.wheel]
packages = ["nonconform"]
[project.optional-dependencies]
pyod = [
"pyod>=2.0.7,<4",
]
data = [
"oddball>=1.3.0",
"pyarrow>=16.1.0",
]
fdr = [
"online-fdr>=1.0.0",
]
probabilistic = [
"optuna>=4.5.0",
"kdepy>=1.1.12",
]
all = [
"pyod>=2.0.7,<4",
"oddball>=1.3.0",
"pyarrow>=16.1.0",
"online-fdr>=1.0.0",
"optuna>=4.5.0",
"kdepy>=1.1.12",
]
[dependency-groups]
dev = [
"pytest",
"pytest-cov",
"ruff",
"pre-commit",
"twine",
"build",
"zensical",
"mkdocstrings-python",
"scipy-stubs==1.16.3.0",
"oddball>=1.4.0",
"pyod>=2.0.7,<4",
"optuna>=4.5.0",
"kdepy>=1.1.12",
]
[project.urls]
"Homepage" = "https://github.com/OliverHennhoefer/nonconform"
"Documentation" = "https://oliverhennhoefer.github.io/nonconform/"
"Bugs" = "https://github.com/OliverHennhoefer/nonconform/issues"
[tool.ruff]
line-length = 88
target-version = "py312"
src = [
"nonconform", # Specify your source directory explicitly
"tests", # Add your tests directory
"examples", # Add your examples directory
"." # For files in root like pyproject.toml, conf.py if not in a subdir
]
include = [
"*.py",
"*.pyi",
"*.ipynb",
"pyproject.toml", # Ruff can lint pyproject.toml
]
exclude = [
"*.md",
"paper.bib",
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
"docs/build", # Exclude Sphinx build output
"docs/source/api", # Exclude autoapi generated files from direct linting by Ruff
# as their source is Python docstrings.
]
[tool.ruff.lint.per-file-ignores]
"docs/source/conf.py" = [
"D100", # Missing docstring in public module
"E402" # Module level import not at top of file (sys.path.insert)
]
"examples/**/*.py" = [ # Allow more relaxed rules for examples
"D100", "D103", "D101", "D102", "D104", "D105", "D107",
"E501", # Line too long, common in example plots/data
"N803" # Uppercase X is ML convention for data matrices
]
"tests/**/*.py" = [ # Allow more relaxed rules for tests
"D100", "D101", "D102", "D103", "D104", "D105", "D107",
"S101", # assert allowed in tests
"N803", # Uppercase X is ML convention for data matrices
"N806" # Same - uppercase X for local variables in tests
]
[tool.ruff.lint]
preview = true
select = [
"E", # pycodestyle errors
"F", # Pyflakes
"W", # pycodestyle warnings
"I", # isort (import order)
"D", # pydocstyle (docstrings)
"UP", # pyupgrade (modernize Python code)
"N", # pep8-naming
"Q", # flake8-quotes
"RUF", # Ruff-specific rules (includes some for Markdown, e.g. RUF200 for bad header increases)
"RUF059", # Explicitly enable RUF059 (not included in the default RUF group)
"NPY" # NumPy-specific rules, for idiomatic NumPy code
]
ignore = [
"D104", # Missing docstring in public package (for __init__.py files)
"D107", # Missing docstring in __init__
"D203", # 1 blank line required before class docstring (conflicts with D211)
"D212", # Multi-line docstring summary should start at the first line
"D213", # Multi-line docstring summary should start at the second line (conflicts with D212, pick one or use formatter)
"D402", # First line of docstring should not be the function's signature
"D415", # Ends in ".", "?", "!" (can be too strict)
"N803", # Uppercase X is ML convention for data matrices (sklearn compatible)
]
fixable = [
"ALL"
]
unfixable = []
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
docstring-code-format = true
docstring-code-line-length = "dynamic"