-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
177 lines (148 loc) Β· 4.34 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
[build-system]
requires = ["hatchling>=1.12"]
build-backend = "hatchling.build"
[project]
name = "otc"
version = "0.0.1"
requires-python = ">=3.8"
description = "Code to perform option trade classification using machine learning."
readme = "README.md"
license = { file = "LICENSE" }
authors = [
{ name = "Markus Bilz", email = "[email protected]" }
]
classifiers = [
"Development Status :: 3 - Alpha",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Framework :: Jupyter",
"Operating System :: OS Independent",
]
dependencies = [
"catboost>=1.1",
"click>=8.1.7",
"fastparquet>=2023.8.0",
"gcsfs>=2023.9.2",
"google-auth>=2.23.4", # needed by w&b in runpod
"modin>=0.17.0",
"numpy>=1.23.4",
"optuna>=3.1.0",
"pandas>=1.5.1",
"pandas-datareader>=0.10.0",
"psutil>=5.9.5", # needed by w&b
"pydantic[dotenv]>=2.4.2",
"pydantic-settings>=2.1.0",
"pyyaml>=6.0.1",
"requests>=2.31.0",
"scikit-learn>=1.1.3",
"seaborn>=0.13.0",
"torch>=2.0.0",
"tqdm>=4.66.1",
"typer>=0.9.0",
"wandb>=0.13.5",
]
[project.urls]
"Homepage" = "https://github.com/KarelZe/thesis"
"Bug Tracker" = "https://github.com/KarelZe/thesis/issues"
[tool.mypy]
exclude = ["src/otc/utils"]
# https://github.com/python/mypy/issues/2410
ignore_missing_imports = true
disallow_untyped_defs = true
disallow_untyped_calls = true
disallow_incomplete_defs = true
[tool.setuptools.dynamic]
version = { attr = "otc.__version__" }
[tool.pytest.ini_options]
minversion = 7.0
addopts = "-ra -p no:warnings -v --cov --cov-report term-missing"
pythonpath = ["src"]
testpaths = ["tests"]
[tool.coverage.run]
omit = [
"src/otc/utils*",
"debug_*.py",
"tests/*",
]
[tool.ruff]
[tool.ruff.lint]
# See rules: https://beta.ruff.rs/docs/rules/
select = [
"C", # flake8-comprehensions
"D", # pydocstyle
"E", # pycodestyle errors
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"NPY", # numpy
"PD", # pandas-vet
"PIE", # misc lints
"PT", # pytest
"PTH", # flake8-use-pathlib
"PGH", # pygrep
"RET", # return
"RUF", # ruff-specific rules
"UP", # pyupgrade
"SIM", # flake8-simplify
"W", # pycodestyle warnings
]
ignore = [
"E501", # line too long, handled by black
"N803", # argument name should be lowercase
"N806", # variable name should be lowercase
"C901", # too complex
"D206", # indent with white space
"W191", # tab identation
]
[tool.ruff.lint.isort]
known-first-party = ["otc"]
section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["D104", "F401"] # disable missing docstrings in __init__, unused imports
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.uv]
dev-dependencies = [
"mypy>=1.7.1",
"pre-commit>=3.5.0",
"pytest>=7.4.3",
"pytest-cov",
"ruff>=0.8.1",
"tox>=4.23",
"tox-uv",
]
[tool.tox]
env_list = ["format", "lint", "pre-commit"]
min_version = "4.23"
[tool.tox.env_run_base]
runner = "uv-venv-lock-runner"
allowlist_externals = ["/bin/sh"]
skip_install = true
with_dev = true
[tool.tox.env.clean]
description = "cleanup tasks (remove build artifacts and cache)"
commands = [
["coverage", "erase"],
["sh", "-c", "rm -rf .mypy_cache .pytest_cache .ruff_cache dist mlruns reports"]
]
[tool.tox.env.format]
description = "code formatting using ruff"
commands = [
["ruff", "format", { replace = "posargs", default = ["src", "tests", "notebooks"], extend = true }]
]
[tool.tox.env.lint]
description = "linting and syntax checks"
commands = [
["ruff", "check", { replace = "posargs", default = ["src", "tests", "notebooks"], extend = true} ],
["ruff", "format", "--check", { replace = "posargs", default = ["src", "tests", "notebooks"], extend = true} ],
["mypy", { replace = "posargs", default = ["src"], extend = true} ]
]
[tool.tox.env.pre-commit]
description = "pre-commit hooks"
commands = [["pre-commit", "run", "--all-files", "--show-diff-on-failure"]]
[tool.tox.env.test]
description = "tests"
commands = [["pytest"]]
[tool.tox.env.build]
description = "build the project"
commands = [["uv", "build"]]