Skip to main content

Python tools for constructing, comparing, and experimenting with proximity graphs on planar point sets.

Project description

CI Docs

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.SetPoints for generating or loading planar point sets.
  • pg.GeometricGraph for 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.Experiment for repeated simulations and metric aggregation.
  • pg.PhysarumGraph for 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

proximitygraphs-0.1.0a1.tar.gz (58.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

proximitygraphs-0.1.0a1-py3-none-any.whl (54.1 kB view details)

Uploaded Python 3

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

Hashes for proximitygraphs-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 f955d535041ee6c824ee2f7f1f1293be36c1bc5604ef4bfd36461bffc5fe684d
MD5 e66ba7a69ee13bc2e3e3cf8b305bde0a
BLAKE2b-256 6a8b660be5c5d6e858fb27e83a01bea3913cb7feb347cd33ded60b66ea8c0618

See more details on using hashes here.

Provenance

The following attestation bundles were made for proximitygraphs-0.1.0a1.tar.gz:

Publisher: publish.yml on HectorMaravillo/ProximityGraphs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file proximitygraphs-0.1.0a1-py3-none-any.whl.

File metadata

File hashes

Hashes for proximitygraphs-0.1.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 a4bffbb31ec57dcf4af684eba8559d368390b9ef98445d9aa48161b69ecf48eb
MD5 066995caf94a4d771c5d2e3ba0aa5bc1
BLAKE2b-256 c8fe6edd29f922d5f670d7011d992d1dadd52b08c45e63a64878265110a78180

See more details on using hashes here.

Provenance

The following attestation bundles were made for proximitygraphs-0.1.0a1-py3-none-any.whl:

Publisher: publish.yml on HectorMaravillo/ProximityGraphs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page