-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
138 lines (126 loc) · 4.38 KB
/
pyproject.toml
File metadata and controls
138 lines (126 loc) · 4.38 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
[project]
name = "pytorch-project-template"
version = "6.0.0"
description = ""
authors = [{ name = "Junya Morioka", email = "mjun@mjunya.com" }]
requires-python = ">=3.11"
dependencies = [
"torch==2.8.0",
"torchvision==0.23.0",
"mlflow>=3.1.0",
"torchmetrics>=1.4.1",
"tqdm>=4.66.5",
"matplotlib>=3.9.2",
"omegaconf>=2.3.0",
"python-dotenv>=1.0.1",
"torchinfo>=1.8.0",
"einops>=0.8.0",
"loguru>=0.7.2",
"pandas>=2.2.2",
"tabulate>=0.9.0",
"natsort>=8.4.0",
"wandb>=0.17.7",
"schedulefree>=1.4",
"jupyter>=1.1.1",
"timm>=1.0.15",
]
[dependency-groups]
doc = [
"furo>=2024.8.6",
"myst-parser>=4.0.1",
"sphinx>=8.2.3",
"sphinx-autoapi>=3.6.0",
"sphinx-autobuild>=2024.10.3",
]
dev = ["mypy>=1.16.0", "pre-commit>=4.2.0", "pytest>=8.3.2", "ruff>=0.6.2"]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src"]
[tool.pyright]
typeCheckingMode = "off"
exclude = ["dataset", "result", ".tmp", ".git", ".venv", ".vscode"]
[tool.uv]
default-groups = "all"
[tool.uv.sources]
torch = [
{ index = "torch-cuda", marker = "sys_platform == 'linux' and platform_machine == 'x86_64'" },
{ index = "torch-cpu", marker = "sys_platform == 'darwin' or (sys_platform == 'linux' and platform_machine == 'aarch64')" },
]
torchvision = [
{ index = "torch-cuda", marker = "sys_platform == 'linux' and platform_machine == 'x86_64'" },
{ index = "torch-cpu", marker = "sys_platform == 'darwin' or (sys_platform == 'linux' and platform_machine == 'aarch64')" },
]
[[tool.uv.index]]
name = "torch-cuda"
url = "https://download.pytorch.org/whl/cu128"
explicit = true
[[tool.uv.index]]
name = "torch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
[tool.ruff]
line-length = 100
target-version = "py311"
exclude = [
".git",
".ruff_cache",
".venv",
".vscode",
"dataset",
"result",
"*.ipynb",
]
[tool.ruff.lint]
preview = true
select = [
"ANN", # type annotation
"B", # flake8-bugbear
"D", # pydocstyle
"E", # pycodestyle errors
"F", # pyflakes
"I", # isort
"PTH", # use `pathlib.Path` instead of `os.path`
"RUF", # ruff specific rules
"SIM", # flake8-simplify
"UP", # pyupgrade
"W", # pycodestyle warnings
]
ignore = [
"ANN401", # Checks that function arguments are annotated with a more specific type than Any.
"B007", # Unused loop variable
"B008", # Function call in default argument
"B905", # `zip()` without `strict=True`
"COM812", # Missing trailing comma
"COM819", # Trailing comma prohibited
"D1", # Missing docstring in public module, class, function, or method
"D203", # One blank line required before class docstring (ignored because D211 is prioritized in pydocstyle convention 'google')
"D205", # 1 blank line required between summary line and description
"D212", # Multi-line docstring summary should start at the first line
"D213", # Multi-line docstring summary should start at the second line
"D400", # First line of docstring should end with a period
"D415", # First line of docstring should end with punctuation (period, question mark, or exclamation point)
"E114", # Indentation is not a multiple of four (comment)
"G004", # Logging statement uses f-string
"ISC001", # Implicit string concatenation on a single line
"ISC002", # Implicit string concatenation on multiple lines
"PTH123", # `open()` should be replaced by `Path.open()`
"Q000", # Single quotes found when double quotes are preferred
"Q001", # Single quotes found when double quotes are preferred for multi-line strings
"Q002", # Single quotes found when double quotes are preferred for docstrings
"RUF002", # 無効なUnicodeエスケープシーケンスを無視
"RUF003", # 無効なUnicode文字を無視
"SIM105", # try-except-pass blocks that can be replaced with the contextlib.suppress context manager.
"SIM108", # Use ternary operator instead of `if`-`else`-block
"SIM116", # Use a dictionary instead of consecutive `if` statements
"UP038", # (Deprecated) Use `X | Y` in `isinstance` call instead of `(X, Y)`
]
unfixable = [
"F401", # unused import
"F841", # unused variable
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
[tool.ruff.lint.pydocstyle]
convention = "google"