File tree Expand file tree Collapse file tree 4 files changed +44
-1
lines changed Expand file tree Collapse file tree 4 files changed +44
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Generate Python Documentation
2+
3+ on : [pull_request]
4+
5+ jobs :
6+ build-docs :
7+ runs-on : ubuntu-22.04
8+ steps :
9+ - name : Checkout Repository
10+ uses : actions/checkout@v3
11+
12+ - name : Set up Python 3.10
13+ uses : actions/setup-python@v4
14+ with :
15+ python-version : ' 3.10'
16+
17+ - name : Install Dependencies
18+ run : |
19+ python -m pip install --upgrade pip
20+ pip install .[dev]
21+
22+ - name : Generate Documentation
23+ run : pdoc example --output-dir docs
24+
25+ - name : Archive Documentation
26+ uses : actions/upload-artifact@v4
27+ with :
28+ name : documentation
29+ path : docs/
Original file line number Diff line number Diff line change @@ -163,3 +163,8 @@ cython_debug/
163163# and can be added to the global gitignore or merged into this file. For a more nuclear
164164# option (not recommended) you can uncomment the following to ignore the entire idea folder.
165165# .idea/
166+
167+ # generate documentation
168+ docs /* .html
169+ docs /* .js
170+ docs /example /
Original file line number Diff line number Diff line change @@ -143,4 +143,12 @@ Then, if all tests are sucessful:
143143 The main guidelines for the coding style is defined by [ PEP8] ( https://peps.python.org/pep-0008/ ) . You can directly refer to the examples in the code.
144144
145145 Specific choices are detailed in dedicated document:
146- - for the mathematical notation please refer to [ Coding convention for Maths] ( docs/convention_maths.md )
146+ - for the mathematical notation please refer to [ Coding convention for Maths] ( docs/convention_maths.md )
147+
148+ ## Documentation
149+
150+ The documentation is generated with [ pdoc] ( https://pdoc.dev ) , automatically with the CI. To generate it locally you can run:
151+
152+ ```
153+ pdoc example --output-dir docs
154+ ```
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ dev = black==24.10.0
3232 coverage ==7.3.2
3333 mypy ==1.8.0
3434 isort ==5.13.2
35+ pdoc ==14.7.0
3536
3637[options.entry_points]
3738console_scripts =
You can’t perform that action at this time.
0 commit comments