-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpyproject.toml
More file actions
221 lines (201 loc) · 5.39 KB
/
pyproject.toml
File metadata and controls
221 lines (201 loc) · 5.39 KB
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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
[build-system]
requires = [
"setuptools>=61.0.0",
"wheel",
]
build-backend = "setuptools.build_meta"
[project]
name = "litlogger"
authors = [
{name = "Lightning-AI", email = "thomas@lightning.ai"},
]
description = "The Lightning Logger of the Lightning.AI Platform"
license = {file = "LICENSE"}
readme = {file = "README.md", content-type = "text/markdown"}
requires-python = ">=3.10"
dynamic = ["version"]
keywords = ["deep learning", "machine learning", "pytorch", "AI"]
classifiers = [
"Programming Language :: Python :: 3",
]
dependencies = [
"blake3",
"lightning-sdk >=2026.04.16",
"lightning-utilities<=0.15.3",
"protobuf",
"psutil",
"rich",
]
[project.optional-dependencies]
models = [
"joblib>=1.0.0",
]
[dependency-groups]
dev = [
"mypy>=1.18.2",
"pre-commit >= 4.3.0",
"types-psutil",
"types-protobuf",
]
docs = [
"sphinx >=8.0, <9.0",
"myst-parser >=2.0, <5.0.0",
"docutils >=0.20",
"sphinx-autodoc-typehints >=1.16",
"sphinx-paramlinks >=0.5.1, <=0.6.0",
"sphinx-togglebutton >=0.3, <=0.3.2",
"sphinx-copybutton >=0.5, <=0.5.2",
"jinja2 <3.2.0",
"pydata-sphinx-theme >=0.15",
]
tests = [
"coverage",
"lightning>=2.5.6",
"pytest>=8.0.0",
"pytest-timeout>=2.4.0",
"mock",
"pytest-mock",
"pytest-sugar",
"lightning>=2.0.0",
"torchvision"
]
[tool.setuptools.dynamic]
version = {attr = "litlogger.__version__"}
[tool.setuptools.packages.find]
where = ["src"]
exclude = ["tests*", "examples*"]
[tool.mypy]
python_version = "3.10"
strict = true
show_error_codes = true
pretty = true
[[tool.mypy.overrides]]
module = [
"lightning_sdk.*",
"lightning.*",
"lightning_fabric.*",
"lightning_utilities.*",
"pytorch_lightning.*",
"torch.*",
]
ignore_missing_imports = true
[tool.black]
# https://github.com/psf/black
line-length = 120
exclude = "(.eggs|.git|.hg|.mypy_cache|.venv|_build|buck-out|build|dist)"
[tool.ruff]
target-version = "py310"
line-length = 120
# Exclude a variety of commonly ignored directories.
exclude = [
".eggs",
".git",
".mypy_cache",
".ruff_cache",
"__pypackages__",
"_build",
"build",
"dist",
]
[tool.ruff.lint]
select = [
"E",
"W", # see: https://pypi.org/project/pycodestyle
"F", # see: https://pypi.org/project/pyflakes
"I", #see: https://pypi.org/project/isort/
"D", # see: https://pypi.org/project/pydocstyle
"N", # see: https://pypi.org/project/pep8-naming
"UP", # see: pyupgrade
]
extend-select = [
"A", # see: https://pypi.org/project/flake8-builtins
"B", # see: https://pypi.org/project/flake8-bugbear
"C4", # see: https://pypi.org/project/flake8-comprehensions
"PT", # see: https://pypi.org/project/flake8-pytest-style
"RET", # see: https://pypi.org/project/flake8-return
"SIM", # see: https://pypi.org/project/flake8-simplify
"YTT", # see: https://pypi.org/project/flake8-2020
"ANN", # see: https://pypi.org/project/flake8-annotations
"TID", # see: https://pypi.org/project/flake8-tidy-imports/
"T10", # see: https://pypi.org/project/flake8-debugger
"Q", # see: https://pypi.org/project/flake8-quotes
"RUF", # Ruff-specific rules
"ISC", # see: https://pypi.org/project/flake8-implicit-str-concat
"PIE", # see: https://pypi.org/project/flake8-pie
"PLE", # see: https://pypi.org/project/pylint/
"PYI", # see: https://pypi.org/project/flake8-pyi/
]
ignore = [
"D101", # Missing docstring in public function
"D102", # Missing docstring in public function
"D103", # Missing docstring in public function
"E731", # Do not assign a lambda expression, use a def
"D100", # todo: Missing docstring in public module
"D104", # todo: Missing docstring in public package
"D107", # Missing docstring in `__init__`
"ANN101", # Missing type annotation for `self` in method
"UP006", # Use list instead of List
"UP035", # typing.List is deprecated
"RUF015", # Prefer `next(iter(iterable))` over single element slice
]
unfixable = ["F401"]
[tool.ruff.lint.per-file-ignores]
#"setup.py" = ["ANN202", "ANN401"]
"src/**" = ["ANN401"]
"examples/**" = [
"ANN", # Type annotations
"N",
]
"tests/**" = [
"ANN", # Type annotations
"D102", # Missing docstring in public method
"PT023", # pytest-incorrect-mark-parentheses-style
"S101", # assert detected
"E402", #module level import not at top of file
]
[tool.ruff.lint.pydocstyle]
# Use Google-style docstrings.
convention = "google"
#[tool.ruff.pycodestyle]
#ignore-overlong-task-comments = true
[tool.ruff.lint.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10
[tool.pytest]
mock_use_standalone_module = "true"
mock_traceback_monkeypatch = "false"
norecursedirs = [
".git",
".github",
"dist",
"build",
"docs",
]
addopts = [
"--strict-markers",
"--doctest-modules",
"--color=yes",
"--disable-pytest-warnings",
"--ignore=legacy/checkpoints",
]
markers = [
"project_permission_test: marker for project permission tests",
]
filterwarnings = [
"error::FutureWarning",
"error::pytest.PytestUnhandledThreadExceptionWarning",
]
xfail_strict = true
junit_duration_report = "call"
[tool.coverage.run]
source = ["lightning_sdk"]
omit = [
"lightning_sdk/lightning_cloud/*",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError",
"pass",
"typing.overload",
]