Metadata-Version: 2.4
Name: scigraphs-utils
Version: 0.1.0
Summary: Scientific graph layout utilities.
Author: Jose Marin
License: MIT License
        
        Copyright (c) 2026 Jose Marin
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/josemarinfarina/scigraph-utils
Project-URL: Repository, https://github.com/josemarinfarina/scigraph-utils
Project-URL: Issues, https://github.com/josemarinfarina/scigraph-utils/issues
Keywords: graphviz,layout,graphs,sfdp,scientific-visualization
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: C++
Classifier: Topic :: Scientific/Engineering :: Visualization
Requires-Python: >=3.13
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: THIRD_PARTY_NOTICES.md
Requires-Dist: numpy>=2.1
Provides-Extra: test
Requires-Dist: pytest>=8; extra == "test"
Provides-Extra: wheel
Requires-Dist: build>=1; extra == "wheel"
Requires-Dist: cibuildwheel>=2.22; extra == "wheel"
Dynamic: license-file

# scigraphs-utils

Utilities for scientific graph layouts.

The Python import package is `scigraphs_utils`.

```python
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:

```python
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:

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

To build against a private Graphviz prefix, run:

```bash
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.

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