-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
207 lines (172 loc) · 4.98 KB
/
pyproject.toml
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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
[project]
name = "networkx_query"
version = "2.1.3"
description = "NetworkX Query Tool"
authors = [{ name = "Jerome Guibert", email = "[email protected]" }]
readme = "README.md"
license = {text = "The MIT License (MIT)"}
#license = {file = "LICENSE.md"} # setuptool bug
keywords = ["networkx", "graph", "query"]
classifiers = [
# update this list to match your application: https://pypi.org/pypi?%3Aaction=list_classifiers
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
requires-python = ">=3.9,<4"
dependencies = ["networkx"]
[project.urls]
homepage = "https://pypi.org/project/networkx_query"
documentation = "https://geronimo-iia.github.io/networkx-query/"
repository = "https://github.com/geronimo-iia/networkx-query"
[dependency-groups]
dev = [
"ruff ~= 0.9",
"pyright ~= 1.1.354",
"pytest >= 8", # pytest: simple powerful testing with Python
"pytest-cov >= 5", # Pytest plugin for measuring coverage.
"pytest-mock >=3",
"xdoctest ~=1.2.0", # A rewrite of the builtin doctest module
"coverage[toml] >= 7.6.10",
"poethepoet >= 0.32.1",
"setuptools>=75",
]
docs = [
"mkdocs~= 1.6",
"mkdocs-include-markdown-plugin >= 7.1.2",
"mkdocstrings[python] ~= 0.27",
"mkdocs-material == 9.*",
"mkdocs-include-markdown-plugin ~= 7.1.2"
]
[tool.setuptools]
license-files = []
[tool.setuptools.packages.find]
include = ["networkx_query*"]
namespaces = false
[tool.uv]
package = true
cache-dir = "./.cache"
default-groups = ["dev", "docs"]
[tool.coverage.paths]
source = ["networkx_query"]
[tool.coverage.run]
# see https://coverage.readthedocs.io/en/coverage-5.0.3/config.html
branch = true
data_file = ".cache/coverage"
source = ["networkx_query"]
omit = ["tests/*", ".venv/*", "*/__main__.py"]
[tool.coverage.report]
# see https://coverage.readthedocs.io/en/coverage-5.0.3/config.html
exclude_lines = ["pragma: no cover", "raise NotImplementedError"]
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "--strict-markers --pdbcls=tests:Debugger -r sxX --cov=networkx_query --cov-report=html --cov-report=term-missing:skip-covered"
cache_dir = ".cache"
[tool.ruff]
cache-dir = ".cache/ruff"
line-length = 120
indent-width = 4
target-version = "py39"
[tool.ruff.lint]
select = [
# pycodestyle
"E",
# Pyflakes
"F",
# pyupgrade
# "UP",
# flake8-bugbear
"B",
# flake8-simplify
"SIM",
# isort
"I",
]
fixable = ["ALL"]
unfixable = []
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
docstring-code-format = true
docstring-code-line-length = "dynamic"
[tool.pyright]
include = ["networkx_query"]
exclude = [
"**/node_modules",
"**/__pycache__",
"networkx_query/experimental",
"networkx_query/typestubs"
]
ignore = ["tests"]
defineConstant = { DEBUG = true }
reportMissingImports = true
reportMissingTypeStubs = false
pythonVersion = "3.9"
pythonPlatform = "Linux"
[tool.poe.tasks]
_build = "uv build"
_publish = "uv publish"
[tool.poe.tasks.types]
help = "Run the type checker"
cmd = "uv run pyright"
[tool.poe.tasks.lint]
help = "Run linting tools on the code base"
cmd = "uv run ruff check --fix ."
[tool.poe.tasks.style]
help = "Validate black code style"
shell = """
uv run ruff check --select I --fix
uv run ruff format .
"""
[tool.poe.tasks.test]
help = "Run unit tests"
shell = """
if test -e .cache/v/cache/lastfailed; then uv run pytest tests --last-failed --exitfirst; fi &
rm -rf .cache/v/cache/lastfailed &
uv run pytest
"""
[tool.poe.tasks.check]
help = "Run all checks on the code base"
sequence = [ "style", "types", "lint", "test"]
[tool.poe.tasks.build]
help = "Build module"
sequence = ["check", "_build"]
[tool.poe.tasks.publish]
help = "Publish module"
sequence = ["build", "_publish"]
[tool.poe.tasks.docs]
help = "Build site documentation"
shell = """
git fetch origin gh-pages &
uv run mkdocs build --clean
"""
[tool.poe.tasks.docs-publish]
help = "Publish site documentation"
cmd = """
uv run mkdocs gh-deploy --clean
"""
[tool.poe.tasks.clean]
help = "Remove all generated and temporary files"
shell = """
uv cache clean
rm -rf *.spec dist build .eggs *.egg-info .install .cache .coverage htmlcov .mypy_cache .pytest_cache site .ruff_cache &
find networkx_query tests -type d -name '__pycache__' -exec rm -rf {} +
"""
[tool.poe.tasks.requirements]
help = "Generate requirements.txt"
cmd = "uv pip compile pyproject.toml -o requirements.txt "
capture_stdout = "requirements.txt"
[build-system]
requires = ["setuptools>=75"]
build-backend = "setuptools.build_meta"