Skip to content

Commit 86d2546

Browse files
author
Damian Rouson
committed
doc(README): fix descriptions of new examples
1 parent 1a2ef55 commit 86d2546

File tree

1 file changed

+27
-6
lines changed

1 file changed

+27
-6
lines changed

README.md

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,30 @@ fpm run --example
4545
```
4646
Please report any test failures by submitting an [issue] on the DAG repository.
4747

48-
Example
49-
-------
48+
Examples
49+
--------
50+
51+
The [example] subdirectory provides the following examples:
5052

51-
The [./example/feats-dependency-tree.f90] program provides an example of the use of dag to
52-
describe the module dependencies in an early version of the Framework for Extensible Asynchronous
53-
Task Scheduling ([FEATS]). The example also writes the following image to a `.pdf` file:
53+
* [print-to-json.f90] - constructs and prints it a JSON representation the DAG.
54+
Run this example and redirect the output to a file as follows:
55+
```
56+
fpm run --example print-to-json > dag.json
57+
```
58+
* [read-from-json.f90] - constructs a DAG by reading from a JSON file.
59+
Run this example as follows:
60+
```
61+
fpm run --example read-from-json > dag.json
62+
```
63+
* [dag-to-dot.f90] - constructs a DAG describing the module dependencies in
64+
an early version of the Framework for Extensible Asynchronous
65+
Task Scheduling ([FEATS]) and prints the DAG to a .dot file suitable for
66+
conversion to a `.pdf` as follows:
67+
```
68+
fpm run --example dag-to-dot > feats-dag.dot
69+
dot -Tpdf -o feats.pdf feats.dot
70+
```
71+
which should produce the graph below.
5472

5573
![feats-dependencies](https://user-images.githubusercontent.com/13108868/133311851-721b7cda-1d10-4ee1-a51d-6169ca624839.png)
5674

@@ -75,6 +93,9 @@ This library is released under a [BSD-3 license].
7593
[JSON]: https://www.json.org/json-en.html
7694
[jsonff]: https://gitlab.com/everythingfunctional/jsonff
7795
[./src/dag_test.f90]: ./src/dag_test.f90
78-
[./example/feats-dependency-tree.f90]: ./example/feats-dependency-tree.f90
96+
[example]: ./example/
7997
[FEATS]: https://github.com/sourceryinstitute/feats
8098
[Assert]: https://github.com/sourceryinstitute/assert
99+
[print-to-json.f90]: ./example/print-to-json.f90
100+
[read-from-json.f90]:./example/read-from-json.f90
101+
[dag-to-dot.f90]: ./example/dag-to-dot.f90

0 commit comments

Comments
 (0)