Skip to content

Commit 24aa9eb

Browse files
authored
Merge pull request #115 from epfl-lts2/maintainance/uv
Update to UV
2 parents 643b1c4 + 8186e98 commit 24aa9eb

File tree

3 files changed

+174
-0
lines changed

3 files changed

+174
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.venv/
12
__pycache__/
23

34
# Packages

README.rst

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ The PyGSP is available on PyPI::
109109

110110
$ pip install pygsp
111111

112+
For faster installation with modern dependency resolution, use `uv <https://github.com/astral-sh/uv>`_::
113+
114+
$ uv add pygsp
115+
112116
The PyGSP is available on `conda-forge <https://github.com/conda-forge/pygsp-feedstock>`_::
113117

114118
$ conda install -c conda-forge pygsp
@@ -124,6 +128,36 @@ Contributing
124128

125129
See the guidelines for contributing in ``CONTRIBUTING.rst``.
126130

131+
Development Setup
132+
~~~~~~~~~~~~~~~~~
133+
134+
For development, we recommend using `uv <https://github.com/astral-sh/uv>`_ for fast and reliable dependency management:
135+
136+
1. **Clone the repository**::
137+
138+
$ git clone https://github.com/epfl-lts2/pygsp.git
139+
$ cd pygsp
140+
141+
2. **Set up development environment**::
142+
143+
$ uv venv
144+
$ source .venv/bin/activate # On Windows: .venv\Scripts\activate
145+
$ uv pip install -e ".[dev]"
146+
147+
3. **Run tests**::
148+
149+
$ pytest
150+
151+
4. **Run linting**::
152+
153+
$ flake8 pygsp/
154+
155+
5. **Build documentation**::
156+
157+
$ cd doc && make html
158+
159+
The project uses ``pyproject.toml`` for modern Python packaging and includes all development dependencies like ``pytest``, ``flake8``, ``sphinx``, ``matplotlib``, and ``networkx``.
160+
127161
Acknowledgments
128162
---------------
129163

pyproject.toml

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
[build-system]
2+
requires = ["setuptools>=61.0", "wheel"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "PyGSP"
7+
version = "0.5.1"
8+
description = "Graph Signal Processing in Python"
9+
readme = "README.rst"
10+
requires-python = ">=3.7"
11+
license = {text = "BSD"}
12+
keywords = ["graph", "signal", "processing"]
13+
authors = [
14+
{name = "EPFL LTS2"}
15+
]
16+
maintainers = [
17+
{name = "EPFL LTS2"}
18+
]
19+
classifiers = [
20+
"Development Status :: 4 - Beta",
21+
"Topic :: Scientific/Engineering",
22+
"Intended Audience :: Developers",
23+
"Intended Audience :: Education",
24+
"Intended Audience :: Science/Research",
25+
"License :: OSI Approved :: BSD License",
26+
"Operating System :: OS Independent",
27+
"Programming Language :: Python",
28+
"Programming Language :: Python :: 3",
29+
"Programming Language :: Python :: 3.7",
30+
"Programming Language :: Python :: 3.8",
31+
"Programming Language :: Python :: 3.9",
32+
"Programming Language :: Python :: 3.10",
33+
"Programming Language :: Python :: 3.11",
34+
"Programming Language :: Python :: 3.12",
35+
]
36+
37+
dependencies = [
38+
"numpy",
39+
"scipy",
40+
]
41+
42+
[project.optional-dependencies]
43+
dev = [
44+
# Import and export
45+
"networkx",
46+
# Construct patch graphs from images
47+
"scikit-image",
48+
# Approximate nearest neighbors for kNN graphs
49+
"pyflann3",
50+
# Convex optimization on graph
51+
"pyunlocbox",
52+
# Plot graphs, signals, and filters
53+
"matplotlib",
54+
# Interactive graph visualization
55+
"pyqtgraph",
56+
"PyOpenGL",
57+
"PyQt5",
58+
# Run the tests
59+
"flake8",
60+
"coverage",
61+
"coveralls",
62+
"pytest",
63+
"pytest-cov",
64+
# Build the documentation
65+
"sphinx",
66+
"numpydoc",
67+
"sphinxcontrib-bibtex",
68+
"sphinx-gallery",
69+
"memory_profiler",
70+
"sphinx-rtd-theme",
71+
"sphinx-copybutton",
72+
# Build and upload packages
73+
"wheel",
74+
"twine",
75+
]
76+
77+
test = [
78+
"pytest",
79+
"pytest-cov",
80+
"flake8",
81+
"coverage",
82+
]
83+
84+
docs = [
85+
"sphinx",
86+
"numpydoc",
87+
"sphinxcontrib-bibtex",
88+
"sphinx-gallery",
89+
"memory_profiler",
90+
"sphinx-rtd-theme",
91+
"sphinx-copybutton",
92+
]
93+
94+
plot = [
95+
"matplotlib",
96+
"pyqtgraph",
97+
"PyOpenGL",
98+
"PyQt5",
99+
]
100+
101+
[project.urls]
102+
Homepage = "https://github.com/epfl-lts2/pygsp"
103+
Documentation = "https://pygsp.readthedocs.io"
104+
Download = "https://pypi.org/project/PyGSP"
105+
"Source Code" = "https://github.com/epfl-lts2/pygsp"
106+
"Bug Tracker" = "https://github.com/epfl-lts2/pygsp/issues"
107+
"Try It Online" = "https://mybinder.org/v2/gh/epfl-lts2/pygsp/master?urlpath=lab/tree/examples/playground.ipynb"
108+
109+
[tool.setuptools.packages.find]
110+
include = ["pygsp*"]
111+
112+
[tool.setuptools.package-data]
113+
pygsp = ["data/pointclouds/*.mat"]
114+
115+
[tool.pytest.ini_options]
116+
testpaths = ["pygsp/tests"]
117+
python_files = ["test_*.py"]
118+
python_classes = ["Test*"]
119+
python_functions = ["test_*"]
120+
121+
[tool.coverage.run]
122+
source = ["pygsp"]
123+
omit = ["*/tests/*"]
124+
125+
[tool.coverage.report]
126+
exclude_lines = [
127+
"pragma: no cover",
128+
"def __repr__",
129+
"if self.debug:",
130+
"if settings.DEBUG",
131+
"raise AssertionError",
132+
"raise NotImplementedError",
133+
"if 0:",
134+
"if __name__ == .__main__.:",
135+
]
136+
137+
[tool.flake8]
138+
max-line-length = 88
139+
extend-ignore = ["E203", "W503"]

0 commit comments

Comments
 (0)