Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
135 lines (119 loc) · 3.56 KB
/
Copy pathpyproject.toml
File metadata and controls
135 lines (119 loc) · 3.56 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
[build-system]
requires = ["setuptools>=61.0", "wheel", "setuptools-scm>=8"]
build-backend = "setuptools.build_meta"
[project]
name = "pt-snap-cli"
dynamic = ["version"]
description = "PyTorch Memory Snapshot Analysis CLI"
readme = "README.md"
license = {text = "MIT"}
requires-python = ">=3.10"
authors = [
{name = "Codeasier"}
]
keywords = ["pytorch", "memory", "snapshot", "analysis", "cli"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dependencies = [
"typer>=0.9.0",
"pyyaml>=6.0",
"jinja2>=3.0.0",
]
[project.urls]
Homepage = "https://github.com/codeasier/pt-snap-cli"
Repository = "https://github.com/codeasier/pt-snap-cli"
Issues = "https://github.com/codeasier/pt-snap-cli/issues"
[project.optional-dependencies]
dev = [
"pytest>=7.0.0",
"pytest-cov>=4.0.0",
# The coverage gate owns/explicitly closes CoverageData, including bad SQLite input.
"coverage[toml]>=7.10.3",
"hypothesis>=6.100.0,<7",
"playwright>=1.40.0",
"black>=23.0.0",
"ruff>=0.0.280",
"build>=1.0.0",
# Offline regression tests exercise repeated builds with the real backend.
"setuptools>=61.0",
"wheel",
"basedpyright>=1.39.3",
]
[project.scripts]
pt-snap = "pt_snap_cli.cli:_safe_call"
[tool.setuptools.packages.find]
where = ["src"]
include = ["pt_snap_cli*"]
[tool.setuptools.package-data]
pt_snap_cli = [
"query/templates/*.yaml",
"query/templates/*/*.yaml",
"bundled_skills/**/*",
]
"pt_snap_cli.snapshot" = ["LICENSE", "PROVENANCE.md"]
[tool.setuptools_scm]
version_scheme = "no-guess-dev"
local_scheme = "no-local-version"
[tool.black]
line-length = 100
target-version = ["py310"]
# Local-only directories that may exist in a checkout but are not project source.
# Both tools already honor .gitignore; listing them here keeps `black --check .`
# and `ruff check .` stable even when run with gitignore handling disabled.
extend-exclude = '''
/(
\.pt-snap
| \.tmp
| \.worktrees
| tmp
)/
'''
[tool.ruff]
line-length = 100
target-version = "py310"
extend-exclude = [".pt-snap", ".tmp", ".worktrees", "tmp"]
[tool.ruff.lint]
select = ["E", "F", "W", "I", "N", "UP", "B", "C4"]
ignore = ["E501"]
[tool.pytest.ini_options]
markers = ["nightly: million-scale acceptance gate (scheduled/manual only)"]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_functions = ["test_*"]
addopts = "-v --tb=short"
filterwarnings = [
"error::ResourceWarning",
"error::pytest.PytestUnraisableExceptionWarning",
]
[tool.basedpyright]
pythonVersion = "3.13"
include = ["src/pt_snap_cli"]
# basedpyright exits non-zero on warnings by default. The gate is "no errors";
# warnings (mostly reportUnknown* noise from third-party stubs) are informational.
# Without this, the result depends on how well-typed the installed typer happens
# to be, which is why the check passed in CI yet failed on developer machines.
failOnWarnings = false
[tool.coverage.run]
source = ["pt_snap_cli"]
branch = true
omit = ["*/tests/*", "*/__pycache__/*"]
[tool.coverage.report]
show_missing = true
skip_empty = true
exclude_lines = [
"pragma: no cover",
"if __name__ == .__main__.",
"if TYPE_CHECKING:",
]
# Line + branch coverage baseline; CI also guards critical runtime files separately.
fail_under = 90
[tool.coverage.xml]
output = "coverage.xml"