Skip to main content

Scientific graph layout utilities.

Project description

scigraphs-utils

Utilities for scientific graph layouts.

The Python import package is scigraphs_utils.

import numpy as np
from scigraphs_utils import sfdp_layout

edges = np.array([[0, 1], [1, 2], [2, 3]], dtype=np.int32)
xy = sfdp_layout(4, edges, seed=42, overlap="false", maxiter=100)

For Graphviz parameters that are not listed explicitly, pass them as keyword arguments. They are forwarded as Graphviz graph attributes:

from scigraphs_utils import graphviz_layout

xy = graphviz_layout(4, edges, engine="sfdp", start=42, K=1.2)

Development

The current MVP builds a native extension against a local Graphviz installation:

python -m pip install -e ".[test]"
pytest

To build against a private Graphviz prefix, run:

tools/build_graphviz.sh
GRAPHVIZ_PREFIX="$PWD/build/vendor/graphviz-install" python -m pip install -e ".[test]"

Wheels

The project is configured for cibuildwheel CPython 3.13 builds. The wheel build hook compiles a pinned Graphviz release into a private prefix and builds the native extension against that prefix. On Linux, auditwheel then bundles the required shared libraries into the wheel so users do not need Graphviz installed at runtime.

python -m pip install ".[wheel]"
python -m cibuildwheel --output-dir wheelhouse

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

scigraphs_utils-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (4.9 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file scigraphs_utils-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for scigraphs_utils-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ee8d1c397e6e5fc85e79892dadc23c121b9642d5ae33765496a2f4590e509372
MD5 f98e70591d5ee7df3eda985f6dad8797
BLAKE2b-256 ea1d762d911fa6bfd4e167af5bc8568fbafca915f1008c6969b4a9c5c5bd50d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for scigraphs_utils-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on josemarinfarina/scigraphs-utils

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