-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
189 lines (174 loc) · 5.21 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
# Poetry pyproject.toml: https://python-poetry.org/docs/pyproject/
[build-system]
requires = ["poetry_core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "safecheck"
version = "0.4.0"
description = "Utilities for typechecking, shapechecking and dispatch."
readme = "README.md"
authors = ["David Muhr <muhrdavid+github@gmail.com>"]
license = "MIT"
repository = "https://github.com/davnn/safecheck"
homepage = "https://github.com/davnn/safecheck"
# Keywords description https://python-poetry.org/docs/pyproject/#keywords
keywords = []
# Pypi classifiers: https://pypi.org/classifiers/
classifiers = [
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: MIT License",
"Topic :: Software Development :: Libraries",
"Topic :: Scientific/Engineering",
"Topic :: Utilities",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Intended Audience :: Education",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3 :: Only",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix",
"Operating System :: MacOS",
"Typing :: Typed"
]
[tool.poetry.dependencies]
python = ">=3.10,<3.13"
beartype = { version = ">0.15 <0.19" }
jaxtyping = { version = "^0.2" }
typing-extensions = { version = "^4.0" }
[tool.poetry.group.dev.dependencies]
# testing
pytest = "^8.3.3"
pytest-html = "^4.1.1"
pytest-benchmark = "^4.0.0"
hypothesis = "^6.112.1"
# coverage
coverage = "^7.6.1"
pytest-cov = "^5.0.0"
coverage-badge = "^1.1.2"
# linting
ruff = "^0.6.5"
pre-commit = "^3.8.0"
black = "^24.8.0"
# typing
pyright = "^1.1.380"
typing-extensions = "^4.12.2"
# safety
bandit = "^1.7.9"
safety = "^3.2.7"
# test data
numpy = "^2.1.1"
torch = [
{ version = "^2.4.1", platform = "darwin", source = "pypi" },
{ version = "^2.4.1", platform = "win32", source = "pypi" },
{ version = "^2.4.1", platform = "linux", source = "pytorch-cpu" }
]
jax = { version = "^0.4.33", extras = ["cpu"] }
# notebooks
notebook = "^7.0.4"
# profiling
line-profiler = "^4.1.2"
[[tool.poetry.source]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
priority = "explicit"
[tool.black]
# https://github.com/psf/black
target-version = ["py39"]
line-length = 120
color = true
exclude = '''
/(
\.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
| env
| venv
)/
'''
[tool.ruff]
line-length = 120
extend-exclude = ["tests/", ".github/"]
force-exclude = true
lint.select = ["ALL"]
lint.ignore = [
"D203", # one blank line required before class docstring
"D213", # multi line summary should start at second line
"ANN101", # missing type annotation for `self` in method
"B905", # `zip()` without an explicit `strict=` parameter
]
[tool.ruff.lint.isort]
# Combine multiple `from foo import bar as baz` statements with the same source
# (`foo`) into a single statement.
combine-as-imports = true
# Imports of the form `from foo import bar as baz` show one `import bar as baz`
# per line. Useful for __init__.py files that just re-export symbols.
force-wrap-aliases = true
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
[tool.pyright]
include = ["safecheck"]
reportPrivateImportUsage = true
reportConstantRedefinition = true
reportDuplicateImport = true
reportFunctionMemberAccess = true
reportImportCycles = true
reportIncompatibleMethodOverride = true
reportIncompatibleVariableOverride = true
reportIncompleteStub = "warning"
reportInconsistentConstructor = true
reportInvalidStubStatement = "warning"
reportMatchNotExhaustive = true
reportMissingParameterType = true
reportMissingTypeArgument = false
reportOverlappingOverload = true
reportPrivateUsage = true
reportTypeCommentUsage = "warning"
reportUnknownArgumentType = true
reportUnknownLambdaType = false
reportUnknownMemberType = false
reportUnknownParameterType = false
reportUnknownVariableType = false
reportUnnecessaryCast = true
reportUnnecessaryComparison = true
reportUnnecessaryContains = true
reportUnnecessaryIsInstance = true
reportUnnecessaryTypeIgnoreComment = true
reportUnusedClass = true
reportUnusedImport = true
reportUnusedFunction = true
reportUnusedVariable = true
reportUnusedExpression = true
reportUnusedCallResult = true
reportUntypedBaseClass = true
reportUntypedClassDecorator = true
reportUntypedFunctionDecorator = true
reportUntypedNamedTuple = true
reportCallInDefaultInitializer = true
reportImplicitStringConcatenation = false
reportMissingSuperCall = true
reportPropertyTypeMismatch = true
reportUninitializedInstanceVariable = true
[tool.pytest.ini_options]
# https://docs.pytest.org/en/6.2.x/customize.html#pyproject-toml
# Directories that are not visited by pytest collector:
norecursedirs = ["hooks", "*.egg", ".eggs", "dist", "build", "docs", ".tox", ".git", "__pycache__"]
addopts = ["--strict-markers", "--tb=short"]
filterwarnings = ["ignore::UserWarning"]
pythonpath = ["."]
[tool.coverage.run]
source = ["tests"]
branch = true
[tool.coverage.paths]
source = ["safecheck"]
[tool.coverage.report]
show_missing = true
exclude_lines = ["pragma: no cover", "@overload"]