-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
164 lines (143 loc) · 3.88 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
[tool.poetry]
name = "ranzen"
version = "3.0.0.dev0"
description = "A toolkit facilitating machine-learning experimentation."
authors = ["PAL <[email protected]>"]
license = "Apache License 2.0"
packages = [{ include = "ranzen" }]
include = ["ranzen/py.typed"]
classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Typing :: Typed",
]
keywords = ["typing", "python"]
repository = "https://github.com/wearepal/ranzen"
readme = "README.md"
[tool.poetry.dependencies]
python = ">=3.10,<3.13"
typing-extensions = ">=4.5.0"
numpy = "^2.0"
"backports.strenum" = { version = "^1.3.1", python = "<3.11" }
# wandb dependencies
pandas = { version = "^2.0.0", optional = true }
wandb = { version = ">=0.15", optional = true }
# logging dependencies
loguru = { version = "^0.6.0", optional = true }
# hydra dependencies
hydra-core = { version = "^1.3.0", optional = true }
neoconfigen = { version = "^2.4.2", optional = true }
attrs = { version = "^23.1.0", optional = true }
[tool.poetry.extras]
wandb = ["pandas", "wandb"]
logging = ["loguru"]
hydra = ["attrs", "hydra-core", "neoconfigen"]
all = ["attrs", "hydra-core", "loguru", "neoconfigen", "pandas", "wandb"]
[tool.poetry.group.lint.dependencies]
ruff = ">=0.2.2"
[tool.poetry.group.docs]
optional = true
[tool.poetry.group.docs.dependencies]
sphinx = "^7.2.6"
autodocsumm = "*"
typing-extensions = "*"
furo = "*"
toml = "*"
pydoclint = ">=0.3.8,<1.0.0"
[tool.poetry.group.test.dependencies]
pytest = "^7.1.2"
pandas-stubs = ">=1.4.3.220718"
[tool.poetry.group.torchcpu]
optional = true
[tool.poetry.group.torchcpu.dependencies]
torch = { version = "*", source = "torchcpu", markers = "sys_platform == 'linux'" }
[tool.poetry.group.dev.dependencies]
pre-commit = "^3.4.0"
[[tool.poetry.source]]
name = "torchcpu"
url = "https://download.pytorch.org/whl/cpu"
priority = "explicit"
[tool.pyright]
typeCheckingMode = "strict"
pythonVersion = "3.10"
reportUnknownArgumentType = "none"
reportUnknownMemberType = "none"
reportUnknownVariableType = "none"
reportUnknownParameterType = "none"
reportMissingTypeArgument = "none"
reportUnnecessaryIsInstance = "warning"
reportPrivateImportUsage = "none"
reportPrivateUsage = "none"
reportUnnecessaryTypeIgnoreComment = "warning"
reportUnnecessaryCast = "warning"
reportShadowedImports = "warning"
reportImportCycles = "warning"
[tool.ruff]
line-length = 100
target-version = "py310"
[tool.ruff.format]
quote-style = "preserve"
exclude = [".undodir/*"]
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # pyflakes
"FBT", # boolean trap
"I", # isort
# "N", # naming
"NPY", # numpy
"PD", # pandas
"PLC", # pylint convention
"PLE", # pylint error
# "PLR", # pylint refactor
"PLW", # pylint warning
"PTH", # use-pathlib
# "UP", # pyupgrade
"UP035", # newer imports
"W",
]
ignore = [
"E501", # line length
"F541", # f-string without placeholder
"PLW2901", # overwriting loop variable
"PLC0105", # covariant typevars have to end in "_co"
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F403"]
"tests/*" = ["FBT"]
[tool.ruff.lint.isort]
known-third-party = [
"black",
"hydra",
"matplotlib",
"mypy",
"numpy",
"omegaconf",
"pandas",
"pylint",
"pytest",
"scipy",
"setuptools",
"sklearn",
"torch",
"tqdm",
"wandb",
]
extra-standard-library = ["typing_extensions"]
no-lines-before = ["future", "standard-library"]
force-sort-within-sections = true
split-on-trailing-comma = false
classes = ["SAM", "LAMB"]
[tool.pydoclint]
style = "sphinx"
# we don't put types in docstrings
arg-type-hints-in-docstring = false
check-return-types = false
check-yield-types = false
check-class-attributes = false
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"