-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
126 lines (112 loc) · 2.94 KB
/
Copy pathpyproject.toml
File metadata and controls
126 lines (112 loc) · 2.94 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
[project]
name = "planning"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
authors = [
{ name = "Kim-JeongHan", email = "Kim-JeongHan@naver.com" }
]
requires-python = ">=3.10"
dependencies = [
"viser>=1.0.13",
"pydantic>=2.12.2,!=2.12.1",
"tqdm>=4.66.0",
]
[project.optional-dependencies]
dev = [
"pytest>=7.0.0",
"pre-commit>=3.0.0",
"ruff>=0.8.0",
"black>=24.0.0",
"mypy>=1.0.0",
]
diffuser = [
"torch>=2.2.0",
"pyyaml>=6.0.2",
"tensorboard>=2.16.0",
"hydra-core>=1.3",
]
[build-system]
requires = ["setuptools>=68.0.0", "wheel"]
build-backend = "setuptools.build_meta"
[tool.ruff]
line-length = 100
target-version = "py310"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes (unused imports, variables)
"I", # isort (import sorting)
"N", # pep8-naming
"UP", # pyupgrade (modernize Python code)
"B", # flake8-bugbear (find likely bugs)
"C90", # mccabe (complexity checking)
"ANN", # flake8-annotations (type annotations)
"S", # flake8-bandit (security checks)
"SIM", # flake8-simplify (simplification)
"RUF", # Ruff-specific rules
]
ignore = [
"E501", # line too long (handled by Black)
"ANN101", # missing type annotation for self
"ANN102", # missing type annotation for cls
"S101", # use of assert (OK in tests)
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"] # Allow unused imports in __init__.py
"tests/**/*.py" = ["S101", "ANN"] # Allow assert and missing annotations in tests
"tests/test_diffuser_sampling.py" = ["E402"]
"tests/test_diffuser_utils.py" = ["E402"]
"tests/test_diffusion_core_normalizer.py" = ["E402"]
"tests/test_diffusion_dataset_source.py" = ["E402"]
"tests/test_diffusion_trainer_smoke.py" = ["E402"]
[tool.ruff.lint.isort]
known-first-party = ["planning"]
section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"]
[tool.ruff.lint.mccabe]
max-complexity = 12
[tool.black]
line-length = 100
target-version = ["py310"]
include = '\.pyi?$'
extend-exclude = '''
/(
# directories
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| build
| dist
)/
'''
[tool.mypy]
python_version = "3.10"
warn_return_any = false
warn_unused_configs = true
ignore_missing_imports = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_calls = false
warn_redundant_casts = true
warn_unused_ignores = false
no_implicit_optional = true
strict_equality = true
[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false
disallow_incomplete_defs = false
[[tool.mypy.overrides]]
module = "examples.*"
disallow_untyped_defs = false
[tool.setuptools]
include-package-data = true
[tool.setuptools.packages.find]
where = ["."]
include = ["planning"]
[tool.uv]
extra-build-dependencies = { planning = ["setuptools>=68.0.0", "wheel"] }