Skip to content

Commit e90f4ad

Browse files
authored
Merge pull request #250 from sandialabs/249-add-output-from-the-example-in-the-readme
docs: Include output from first example in README
2 parents 74a1d8b + fd78f50 commit e90f4ad

File tree

2 files changed

+103
-0
lines changed

2 files changed

+103
-0
lines changed

README.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,57 @@ if __name__ == "__main__":
7272
my_script.main(sys.argv[1:])
7373
```
7474

75+
Executing the script then yields
76+
```
77+
>>> my_staged_script.py --stage hello goodbye
78+
[07:34:19] ╭─────────────────────────────────────────────╮ staged_script.py:937
79+
│ Greeting the user │
80+
╰─────────────────────────────────────────────╯
81+
Executing: echo 'Hello World' staged_script.py:827
82+
Hello World
83+
`hello` stage duration: 0:00:00.020772 staged_script.py:476
84+
╭─────────────────────────────────────────────╮ staged_script.py:937
85+
│ Bidding farewell │
86+
╰─────────────────────────────────────────────╯
87+
Executing: echo 'Goodbye World' staged_script.py:827
88+
Goodbye World
89+
`goodbye` stage duration: 0:00:00.012504 staged_script.py:476
90+
───────────────── ex_0_the_basics.py Script Execution Summary ─────────────────
91+
staged_script.py:920
92+
➤ Ran the following:
93+
94+
ex_0_the_basics.py \
95+
--stage hello goodbye \
96+
--hello-retry-attempts 0 \
97+
--hello-retry-delay 0 \
98+
--hello-retry-timeout 60 \
99+
--goodbye-retry-attempts 0 \
100+
--goodbye-retry-delay 0 \
101+
--goodbye-retry-timeout 60
102+
103+
➤ Commands executed:
104+
105+
echo 'Hello World'
106+
echo 'Goodbye World'
107+
108+
➤ Timing results:
109+
110+
┏━━━━━━━━━┳━━━━━━━━━━━━━━━━┓
111+
┃ Stage ┃ Duration ┃
112+
┡━━━━━━━━━╇━━━━━━━━━━━━━━━━┩
113+
│ hello │ 0:00:00.020772 │
114+
│ goodbye │ 0:00:00.012504 │
115+
├─────────┼────────────────┤
116+
│ Total │ 0:00:00.035295 │
117+
└─────────┴────────────────┘
118+
119+
➤ Script result:
120+
121+
Success
122+
123+
─────────────── End ex_0_the_basics.py Script Execution Summary ───────────────
124+
```
125+
75126
For more detailed usage and API information, please see
76127
[our documentation][docs].
77128

doc/source/index.rst

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,58 @@ Once the package is installed, you can simply
102102
:lines: 10-
103103
:caption: ``example/ex_0_the_basics.py``
104104

105+
Executing the script then yields
106+
107+
.. code-block:: text
108+
109+
>>> ./ex_0_the_basics.py --stage hello goodbye
110+
[07:34:19] ╭─────────────────────────────────────────────╮ staged_script.py:937
111+
│ Greeting the user │
112+
╰─────────────────────────────────────────────╯
113+
Executing: echo 'Hello World' staged_script.py:827
114+
Hello World
115+
`hello` stage duration: 0:00:00.020772 staged_script.py:476
116+
╭─────────────────────────────────────────────╮ staged_script.py:937
117+
│ Bidding farewell │
118+
╰─────────────────────────────────────────────╯
119+
Executing: echo 'Goodbye World' staged_script.py:827
120+
Goodbye World
121+
`goodbye` stage duration: 0:00:00.012504 staged_script.py:476
122+
───────────────── ex_0_the_basics.py Script Execution Summary ─────────────────
123+
staged_script.py:920
124+
➤ Ran the following:
125+
126+
ex_0_the_basics.py \
127+
--stage hello goodbye \
128+
--hello-retry-attempts 0 \
129+
--hello-retry-delay 0 \
130+
--hello-retry-timeout 60 \
131+
--goodbye-retry-attempts 0 \
132+
--goodbye-retry-delay 0 \
133+
--goodbye-retry-timeout 60
134+
135+
➤ Commands executed:
136+
137+
echo 'Hello World'
138+
echo 'Goodbye World'
139+
140+
➤ Timing results:
141+
142+
┏━━━━━━━━━┳━━━━━━━━━━━━━━━━┓
143+
┃ Stage ┃ Duration ┃
144+
┡━━━━━━━━━╇━━━━━━━━━━━━━━━━┩
145+
│ hello │ 0:00:00.020772 │
146+
│ goodbye │ 0:00:00.012504 │
147+
├─────────┼────────────────┤
148+
│ Total │ 0:00:00.035295 │
149+
└─────────┴────────────────┘
150+
151+
➤ Script result:
152+
153+
Success
154+
155+
─────────────── End ex_0_the_basics.py Script Execution Summary ───────────────
156+
105157
For more detailed usage information, see the :doc:`examples` page. For
106158
implementation details, see the :doc:`reference` documentation.
107159

0 commit comments

Comments
 (0)