forked from newton-physics/newton-usd-schemas
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
156 lines (129 loc) · 3.89 KB
/
pyproject.toml
File metadata and controls
156 lines (129 loc) · 3.89 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
[project]
name = "newton-usd-schemas"
dynamic = ["version"]
license = "Apache-2.0"
license-files = ["LICENSE.md"]
authors = [{ name = "Newton Developers" }]
description = "OpenUSD schema definitions for the Newton physics engine"
readme = "README.md"
requires-python = ">=3.10,<3.13"
dependencies = []
[project.urls]
Homepage = "https://github.com/newton-physics/newton-usd-schemas"
Repository = "https://github.com/newton-physics/newton-usd-schemas"
Changelog = "https://github.com/newton-physics/newton-usd-schemas/blob/main/CHANGELOG.md"
[dependency-groups]
dev = [
"poethepoet>=0.34",
"ruff>=0.11",
"black>=25.1",
"coverage>=7.4",
"unittest-xml-reporting>=3.2.0",
"pyyaml>=6.0",
"requests>=2.32.3",
"usd-core>=25.5",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.version]
path = "newton_usd_schemas/_version.py"
[tool.uv]
package = true
python-preference = "only-managed"
# Dev Tools
[tool.poe.tasks.test]
help = "Run the unittests"
cmd = "python -m unittest discover -v -s ./tests"
[tool.poe.tasks.test-ci]
help = "Run the unittests with results and coverage reporting printed to console (for CI)"
sequence = ["test-report", "generate-coverage-xml", "show-coverage-report"]
[tool.poe.tasks.test-report]
help = "Run the unittests with coverage tracking and generate test report"
cmd = "coverage run -m xmlrunner discover -v -s ./tests --output-file=.results.xml"
[tool.poe.tasks.generate-coverage-xml]
help = "Generate coverage XML report"
cmd = "coverage xml -o .coverage.xml"
[tool.poe.tasks.show-coverage-report]
help = "Show coverage report in terminal"
cmd = "coverage report -m"
[tool.poe.tasks.lint]
help = "Run all lint tools on the code base"
sequence = ["uv-check", "lint-license", "lint-black", "lint-ruff"]
ignore_fail = "return_non_zero"
[tool.poe.tasks.uv-check]
help = "Run uv check on code base"
cmd = "uv lock --check"
[tool.poe.tasks.lint-license]
help = "Run license conformance checks on code base"
cmd = "python tools/license_format.py --check"
[tool.poe.tasks.lint-ruff]
help = "Run ruff check on code base"
cmd = "ruff check"
[tool.poe.tasks.lint-black]
help = "Run black check on the code base"
cmd = "black . --check --diff"
[tool.poe.tasks.format]
help = "Run all formatting tools on the code base"
sequence = ["format-license", "format-ruff", "format-black"]
ignore_fail = "return_non_zero"
[tool.poe.tasks.format-license]
help = "Run license conformance checks on code base"
cmd = "python tools/license_format.py --fix"
[tool.poe.tasks.format-ruff]
help = "Run ruff fixer on code base"
cmd = "ruff check . --fix-only"
[tool.poe.tasks.format-black]
help = "Run black on the code base"
cmd = "black ."
[tool.coverage.run]
source = ["newton_usd_schemas"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
]
[tool.ruff]
cache-dir = ".cache/ruff"
line-length = 150
target-version = "py310"
indent-width = 4
exclude = [".venv", "dist"]
[tool.ruff.lint]
select = [
"E", # error
"F", # pyflakes
"I", # isort
"W", # warning
"N", # pep8-naming
"UP", # pyupgrade
"YTT", # flake8-2020
"ASYNC", # flake8-async
"C4", # flake8-comprehensions
"T10", # flake8-debugger
"G", # flake8-logging-format
"PIE", # flake8-pie
"PYI", # flake8-pyi
"PT", # flake8-pytest-style
"Q", # flake8-quotes
"SIM", # flake8-simplify
"PTH", # flake8-use-pathlib
"PGH", # pygrep-hooks
"PERF", # perflint
"RUF", # ruff-specific rules
]
ignore = [
"PT009", # unittest-style asserts are fine
"PT027", # unittest-style assertRaises is fine
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
docstring-code-format = true
[tool.black]
line-length = 150
exclude = "(.venv|dist)"
target-version = ['py310']