Metadata-Version: 2.4
Name: clingraph
Version: 1.2.2
Summary: A visualizer for graphs defined as facts with special integration for clingo.
Author-email: Susana Hahn <hahnmartinlu@uni-potsdam.de>
License: MIT License
        
        Copyright (c) 2024 Susana Hahn
        
        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/potassco/clingraph
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: clingo>=5.5.0
Requires-Dist: clorm>=1.3.6
Requires-Dist: graphviz
Requires-Dist: networkx>=2.6
Requires-Dist: jsonschema
Requires-Dist: jinja2
Provides-Extra: format
Requires-Dist: black; extra == "format"
Requires-Dist: isort; extra == "format"
Requires-Dist: autoflake; extra == "format"
Provides-Extra: lint-pylint
Requires-Dist: pylint; extra == "lint-pylint"
Provides-Extra: typecheck
Requires-Dist: types-setuptools; extra == "typecheck"
Requires-Dist: mypy; extra == "typecheck"
Provides-Extra: test
Requires-Dist: coverage[toml]; extra == "test"
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Provides-Extra: doc
Requires-Dist: nbsphinx>=0.8.8; extra == "doc"
Requires-Dist: sphinx; extra == "doc"
Requires-Dist: furo; extra == "doc"
Requires-Dist: sphinx_inline_tabs; extra == "doc"
Requires-Dist: sphinx_copybutton; extra == "doc"
Requires-Dist: myst-parser; extra == "doc"
Requires-Dist: sphinx-rtd-theme==0.5.2; extra == "doc"
Requires-Dist: pypandoc; extra == "doc"
Requires-Dist: imageio; extra == "doc"
Requires-Dist: jinja2>=3.0.3; extra == "doc"
Provides-Extra: tex
Requires-Dist: dot2tex; extra == "tex"
Provides-Extra: gif
Requires-Dist: imageio==2.28; extra == "gif"
Requires-Dist: pillow; extra == "gif"
Provides-Extra: dev
Requires-Dist: clingraph[lint_pylint,test,typecheck]; extra == "dev"
Dynamic: license-file

# clingraph

A **declarative visualizer for graphs** defined as a set of facts. The graphs
are generated using [graphviz](https://graphviz.org) but are defined via fixed
predicates that can be computed from logic programs.

***Graph defined by facts***

```prolog
node(clingraph). node(visual). node(asp).
edge((clingraph,visual)). edge((clingraph,asp)).
attr(node,clingraph,style,filled).
```

***Visualization*** ![](./docs/clingraph.png)

Clingraph also contains **special features** for integration with
**[clingo](https://potassco.org/clingo/)**, as well as for generating **latex**
code and **gifs**!

Check out our paper **[here](https://arxiv.org/pdf/2303.10118.pdf)**. This work
was published in LPNMR22 where it received the *"Best student paper award"*.

### Usage

Look at our [documentation page](https://clingraph.readthedocs.io/en/latest/)
to see how to use clingraph.

Try clingraph via
[command line](https://clingraph.readthedocs.io/en/latest/clingraph/console.html)
or as a package online in a jupyter notebook via
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/potassco/clingraph/master?labpath=notebook.ipynb)

### Examples

Our
**[examples folder](https://github.com/potassco/clingraph/tree/master/examples)**
shows how to use the range of functionalities in different applications.

- Examples used in the documentation
  ([doc](https://github.com/potassco/clingraph/tree/master/examples/doc))
  - *Attribute definition*
    ([example1](https://github.com/potassco/clingraph/tree/master/examples/doc/example1))
  - *Multi graphs*
    ([example2](https://github.com/potassco/clingraph/tree/master/examples/doc/example2))
  - *Subgraphs*
    ([example3](https://github.com/potassco/clingraph/tree/master/examples/doc/example3))
  - *Complex attributes*
    ([example4](https://github.com/potassco/clingraph/tree/master/examples/doc/example4))
  - *Clingo integration with multi model*
    ([example5](https://github.com/potassco/clingraph/examples/doc/example5))
  - *Latex integration*
    ([example6](https://github.com/potassco/clingraph/tree/master/examples/doc/example6))
- Simple
  ([color](https://github.com/potassco/clingraph/tree/master/examples/color),
  [cube](https://github.com/potassco/clingraph/tree/master/examples/cube),
  [lights](https://github.com/potassco/clingraph/tree/master/examples/lights))
- Clingo integration
  ([sudoku](https://github.com/potassco/clingraph/tree/master/examples/sudoku),
  [reify](https://github.com/potassco/clingraph/tree/master/examples/reify),
  [transition_system](https://github.com/potassco/clingraph/tree/master/examples/transition_system))
  - *Absolute positioning*
  - *Legends*
  - *Latex integration*
- Dynamic applications
  ([asprilo](https://github.com/potassco/clingraph/tree/master/examples/asprilo),
  [elevator](https://github.com/potassco/clingraph/tree/master/examples/elevator),
  [minotaur](https://github.com/potassco/clingraph/tree/master/examples/minotaur))
  - *Clingo integration*
  - *Multi graphs*
  - *Animation via Gif*
- SVG interaction
  ([family_tree](https://github.com/potassco/clingraph/tree/master/examples/family_tree),
  [queens_interactive](https://github.com/potassco/clingraph/tree/master/examples/queens_interactive),
  [minesweeper](https://github.com/potassco/clingraph/tree/master/examples/minesweeper))
  - *Interaction using SVG*
- Visualizing the
  [solving](https://github.com/potassco/clingraph/tree/master/examples/propagator)
  and
  [program structure](https://github.com/potassco/clingraph/tree/master/examples/ast)

## Installation

To install the project, run

```bash
pip install .
```

Notice that graphviz needs to be installed on your system. You can find
instructions to do so [here](https://graphviz.org/download/).

For detailed instructions to install from source and pip see our
[documentation page](https://clingraph.readthedocs.io/en/latest/clingraph/installation.html).
