Python tools for constructing, comparing, and experimenting with proximity graphs on planar point sets.
Project description
ProximityGraphs
ProximityGraphs is a Python library for generating planar point sets, building proximity graphs on top of them, and comparing graph families under a shared interface. The package combines geometric graph constructors such as Delaunay triangulations, Gabriel graphs, relative neighborhood graphs, minimum spanning trees, unit disk graphs, alpha shapes, and gamma graphs with a small experiment framework and bio-inspired graph models.
The project is aimed at teaching, exploratory computational geometry, and reproducible experiments on planar point patterns. It builds on NumPy, SciPy, igraph, matplotlib, and pandas while keeping GIS exports optional.
Installation
Install the core package in editable mode:
python -m pip install -e .
Install development tools:
python -m pip install -e ".[dev]"
Install optional GIS support for GeoPandas/Shapely-based helpers:
python -m pip install -e ".[gis]"
Install documentation dependencies:
python -m pip install -e ".[docs,gis]"
Quickstart
import proximitygraphs as pg
points = pg.SetPoints.grid(shape=(3, 3))
mst = pg.MST(points)
unit_disk = pg.Unit_Disk(points, dist_max=1.01)
print(points.n) # 9 vertices
print(mst.m) # 8 edges
print(unit_disk.graph.get_edgelist())
A runnable example script is available at examples/quickstart.py.
API Overview
The main entry points are:
pg.SetPointsfor generating or loading planar point sets.pg.GeometricGraphfor graph operations, analysis helpers, and visualization.pg.DelaunayG,pg.GG,pg.RNG,pg.MST,pg.Unit_Disk,pg.Alpha_Shape, and related classes for proximity graph construction.pg.Experimentfor repeated simulations and metric aggregation.pg.PhysarumGraphfor the package's current bio-inspired graph model.
GIS helpers such as SetPoints.from_geopandas() and GeometricGraph.to_gpd_lines() require the optional gis extra.
Reproducibility / Installation
This repository is configured and tested for:
- Windows local development
- GitHub Actions on Ubuntu
- Python 3.10, 3.11, 3.12, 3.13 and 3.14
The recommended validation sequence is:
python -m pip install -e ".[dev]"
python -m pytest -q
python -m ruff check .
python -m ruff format --check .
Citation
Software citation metadata is provided in CITATION.cff. A JOSS-ready manuscript draft is provided in paper.md.
The Zenodo DOI is still pending. Until archival metadata is finalized, use the versioned software citation in CITATION.cff and update it after a DOI is minted.
License
ProximityGraphs is distributed under the MIT License. See LICENSE.
Reporting Issues
Bug reports and feature requests should be filed through GitHub Issues. Security-sensitive issues should follow SECURITY.md.
Contributing
Development setup and contribution expectations are documented in CONTRIBUTING.md.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file proximitygraphs-0.1.0a1.tar.gz.
File metadata
- Download URL: proximitygraphs-0.1.0a1.tar.gz
- Upload date:
- Size: 58.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f955d535041ee6c824ee2f7f1f1293be36c1bc5604ef4bfd36461bffc5fe684d
|
|
| MD5 |
e66ba7a69ee13bc2e3e3cf8b305bde0a
|
|
| BLAKE2b-256 |
6a8b660be5c5d6e858fb27e83a01bea3913cb7feb347cd33ded60b66ea8c0618
|
Provenance
The following attestation bundles were made for proximitygraphs-0.1.0a1.tar.gz:
Publisher:
publish.yml on HectorMaravillo/ProximityGraphs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
proximitygraphs-0.1.0a1.tar.gz -
Subject digest:
f955d535041ee6c824ee2f7f1f1293be36c1bc5604ef4bfd36461bffc5fe684d - Sigstore transparency entry: 1629030468
- Sigstore integration time:
-
Permalink:
HectorMaravillo/ProximityGraphs@96cd31d690cd55cb1feab79dacb83bdbcc42787c -
Branch / Tag:
refs/tags/v0.1.0a1 - Owner: https://github.com/HectorMaravillo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@96cd31d690cd55cb1feab79dacb83bdbcc42787c -
Trigger Event:
release
-
Statement type:
File details
Details for the file proximitygraphs-0.1.0a1-py3-none-any.whl.
File metadata
- Download URL: proximitygraphs-0.1.0a1-py3-none-any.whl
- Upload date:
- Size: 54.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4bffbb31ec57dcf4af684eba8559d368390b9ef98445d9aa48161b69ecf48eb
|
|
| MD5 |
066995caf94a4d771c5d2e3ba0aa5bc1
|
|
| BLAKE2b-256 |
c8fe6edd29f922d5f670d7011d992d1dadd52b08c45e63a64878265110a78180
|
Provenance
The following attestation bundles were made for proximitygraphs-0.1.0a1-py3-none-any.whl:
Publisher:
publish.yml on HectorMaravillo/ProximityGraphs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
proximitygraphs-0.1.0a1-py3-none-any.whl -
Subject digest:
a4bffbb31ec57dcf4af684eba8559d368390b9ef98445d9aa48161b69ecf48eb - Sigstore transparency entry: 1629030472
- Sigstore integration time:
-
Permalink:
HectorMaravillo/ProximityGraphs@96cd31d690cd55cb1feab79dacb83bdbcc42787c -
Branch / Tag:
refs/tags/v0.1.0a1 - Owner: https://github.com/HectorMaravillo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@96cd31d690cd55cb1feab79dacb83bdbcc42787c -
Trigger Event:
release
-
Statement type: