-
Notifications
You must be signed in to change notification settings - Fork 75
Expand file tree
/
Copy pathpyproject.toml
More file actions
175 lines (162 loc) · 4.96 KB
/
pyproject.toml
File metadata and controls
175 lines (162 loc) · 4.96 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
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[project]
name = "pyan3"
dynamic = ["version"]
description = "Generate approximate call graphs for Python programs"
readme = {file = "README.md", content-type = "text/markdown"}
requires-python = ">=3.10"
license = {text = "GPL-2.0-or-later"}
authors = [
{name = "Juha Jeronen", email = "juha.m.jeronen@gmail.com"}
]
keywords = ["call-graph", "static-code-analysis", "code-visualization", "dependency-analysis"]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"jinja2",
]
[project.optional-dependencies]
sphinx = [
"sphinx",
"docutils",
]
[project.urls]
Homepage = "https://github.com/Technologicat/pyan"
Documentation = "https://github.com/Technologicat/pyan"
Repository = "https://github.com/Technologicat/pyan"
"Bug Tracker" = "https://github.com/Technologicat/pyan/issues"
[project.scripts]
pyan3 = "pyan.main:main"
[dependency-groups]
dev = [
# Test
"pytest>=8.0",
"pytest-cov>=7.1.0",
# Needed to run `tests/test_sphinx.py`. Also exposed as the
# `[project.optional-dependencies].sphinx` user-facing extra.
"sphinx",
"docutils",
# Linters (for local checks — CI installs them separately)
"ruff>=0.14.0",
"flake8",
"autopep8",
# Editor tooling (jedi-based IDE features in Emacs)
"jedi>=0.19.2",
"epc",
"importmagic",
# Release tooling (manual fallback; CI publishes on tag push)
"twine>=6.0.0",
"urllib3>=2.6.3", # transitive via twine → requests; floor for CVE fixes
"cryptography>=46.0.5", # transitive via twine → keyring; floor for CVE fixes
# For local pre-release sanity checks: `python -m build --sdist`
# exercises the same sdist path that CI runs on tag push.
"build",
# For validating .github/workflows/*.yml during local dev (not used at runtime).
"pyyaml>=6.0.3",
]
[tool.pdm.version]
# The `file` source tells pdm to look for a line in a file that matches the regex `__version__ = ".*"`.
source = "file"
path = "pyan/__init__.py"
[tool.pdm.build]
includes = ["pyan"]
excludes = ["**/tests", "**/__pycache__"]
[tool.pytest.ini_options]
testpaths = ["tests/"]
addopts = [
"-rsxX",
"-vv",
"--cov=pyan",
"--cov-report=html",
"--cov-report=term-missing:skip-covered",
"--no-cov-on-fail",
]
log_cli_level = "ERROR"
log_format = "%(asctime)s %(levelname)s %(message)s"
log_date_format = "%Y-%m-%d %H:%M:%S"
cache_dir = ".cache"
[tool.ruff]
line-length = 120
target-version = "py310"
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
"tests/test_code_312", # 3.12+ syntax — ruff targets 3.10
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"ARG", # flake8-unused-arguments
"SIM", # flake8-simplify
]
ignore = [
"E203", # whitespace before ':' (needed for slicing)
"E402", # module level import not at top of file
"E731", # do not assign a lambda expression, use a def
"E741", # ambiguous variable name
"E501", # line too long (handled by formatter)
"W605", # invalid escape sequence (e.g. for LaTeX)
"C408", # unnecessary dict call
"C409", # unnecessary list passed to tuple()
"C406", # unnecessary list literal
"F401", # unused imports (too noisy for legacy code)
"UP009", # UTF-8 encoding declaration is unnecessary (keeping for compat)
]
[tool.ruff.lint.isort]
known-first-party = ["pyan"]
force-sort-within-sections = true
combine-as-imports = true
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"] # unused imports in __init__.py are common
"tests/test_code/**" = ["F821", "I001", "ARG", "B007", "B008", "C416", "UP009", "UP015"] # test fixtures: intentionally weird code
"tests/orbital/**" = ["F841"] # showcase test fixtures
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"