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-based computational geometry package for constructing and analyzing proximity and biological graphs, facilitating computational experimentation. It provides tools to generate and transform random and structured point sets and to build graphs from them. Its current scope comprises 13 geometric graphs, most of them proximity graphs—such as the Delaunay triangulation, the Gabriel graph, the Relative Neighborhood graph, and the Sphere-of-Influence graph—as well as the complete graph, the Erdős-Rényi random graph and two bio-inspired graphs.

Installation

We are on pipi! https://pypi.org/project/proximitygraphs/

pip install proximitygraphs

Or the editable on github

python -m pip install -e ".[dev, docs, gis]"

and to update the page

python -m sphinx -b html docs/source docs/build/html

Before pushing

python -m pytest
python -m ruff check .

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 project uses a src layout: source code lives in src/proximitygraphs/, while the public import remains import proximitygraphs as pg.

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.0a2.tar.gz (13.4 MB 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.0a2-py3-none-any.whl (98.2 kB view details)

Uploaded Python 3

File details

Details for the file proximitygraphs-0.1.0a2.tar.gz.

File metadata

  • Download URL: proximitygraphs-0.1.0a2.tar.gz
  • Upload date:
  • Size: 13.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for proximitygraphs-0.1.0a2.tar.gz
Algorithm Hash digest
SHA256 28f60192165173421f5f4c68bd80ed29c48d7fe4f594107bae0fe335a8242b96
MD5 cca16bc58f64dbf73ba49bd3cf45aca1
BLAKE2b-256 e5bb9a101f483d2ad11f9a899c5df60cdb902f9d0673a6b5b8459665c9ed7f0f

See more details on using hashes here.

Provenance

The following attestation bundles were made for proximitygraphs-0.1.0a2.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.0a2-py3-none-any.whl.

File metadata

File hashes

Hashes for proximitygraphs-0.1.0a2-py3-none-any.whl
Algorithm Hash digest
SHA256 bc2dd332afe5b2336221e00e754c6020717a8e20792e56a6a26b99c748415e3d
MD5 23351e2cf35a0f1aeb4be668525e8a32
BLAKE2b-256 3129ba896e016d55511951e1f615c30f1c5adb576c91a146b60c1992efc3b882

See more details on using hashes here.

Provenance

The following attestation bundles were made for proximitygraphs-0.1.0a2-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