-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
247 lines (226 loc) · 7.32 KB
/
pyproject.toml
File metadata and controls
247 lines (226 loc) · 7.32 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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
[project]
name = "yohou"
dynamic = ["version"]
description = "A time series forecasting package based on Scikit-Learn and Polars"
readme = "README.md"
maintainers = [
{ name = "Guillaume Tauzin", email = "gtauzin@stateful-y.io" }
]
authors = [
{ name = "Guillaume Tauzin", email = "gtauzin@stateful-y.io" }
]
license = { text = "Apache-2.0" }
requires-python = ">=3.11"
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
dependencies = [
"scikit-learn>=1.6.0",
"sklearn-wrap",
"scipy>=1.13",
"polars>=0.20",
"plotly>=5.19",
"pydantic>=2.6",
"pyarrow>=14.0.0",
]
[project.optional-dependencies]
plotting = ["statsmodels>=0.14"]
[dependency-groups]
dev = [
{include-group = "tests"},
{include-group = "lint"},
{include-group = "docs"},
{include-group = "fix"},
]
tests = [
"pytest>=8.3",
"pytest-cov>=7.0",
"pytest-mock>=3.14",
"pytest-xdist>=3.8",
"covdefaults>=2.3",
"hypothesis>=6.100",
"statsmodels>=0.14",
]
lint = [
"ruff>=0.8.0",
"ty>=0.0.12",
]
docs = [
"mkdocs>=1.6.0",
"mkdocs-autorefs>=1.0",
"mkdocs-material>=9.7",
"mkdocstrings[python]>=0.26.0",
"pymdown-extensions>=10.20.1",
{include-group = "examples"},
]
fix = [
"pre-commit-uv>=4.1",
]
examples = [
"marimo>=0.19.0",
"catboost>=1.2",
"statsmodels>=0.14",
"yohou-optuna",
"yohou-nixtla; python_version < '3.14'",
]
[project.urls]
Homepage = "https://github.com/stateful-y/yohou"
Documentation = "https://yohou.readthedocs.io"
Repository = "https://github.com/stateful-y/yohou"
"Bug Tracker" = "https://github.com/stateful-y/yohou/issues"
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/yohou"]
[tool.hatch.version]
source = "vcs"
fallback-version = "0.0.0"
[tool.hatch.build.hooks.vcs]
version-file = "src/yohou/_version.py"
[tool.ruff]
line-length = 120
target-version = "py311"
src = ["src", "tests"]
show-fixes = true
exclude = ["src/yohou/_version.py", "examples/"]
[tool.ruff.format]
preview = true
docstring-code-format = true
docstring-code-line-length = 100
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"ARG", # flake8-unused-arguments
"SIM", # flake8-simplify
"PL", # Pylint
"T201", # Print statement
]
ignore = [
"E203", # space before : (needed for how black formats slicing)
"E501", # line too long (handled by formatter)
"B008", # do not perform function calls in argument defaults
"PLR0913", # too many args in func def
"PLR0915", # too many statements
"PLR0912", # too many branches
"PLR2004", # magic value used in comparison
"ARG001", # unused function argument
"ARG002", # unused method argument (common in sklearn-style APIs)
"PLR0911", # too many return statements
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*" = ["ARG", "S101", "T201", "PLR2004", "PLC0415"] # Allow assert statements, prints, magic values, and imports not at the top
"docs/**/*" = ["T201", "ARG001", "PLW0603", "SIM105", "SIM108"] # Allow prints, unused args, globals, and simplifiable patterns in documentation hooks
[tool.ruff.lint.isort]
known-first-party = ["yohou"]
[tool.interrogate]
ignore-init-method = true
ignore-init-module = true
ignore-magic = false
ignore-semiprivate = false
ignore-private = false
ignore-property-decorators = false
ignore-module = false
ignore-nested-functions = false
ignore-nested-classes = true
ignore-setters = false
fail-under = 100
exclude = ["setup.py", "docs", "build", "tests", "*_version.py"]
ignore-regex = ["^get$", "^mock_.*", ".*BaseClass.*"]
verbose = 0
quiet = false
whitelist-regex = []
color = true
omit-covered-files = false
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = [
"--strict-markers",
"--strict-config",
"--color=yes",
"--cov=yohou",
"--cov-report=term-missing:skip-covered",
"--cov-report=html",
"--cov-report=xml",
"--doctest-modules",
"--doctest-continue-on-failure",
]
markers = [
"integration: marks tests as integration tests that run subprocesses (deselect with '-m \"not integration\"')",
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"example: marks tests for example notebooks (deselect with '-m \"not example\"')",
]
filterwarnings = [
"ignore:With alpha=0, this algorithm does not converge well:UserWarning",
"ignore:Coordinate descent with no regularization may lead to unexpected results:UserWarning",
"ignore:Objective did not converge:sklearn.exceptions.ConvergenceWarning",
"ignore:n_quantiles .* is greater than the total number of samples:UserWarning",
"ignore:invalid value encountered in scalar multiply:RuntimeWarning",
"ignore:An ill-conditioned matrix detected:scipy.linalg.LinAlgWarning",
"ignore:An ill-conditioned matrix detected:scipy.linalg._misc.LinAlgWarning",
]
[tool.coverage.paths]
source = ["src/yohou"]
[tool.coverage.run]
source = ["yohou"]
branch = true
parallel = true
sigterm = true
concurrency = ["multiprocessing"]
plugins = ["covdefaults"]
omit = [
"*/tests/*",
"*/__pycache__/*",
"*/_version.py",
]
[tool.coverage.report]
precision = 2
show_missing = true
skip_covered = false
fail_under = 80
include_namespace_packages = true
[tool.coverage.html]
[tool.rumdl]
flavor = "mkdocs"
line-length = 120
disable = [
"MD012", # Multiple consecutive blank lines (common in generated content)
"MD013", # Line length (handled by formatter, many long URLs/tables)
"MD022", # Heading blank lines (varies by document style)
"MD031", # No blank line before fenced code block
"MD032", # List should be preceded by blank line
"MD033", # Inline HTML (needed for README logo, MkDocs grid cards)
"MD034", # URL/email without angle brackets
"MD045", # Image missing alt text (logos use empty alt intentionally)
"MD046", # Code block style (indented blocks required inside MkDocs tabs)
"MD051", # Link fragments (cross-doc references resolved at MkDocs build time)
]
exclude = ["CHANGELOG.md", "site", "htmlcov", ".nox", ".venv"]
[tool.rumdl.per-file-ignores]
# MD057 (relative links) suppressed for pages with links to build-time generated files.
# These links are validated post-build by linkchecker (nox -s link_docs).
"docs/pages/api/*.md" = ["MD001", "MD057"] # mkdocstrings generates heading levels and files at build time
"docs/pages/getting-started/installation.md" = ["MD057"] # Links to not-yet-created extensions page
".github/PULL_REQUEST_TEMPLATE.md" = ["MD041"] # PR template starts with checklist
"README.md" = ["MD041"] # README starts with logo, not heading
"docs/index.md" = ["MD041"] # Landing page starts with logo, not heading
"CONTRIBUTING.md" = ["MD057"] # Relative link to docs/ is valid at project level
[tool.commitizen]
name = "cz_conventional_commits"
version_scheme = "semver"
version_provider = "scm"
update_changelog_on_bump = false
major_version_zero = true
tag_format = "v$version"