-
Notifications
You must be signed in to change notification settings - Fork 8
/
pyproject.toml
204 lines (191 loc) · 7.37 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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
[tool.poetry]
name = "sequentia"
version = "2.0.2"
license = "MIT"
authors = ["Edwin Onuonga <ed@eonu.net>"]
maintainers = ["Edwin Onuonga <ed@eonu.net>"]
description = "Scikit-Learn compatible HMM and DTW based sequence machine learning algorithms in Python."
readme = "README.md"
homepage = "https://github.com/eonu/sequentia"
repository = "https://github.com/eonu/sequentia"
documentation = "https://sequentia.readthedocs.io/en/latest"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Framework :: Pydantic :: 2",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
keywords = [
"python",
"machine-learning",
"time-series",
"hmm",
"hidden-markov-models",
"dtw",
"dynamic-time-warping",
"knn",
"k-nearest-neighbors",
"sequence-classification",
"time-series-classification",
"multivariate-time-series",
"variable-length",
"classification-algorithms",
]
packages = [{ include = "sequentia" }]
include = [
"sequentia",
"make",
"tests",
"CHANGELOG.md",
"LICENSE",
"Makefile",
"pyproject.toml",
"README.md",
"tasks.py",
"tox.ini",
]
[build-system]
requires = ['poetry-core~=1.0', 'Cython>=0.28.5']
build-backend = 'poetry.core.masonry.api'
[tool.poetry.dependencies]
python = "^3.11"
numba = ">=0.56,<1"
numpy = "^1.19.5"
hmmlearn = ">=0.2.8,<1"
dtaidistance = "^2.3.10"
scikit-learn = "^1.4"
scipy = "^1.6"
joblib = "^1.2"
pydantic = "^2"
[tool.poetry.group.base.dependencies]
invoke = "2.2.0"
tox = "4.11.3"
[tool.poetry.group.dev.dependencies]
pre-commit = ">=3"
[tool.poetry.group.lint.dependencies]
ruff = "0.1.3"
pydoclint = "0.3.8"
[tool.poetry.group.docs.dependencies]
sphinx = { version = "^7.2.4" }
# numpydoc = { version = "^1.6" }
sphinx-autobuild = { version = "^2021.3.14" }
enum-tools = { version = ">=0.11,<1", extras = ["sphinx"] }
[tool.poetry.group.tests.dependencies]
pytest = { version = "^7.4.0" }
pytest-cov = { version = "^4.1.0" }
[tool.ruff]
required-version = "0.1.3"
select = [
"F", # pyflakes: https://pypi.org/project/pyflakes/
"E", # pycodestyle (error): https://pypi.org/project/pycodestyle/
"W", # pycodestyle (warning): https://pypi.org/project/pycodestyle/
"I", # isort: https://pypi.org/project/isort/
"N", # pep8-naming: https://pypi.org/project/pep8-naming/
"D", # pydocstyle: https://pypi.org/project/pydocstyle/
"UP", # pyupgrade: https://pypi.org/project/pyupgrade/
"YTT", # flake8-2020: https://pypi.org/project/flake8-2020/
"ANN", # flake8-annotations: https://pypi.org/project/flake8-annotations/
"S", # flake8-bandit: https://pypi.org/project/flake8-bandit/
"BLE", # flake8-blind-except: https://pypi.org/project/flake8-blind-except/
"FBT", # flake8-boolean-trap: https://pypi.org/project/flake8-boolean-trap/
"B", # flake8-bugbear: https://pypi.org/project/flake8-bugbear/
"A", # flake8-builtins: https://pypi.org/project/flake8-builtins/
"COM", # flake8-commas: https://pypi.org/project/flake8-commas/
"C4", # flake8-comprehensions: https://pypi.org/project/flake8-comprehensions/
"T10", # flake8-debugger: https://pypi.org/project/flake8-debugger/
"EM", # flake8-errmsg: https://pypi.org/project/flake8-errmsg/
"FA", # flake8-future-annotations: https://pypi.org/project/flake8-future-annotations/
"ISC", # flake8-implicit-str-concat: https://pypi.org/project/flake8-implicit-str-concat/
"ICN", # flake8-import-conventions: https://github.com/joaopalmeiro/flake8-import-conventions/
"G", # flake8-logging-format: https://pypi.org/project/flake8-logging-format/
"INP", # flake8-no-pep420: https://pypi.org/project/flake8-no-pep420/
"PIE", # flake8-pie: https://pypi.org/project/flake8-pie/
"T20", # flake8-print: https://pypi.org/project/flake8-print/
"PT", # flake8-pytest-style: https://pypi.org/project/flake8-pytest-style/
"Q", # flake8-quotes: https://pypi.org/project/flake8-quotes/
"RSE", # flake8-raise: https://pypi.org/project/flake8-raise/
"RET", # flake8-return: https://pypi.org/project/flake8-return/
"SLF", # flake8-self: https://pypi.org/project/flake8-self/
"SIM", # flake8-simplify: https://pypi.org/project/flake8-simplify/
"TID", # flake8-tidy-imports: https://pypi.org/project/flake8-tidy-imports/
"ARG", # flake8-unused-arguments: https://pypi.org/project/flake8-unused-arguments/
"TD", # flake8-todos: https://github.com/orsinium-labs/flake8-todos/
"ERA", # eradicate: https://pypi.org/project/eradicate/
"PGH", # pygrep-hooks: https://github.com/pre-commit/pygrep-hooks/
"PL", # pylint: https://pypi.org/project/pylint/
"TRY", # tryceratops: https://pypi.org/project/tryceratops/
"FLY", # flynt: https://pypi.org/project/flynt/
"PERF", # perflint: https://pypi.org/project/perflint/
"RUF", # ruff
]
ignore = [
"ANN401", # https://beta.ruff.rs/docs/rules/any-type/
"B905", # https://beta.ruff.rs/docs/rules/zip-without-explicit-strict/
"TD003", # https://beta.ruff.rs/docs/rules/missing-todo-link/
"PLR0913", # https://docs.astral.sh/ruff/rules/too-many-arguments/
"PLR0912", # https://docs.astral.sh/ruff/rules/too-many-branches/
"D205", # 1 blank line required between summary line and description
"PLR0911", # Too many return statements
"PLR2004", # Magic value used in comparison, consider replacing * with a constant variable"
"COM812", # ruff format conflict
"ISC001", # ruff format conflict
"ERA001", # Found commented-out code
"N802", # Function name should be lowercase
"N803", # Argument name should be lowercase
"N806", # Variable in function should be lowercase
"C408", # Unnecessary `dict` call (rewrite as a literal)
"D401", # First line of docstring should be in imperative mood
]
ignore-init-module-imports = true # allow unused imports in __init__.py
line-length = 79
[tool.ruff.pydocstyle]
convention = "numpy"
[tool.ruff.flake8-annotations]
allow-star-arg-any = true
[tool.ruff.extend-per-file-ignores]
"__init__.py" = ["PLC0414", "F403", "F401", "F405"]
"sequentia/datasets/*.py" = ["B006"]
"sequentia/enums.py" = ["E501"]
"sequentia/preprocessing/transforms.py" = [
"E",
"ANN",
"TRY",
"EM",
"E",
"B",
"SLF",
"ARG",
]
"tests/**/*.py" = ["D", "E", "S101"]
# "tests/**/test_*.py" = ["ARG001", "S101", "D", "FA100", "FA102", "PLR0915"]
"tests/**/test_*.py" = [
"SLF001",
"S101",
"D",
"PLR0915",
"ANN",
"TID252",
"ARG001",
]
[tool.pydoclint]
style = "numpy"
exclude = ".git|.tox|sequentia/_internal|tests" # temporary
check-return-types = false
arg-type-hints-in-docstring = false
quiet = true
[tool.pytest.ini_options]
addopts = ["--import-mode=importlib"]