Skip to content

Commit aeb757c

Browse files
authored
Merge pull request #21 from sandialabs/fill-out-docs
Create documentation and examples
2 parents a238877 + 5336421 commit aeb757c

26 files changed

+2070
-347
lines changed

.bandit

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[bandit]
2+
skips = B603

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ Before you begin hacking on `staged-script`, you'll need to do a few things:
4848
```
4949
3. **Run the Examples:** Ensure you can run all the examples with
5050
```bash
51-
cd /path/to/reverse_argparse/example
51+
cd /path/to/staged-script/example
5252
./run-all.bash
5353
```
5454
4. **Build the Documentation:** Ensure you can build the documentation with
5555
```bash
56-
cd /path/to/reverse_argparse/doc
56+
cd /path/to/staged-script/doc
5757
./make-html.bash
5858
```
5959

README.md

+11-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,12 @@ python3 -m pip install staged-script
4747

4848
Once installed, you can simply
4949
```python
50+
import sys
51+
from typing import List
52+
5053
from staged_script import StagedScript
5154

55+
5256
class MyScript(StagedScript):
5357

5458
@StagedScript.stage("hello", "Greeting the user")
@@ -59,14 +63,15 @@ class MyScript(StagedScript):
5963
def say_goodbye(self) -> None:
6064
self.run("echo 'Goodbye World'", shell=True)
6165

62-
def main(self, argv: list[str]) -> None:
66+
def main(self, argv: List[str]) -> None:
6367
self.parse_args(argv)
6468
try:
6569
self.say_hello()
6670
self.say_goodbye()
6771
finally:
6872
self.print_script_execution_summary()
6973

74+
7075
if __name__ == "__main__":
7176
my_script = MyScript({"hello", "goodbye"})
7277
my_script.main(sys.argv[1:])
@@ -102,6 +107,10 @@ See [LICENSE.md](LICENSE.md).
102107
## Credits
103108

104109
Special thanks to [the GMS project][gms] for investing in the development of
105-
this package.
110+
this package. Aspects of this functionality were inspired by the
111+
[SPiFI][spifi] Jenkins Pipeline plugin and the [ShellLogger][shelllogger]
112+
Python package.
106113

107114
[gms]: https://github.com/SNL-GMS/GMS-PI25
115+
[spifi]: https://github.com/sandialabs/SPiFI
116+
[shelllogger]: https://github.com/sandialabs/shell-logger

doc/requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ sphinx
44
sphinx-autodoc-typehints
55
sphinx-copybutton
66
sphinx-rtd-theme
7+
sphinxcontrib-mermaid
78
sphinxcontrib-programoutput

doc/source/conf.py

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"sphinx_autodoc_typehints",
3232
"sphinx_copybutton",
3333
"sphinx_rtd_theme",
34+
"sphinxcontrib.mermaid",
3435
"sphinxcontrib.programoutput",
3536
]
3637
intersphinx_mapping = {"python": ("https://docs.python.org/3", None)}

0 commit comments

Comments
 (0)