generated from microsoft/python-package-template
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathpyproject.toml
More file actions
229 lines (201 loc) · 8.01 KB
/
pyproject.toml
File metadata and controls
229 lines (201 loc) · 8.01 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
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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
[project]
name = "pathpyG"
authors = [
{ name = "Ingo Scholtes", email = "ingo.scholtes@uni-wuerzburg.de" },
{ name = "Jürgen Hackl", email = "hackl@princeton.edu" },
]
description = "GPU-accelerated Next-Generation Network Analytics and Graph Learning for Time Series Data on Complex Networks."
readme = "README.md"
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Environment :: GPU :: NVIDIA CUDA :: 11.7",
"Environment :: GPU :: NVIDIA CUDA :: 11.8",
]
requires-python = ">=3.10" # We are using `match` statements
version = "0.2.0"
dependencies = [
'singledispatchmethod', # Adds decorator that allows to use different methods for different types of arguments (similar to method overloading in Java)
'zstandard', # Compression library
'numpy', # Numerical computing library
'scipy', # Scientific computing library
'scikit-learn', # Machine learning library
'pandas', # Data analysis library
'matplotlib', # Plotting library
'seaborn', # High-level plotting library
'jupyter', # To run the tutorial notebooks
'torch_geometric', # PyTorch Geometric library for graph deep learning
"networkx", # NetworkX for basic network analysis and visualisation
]
[project.optional-dependencies]
vis = [
"manim", # Animation engine
]
cu129 = [
"torch==2.8.0", # PyTorch for deep learning
"pyg_lib", # PyTorch Geometric library for efficient graph operations
"torch_scatter", # PyTorch Geometric library for scatter operations
"torch_sparse", # PyTorch Geometric library for sparse matrix operations
"torch_cluster", # PyTorch Geometric library for clustering operations
"torch_spline_conv", # PyTorch Geometric library for spline convolution
]
cpu = [
"torch==2.8.0", # PyTorch for deep learning
"pyg_lib", # PyTorch Geometric library for efficient graph operations
"torch_scatter", # PyTorch Geometric library for scatter operations
"torch_sparse", # PyTorch Geometric library for sparse matrix operations
"torch_cluster", # PyTorch Geometric library for clustering operations
"torch_spline_conv", # PyTorch Geometric library for spline convolution
]
[dependency-groups]
test = [
"pytest", # Testing framework
"pytest-cov", # Code coverage plugin for pytest
"pytest-mock", # Mocking plugin for pytest
"pytest-benchmark", # Benchmarking plugin for pytest
"nbmake", # To test tutorial Jupyter notebooks
]
dev = [
"ruff", # Linter and code formatter
"mypy", # Static type checker
]
doc = [
"mkdocs", # Documentation generator
"mkdocs-material", # Theme for mkdocs
"mkdocstrings", # Plugin to generate documentation from docstrings
"mkdocstrings-python", # Python language handler for mkdocstrings
"markdown-exec", # Plugin to execute code in markdown files
"mkdocs-gen-files", # Plugin to move python files to documentation automatically
"mkdocs-literate-nav", # Plugin to add navigation for API reference
"mkdocs-section-index", # For better navigation in API reference
"mkdocs-jupyter", # Plugin to include Jupyter notebooks in documentation
"mkdocs-git-revision-date-localized-plugin", # Plugin to add date of last update to documentation
"mike" # Tool for versioning the documentation
]
[project.urls]
Documentation = "https://www.pathpy.net"
Source = "https://github.com/pathpy/pathpyG"
Tracker = "https://github.com/pathpy/pathpyG/issues"
########################################################################################
############################## Package configuration ###################################
########################################################################################
[tool.uv]
default-groups = ["dev", "test", "doc"]
conflicts = [
[
{ extra = "cpu" },
{ extra = "cu129" },
],
]
[tool.uv.sources]
torch = [
{ index = "torch-cu129", extra = "cu129" },
{ index = "torch-cpu", extra = "cpu" },
]
pyg_lib = [
{ index = "pyg-cu129", extra = "cu129" },
{ index = "pyg-cpu", extra = "cpu" },
]
torch_scatter = [
{ index = "pyg-cu129", extra = "cu129" },
{ index = "pyg-cpu", extra = "cpu" },
]
torch_sparse = [
{ index = "pyg-cu129", extra = "cu129" },
{ index = "pyg-cpu", extra = "cpu" },
]
torch_cluster = [
{ index = "pyg-cu129", extra = "cu129" },
{ index = "pyg-cpu", extra = "cpu" },
]
torch_spline_conv = [
{ index = "pyg-cu129", extra = "cu129" },
{ index = "pyg-cpu", extra = "cpu" },
]
[[tool.uv.index]]
name = "torch-cu129"
url = "https://download.pytorch.org/whl/cu129"
explicit = true
[[tool.uv.index]]
name = "torch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
[[tool.uv.index]]
name = "pyg-cpu"
url = "https://data.pyg.org/whl/torch-2.8.0+cpu.html"
explicit = true
format = "flat"
[[tool.uv.index]]
name = "pyg-cu129"
url = "https://data.pyg.org/whl/torch-2.8.0+cu129.html"
explicit = true
format = "flat"
########################################################################################
########################### Build system configuration #################################
########################################################################################
[build-system]
requires = ["uv_build>=0.8.22,<0.9.0"]
build-backend = "uv_build"
[tool.uv.build-backend]
module-name = "pathpyG"
########################################################################################
############################# Test configuration #######################################
########################################################################################
[tool.pytest.ini_options]
pythonpath = ["src"]
testpaths = "tests"
markers = [
"benchmark: marks tests as benchmarking tests (deselect with '-m \"not benchmark\"')",
"gpu: marks tests that require GPU support (deselect with '-m \"not gpu\"')"
]
addopts = "--cov=src -m \"not benchmark and not gpu\" --doctest-modules"
doctest_optionflags = "ELLIPSIS NORMALIZE_WHITESPACE"
[tool.coverage.run]
branch = true
[tool.coverage.report]
fail_under = 85
exclude_lines = [
"pragma: no cover",
"def __repr__",
"def __str__",
"if self.debug",
"if settings.DEBUG",
"if TYPE_CHECKING",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
]
show_missing = true
skip_covered = true
########################################################################################
############################# Linting configuration ####################################
########################################################################################
[tool.ruff]
line-length = 120
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint]
select = ["E4", "E7", "E9", "F", "D", "I"]
# "S101": Disable checks for assert statements, which are standard in tests.
# "D100": Disable "Missing docstring in public module".
# "D101": Disable "Missing docstring in public class".
# "D102": Disable "Missing docstring in public method".
# "D103": Disable "Missing docstring in public function".
per-file-ignores = { "tests/*" = [ "S101", "D100", "D101", "D102", "D103" ] }
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.mypy] # Static type checker
check_untyped_defs = true
warn_unused_ignores = true
show_error_codes = true
ignore_missing_imports = true
[[tool.mypy.overrides]] # Disable mypy for the dir `tests/`
module = "tests.*"
ignore_errors = true