Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion .github/workflows/docs_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,25 @@ jobs:

- name: Build the docs
working-directory: docs
run: make html
run: make html

- name: Run Python snippets
run: |
python -c '
from docutils.core import publish_doctree
from docutils import nodes
from docutils.parsers.rst import roles

def dummy_role(name, rawtext, text, lineno, inliner, options=None, content=None):
return [nodes.Text(text)], []

roles.register_local_role("doc", dummy_role)

rst = open("docs/source/user/first_mcdc.rst").read()

for node in publish_doctree(rst).findall(nodes.literal_block):
if node.get("classes") == ["code", "python3"]:
print(node.astext())
' > tmp.py
cat -n tmp.py
python tmp.py
2 changes: 1 addition & 1 deletion docs/source/user/first_mcdc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ and GPUs (AMD and Nvidia) and supports threading with MPI (Python or compiled mo
Other guides are included to execute in these modes but for the sake of this first
MC/DC simulation we will simply execute in Python mode (slower, no acceleration) simply with

.. code-block:: python3
.. code-block:: bash

python input.py

Expand Down