Skip to content

Commit 1842a93

Browse files
authored
Update Config Visualizer (#351)
1 parent 4b5d2ee commit 1842a93

File tree

1 file changed

+34
-22
lines changed

1 file changed

+34
-22
lines changed

pages/docs/tooling/tooling-config-visualization.md

Lines changed: 34 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -24,47 +24,51 @@ This has a few important benefits:
2424

2525
Please first install the dependencies:
2626

27-
* `python3` and `pip` or `pipx`
27+
* `python3` and `pipx` (or `pip`)
2828
* [`graphviz`](https://graphviz.org/download/) for rendering the result.
2929

30-
We recommend installing the `config-visualizer` straight from [GitHub](https://github.com/precice/config-visualizer):
30+
Then install the latest version straight from PyPi:
3131

3232
```bash
33-
pipx install https://github.com/precice/config-visualizer/archive/master.zip
34-
# or
35-
pip3 install --user https://github.com/precice/config-visualizer/archive/master.zip
33+
pipx install precice-config-visualizer
3634
```
3735

38-
In case you want to tinker with the software, you can clone the repository and install the package locally.
36+
Alternatively, you can install the latest develop version from the repository
3937

4038
```bash
41-
git clone https://github.com/precice/config-visualizer.git
42-
43-
pipx install -e config-visualizer
44-
# or
45-
pip3 install --user -e config-visualizer
39+
pipx install https://github.com/precice/config-visualizer/archive/master.zip
4640
```
4741

48-
Note: You maybe need to add your user pip installations to your path to make the config visualizer findable, i.e.
42+
## General usage
4943

50-
```bash
51-
export PATH=$PATH:$HOME/.local/bin
52-
```
44+
The configuration visualizer comes with a CLI and a GUI, which serve different purposes:
45+
46+
* Use the GUI to quickly explore a configuration and change the visualization parameters.
47+
* Use the CLI to automatriclaly generate graphs from preCICE configuration files or to heavily customize them to suite your own needs.
5348

54-
## Usage
49+
## Using the GUI
5550

56-
The config visualizer can be used interactively:
51+
To open the interactive GUI and optionally pass a path to a configuration file:
5752

5853
```bash
54+
precice-config-visualizer-gui
55+
# Or directly open the precice-config.xml
5956
precice-config-visualizer-gui precice-config.xml
6057
```
6158

62-
Alternatively, you can generate a graph and transform it to a readable format, e.g., pdf.
59+
The application automatically reloads configuration files on change and shows parsing errors at the bottom. This is especially useful for rapid prototyping.
60+
61+
Desktop integration is still lacking with commonly used tools for installin python packages.
62+
If you want your launcher to pick up the tool, you can save [its desktop file](https://raw.githubusercontent.com/precice/config-visualizer/master/data/org.precice.config_visualizer.desktop) manually to the directory `~/.local/share/applications/`. The directory may need to be created first.
6363

64-
1. Use `precice-config-visualizer -o config.dot precice-config.xml` to generate the graph in the `.dot` format.
64+
## Using the CLI
6565

66-
2. Use `dot -Tpdf -ofile config.pdf config.dot` to layout the result and output a given format such as pdf.
67-
This program is part of graphviz.
66+
Alternatively, you can generate [a DOT graph](https://graphviz.org/doc/info/lang.html) and transform it to a presentable format, e.g., PDF or PNG.
67+
68+
1. Use `precice-config-visualizer -o config.dot precice-config.xml` to generate the grpah `config.dot` from the `precice-config.xml` file.
69+
70+
2. Use `dot -Tpdf -O config.dot` to layout the graph in `config.dot`, generating a `config.pdf`.
71+
This program is part of graphviz and there are many more output formats possible.
6872

6973
These commands support piping, so you can also execute:
7074

@@ -86,14 +90,22 @@ For some properties, the following options are available:
8690
* **merged** shows available relations between components without full detail. Multiple edges between components will be merged into a single one.
8791
* **hide** hides all relations.
8892

89-
These options are currently available for:
93+
These options are currently available for many information types, including:
9094

9195
* **data access** participants using `read-data` and `write-data` to access data on meshes.
9296
* **data exchange** participants `exchange`ing data between meshes.
9397
* **communicators** configured `m2n` connections between participants.
9498
* **coupling schemes** configured `cplscheme`s between participants.
9599
* **mapping schemes** configured `mapping`s between meshes.
96100

101+
These options can be visually adjusted in the GUI or passed via command line arguments to the CLI.
102+
The GUI also provides some presets, which is a one-click setup of many options.
103+
To see the full list of options, run:
104+
105+
```bash
106+
precice-config-visualizer --help
107+
```
108+
97109
## Examples
98110

99111
These examples are based on the elastictube1d example.

0 commit comments

Comments
 (0)