-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
200 lines (177 loc) · 5.52 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
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[project]
name = "aeromancy"
description = "A framework for performing reproducible AI and ML."
authors = [
{name = "David McClosky", email = "[email protected]"}
]
license = {text = "Apache-2.0"}
readme = "README.md"
requires-python = ">=3.10.5"
dependencies = [
# keep-sorted start
"boto3>=1.28.45",
"doit>=0.36.0",
"giturlparse>=0.12.0",
"humanize>=4.8.0",
"hyperlink>=21.0.0",
"loguru>=0.7.2",
"msgspec>=0.18.2",
"pandas>=2.1.0",
"pyarrow>=13.0.0",
"pydot>=1.4.2",
"rich-click>=1.7.1",
"scipy>=1.9",
"skops>=0.8.0",
"term-image>=0.7.0",
"tomli>=2.0.1",
"wandb>=0.15.10",
] # keep-sorted end
dynamic = ["version"]
classifiers = [
"Development Status :: 3 - Alpha",
"Programming Language :: Python :: 3"
]
[project.urls]
Repository = "https://github.com/quant-aq/aeromancy"
Homepage = "https://github.com/quant-aq/aeromancy"
[tool.pdm.version]
source = "scm"
[tool.pdm.build]
package-dir = "src"
[tool.pdm.dev-dependencies]
dev = [ # keep-sorted start
"pytest-cov>=4.1.0",
"pytest>=7.4.2",
] # keep-sorted end
doc = [ # keep-sorted start
"mkdocs-gen-files>=0.5.0",
"mkdocs-literate-nav>=0.6.1",
"mkdocs-material>=6.2",
"mkdocs-section-index>=0.3.6",
"mkdocs>=1.1",
"mkdocstrings-python>=1.1.2",
"mkdocstrings>=0.22.0",
] # keep-sorted end
[tool.pdm.scripts]
#
# Standard development scripts (not Aeromancy related).
#
test.help = "Run tests in current environment"
test.cmd = "pytest --cov=src tests/"
doc.help = "Start the dev server for doc preview"
doc.shell = "cd docs && mkdocs serve -a localhost:8030"
lint.help = "Run linters over all files"
lint.cmd = "pre-commit run --all-files"
# PDM hook to automatically sort dependencies when they change.
# "true" is there since GitHub Actions will fail if this returns a non-zero exit code.
post_install.shell = "pre-commit run keep-sorted --files pyproject.toml > /dev/null 2> /dev/null; true"
#
# Aeromancy-specific scripts.
#
aeroview.help = "View basic information about an Aeromancy artifact"
aeroview.cmd = "python -maeromancy.aeroview"
rerun.help = "Rerun a specific Weights and Biases job"
rerun.cmd = "python -maeromancy.rerun"
rerun.env = { PDM_IGNORE_ACTIVE_VENV = "true" }
help.help = "Show the combined help menu (Aeromancy runtime + job selection)"
help.cmd = "python -maeromancy.runner --help"
#
# Aeromancy debugging and development.
#
debug_runner.help = "For testing changes to the runner file (can't be used to test project-specific integration)."
debug_runner.cmd = "python -maeromancy.runner"
[tool.black]
line-length = 88
target-version = ["py310"]
[tool.ruff]
src = ["src"]
line-length = 88
extend-exclude = ["tests/fixtures", "__pycache__"]
target-version = "py310"
namespace-packages = ["docs", "tasks"]
[tool.ruff.lint]
select = [
# keep-sorted start
"ASYNC", # flake8-async
"B", # flake8-bugbear
"BLE", # flake8-blind-except
"C4", # flake8-comprehensions
"COM", # flake8-commas
"D", # pydocstyle
"DTZ", # flake8-datetimez
"E", # pycodestyle error
"EXE", # flake8-executable
"F", # pyflakes
"FA", # flake8-future-annotations
"FLY", # flynt
"I", # isort
"ICN", # flake8-import-conventions
"INP", # flake8-no-pep420
"ISC", # flake8-implicit-str-concat
"N", # pep8-naming
"NPY", # numpy-specific rules
"PD", # pandas-vet
"PERF", # perflint
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"PYI", # flake8-pyi
"Q", # flake8-quotes
"RET", # flake8-return
"RSE", # flake8-raise
"RUF", # ruff-specific
"S", # flake8-bandit
"SIM", # flake8-simplify
"SLOT", # flake8-slot
"T10", # flake8-debugger
"TD", # flake8-todos
"TID", # flake8-tidy-imports
"TRY", # tryceratops
"UP", # pyupgrade
"W", # pycodestyle warning
"YTT", # flake8-2020
# keep-sorted end
]
ignore = [
# keep-sorted start
"D203", # one-blank-line-before-class (incompatible with D211)
"D213", # multi-line-summary-second-line (incompatible with D212)
"D413", # blank-line-after-last-section (not needed for numpy conventions)
"PGH003", # blanket-type-ignore: Use specific rule codes when ignoring type issues (no always feasible)
"RET504", # unnecessary-assign: Sometimes worth doing for readability
"RET505", # superfluous-else-return: Currently has a bug
"RET506", # superfluous-else-raise: Currently has a bug
"S603", # subprocess-without-shell-equals-true: Bug: https://github.com/astral-sh/ruff/issues/4045
"SIM300", # yoda-conditions: Doesn't work well with Pandas
"TD002", # missing-todo-author: Not for prototyping
"TD003", # missing-todo-link: Not for prototyping
"TRY003", # raise-vanilla-args: Not for prototyping, not always an error
# keep-sorted end
]
[tool.ruff.lint.per-file-ignores]
"**/tests/*" = ["S101"] # Allow using asserts in tests
[tool.ruff.lint.isort]
known-first-party = ["aeromancy"]
[tool.mypy]
follow_imports = "silent"
ignore_missing_imports = true
disallow_incomplete_defs = true
disallow_untyped_defs = false # Too strict for experimental code.
disallow_untyped_decorators = false # Too strict for experimental code.
namespace_packages = true
mypy_path = "src"
explicit_package_bases = true
[tool.isort]
profile = "black"
atomic = true
skip_glob = ["*/setup.py"]
filter_files = true
known_first_party = ["aeromancy"]
[tool.pytest.ini_options]
filterwarnings = [
"ignore::DeprecationWarning"
]