diff --git a/.readthedocs.yml b/.readthedocs.yml index 13b0003085..103eb65c5f 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -10,6 +10,8 @@ build: os: ubuntu-22.04 tools: python: "3.12" + apt_packages: + - graphviz # Optionally build your docs in additional formats such as PDF and ePub formats: diff --git a/docs/requirements.txt b/docs/requirements.txt index 0c9339c546..bbb9040a49 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -6,7 +6,6 @@ m2r2==0.3.3.post2 breathe==4.35.0 sphinxcontrib-wavedrom sphinx-copybutton -sphinxcontrib-seqdiag jinja2>=3.0.3 setuptools>=57.5.0 -pillow==9.5.0 # V10 breaks seqdiag +pillow diff --git a/docs/source/conf.py b/docs/source/conf.py index 11d98d2e10..c34a3e583d 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -48,7 +48,7 @@ extensions = [ 'm2r2', 'breathe', - 'sphinxcontrib.seqdiag', + 'sphinx.ext.graphviz', 'link-roles', 'sphinxcontrib.wavedrom', 'sphinx_copybutton', diff --git a/docs/source/information/tasks.rst b/docs/source/information/tasks.rst index 339406cd69..b97bb88838 100644 --- a/docs/source/information/tasks.rst +++ b/docs/source/information/tasks.rst @@ -17,30 +17,30 @@ The BasicTask class This class uses the task queue plus a timer to provide an easy way to write a background task. All you need to is define a *loop()* function which does the work. The task has three states: -.. seqdiag:: +.. graphviz:: :caption: Task states :align: center - - seqdiag task-states { - activation = none; - node_width = 80; - node_height = 60; - edge_length = 160; - span_height = 5; - default_shape = roundedbox; - default_fontsize = 12; - - SUSPENDED [label = "suspended"]; - RUNNING [label = "running"]; - SLEEPING [label = "sleeping"]; - - SUSPENDED -> RUNNING [label = "resume()"]; - SUSPENDED -> SLEEPING [label = "sleep()"]; - RUNNING -> SLEEPING [label = "sleep()"]; - RUNNING -> SUSPENDED [label = "suspend()"]; - SLEEPING -> RUNNING [label = "resume()"]; - SLEEPING -> RUNNING [label = "timer expired"]; - SLEEPING -> SUSPENDED [label = "suspend()"]; + + digraph "task-states" { + activation = none + node_width = 80 + node_height = 60 + edge_length = 160 + span_height = 5 + default_shape = roundedbox + default_fontsize = 12 + + SUSPENDED [label = "suspended"] + RUNNING [label = "running"] + SLEEPING [label = "sleeping"] + + SUSPENDED -> RUNNING [label = "resume()"] + SUSPENDED -> SLEEPING [label = "sleep()"] + RUNNING -> SLEEPING [label = "sleep()"] + RUNNING -> SUSPENDED [label = "suspend()"] + SLEEPING -> RUNNING [label = "resume()"] + SLEEPING -> RUNNING [label = "timer expired"] + SLEEPING -> SUSPENDED [label = "suspend()"] } To see this in operation, have a look at the :sample:`Basic_Tasks` sample.