File tree 5 files changed +28
-5
lines changed
5 files changed +28
-5
lines changed Original file line number Diff line number Diff line change 8
8
- " docs/**"
9
9
- " .github/workflows/deploy-book.yaml"
10
10
- " README.md"
11
+ - " python/**"
11
12
12
13
# Allows you to run this workflow manually from the Actions tab
13
14
workflow_dispatch :
@@ -33,11 +34,18 @@ jobs:
33
34
MDBOOK_VERSION : 0.4.21
34
35
steps :
35
36
- uses : actions/checkout@v3
36
- - name : Install mdBook
37
+ - name : Install mdBook and supporting dependencies
37
38
run : |
38
39
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf -y | sh
39
40
rustup update
40
41
cargo install --version ${MDBOOK_VERSION} mdbook
42
+ - name : Build python docs
43
+ run :
44
+ sudo apt update
45
+ sudo apt install pipx
46
+ pipx ensurepath
47
+ pipx install pydoc-markdown
48
+ pydoc-markdown -I python/ -p fastsim --render-toc > docs/src/python_docs.md
41
49
- name : Setup Pages
42
50
id : pages
43
51
uses : actions/configure-pages@v3
Original file line number Diff line number Diff line change 4
4
- [ Documentation] ( ./doc.md )
5
5
- [ Rust API] ( ./doc/rust.md )
6
6
- [ Rail Network] ( ./doc/rail-network.md )
7
+ - [ Python API] ( ./doc/python-doc.md )
7
8
- [ Press Releases] ( ./press-releases.md )
8
9
- [ How to Update This Book] ( ./how-to-update.md )
Original file line number Diff line number Diff line change 1
- # Documentation
1
+ # Documentation
2
+
3
+ ## [ Python] ( ./doc/python-doc.md )
4
+
5
+ ## [ Rust] ( ./doc/rust.md )
Original file line number Diff line number Diff line change
1
+ # Python API Documentation
Original file line number Diff line number Diff line change 4
4
5
5
## Setup
6
6
7
- 1 . If not already done, [ install mdbook] ( https://rust-lang.github.io/mdBook/guide/installation.html )
7
+ If not already done, [ install mdbook] ( https://rust-lang.github.io/mdBook/guide/installation.html )
8
8
9
- ## Publishing
10
9
10
+ ## Serving locally
11
+ Run th following in the repository root directory:
12
+ 1 . If any python files were modified,
13
+ 1 . Install [ pipx] ( https://github.com/pypa/pipx#install-pipx )
14
+ 1 . Install [ pydoc-markdown] ( https://niklasrosenstein.github.io/pydoc-markdown/#installation- )
15
+ 1 . run ` pydoc-markdown -I python/ -p fastsim --render-toc > docs/src/python_docs.md ` . Do not modify this file manually.
16
+ 1 . Run ` mdbook serve --open docs/ `
17
+
18
+
19
+ ## Publishing
11
20
1 . Update ` book.toml ` or files in ` docs/src/ `
12
- 1 . Make sure the docs look good locally: ` mdbook build docs/ --open `
21
+ 1 . Make sure the docs look good locally by running the steps in [ Serving Locally ] ( #serving-locally )
13
22
1 . Commit files and push to ` main ` branch
14
23
15
24
After that, a GitHub action will build the book and publish it [ here] ( https://pages.github.nrel.gov/MBAP/mbap-computing/ )
You can’t perform that action at this time.
0 commit comments