Skip to content

Commit 97b1289

Browse files
bitkarrotthunderbiscuit
authored andcommitted
docs: add python api documentation
1 parent 58e06a9 commit 97b1289

File tree

9 files changed

+798
-0
lines changed

9 files changed

+798
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Build Python API Docs Website
2+
3+
on: workflow_dispatch
4+
5+
jobs:
6+
deploy:
7+
runs-on: ubuntu-22.04
8+
steps:
9+
- name: "Checkout"
10+
uses: actions/checkout@v3
11+
12+
- name: "Set up Python"
13+
uses: actions/setup-python@v4
14+
with:
15+
python-version: '3.9.x'
16+
17+
- name: "Install dependencies"
18+
run: |
19+
cd ./bdk-python/
20+
python -m pip install --upgrade pip
21+
pip install -r requirements.txt
22+
pip install sphinx sphinx-rtd-theme
23+
24+
- name: "Build Python API documentation"
25+
run: |
26+
cd ./bdk-python/
27+
python scripts/generate_docs.py
28+
sphinx-build -b html -W --keep-going docs/ docs/_build/html
29+
30+
# - name: "Upload Python website"
31+
# uses: actions/upload-artifact@v4
32+
# with:
33+
# name: artifact-python-api-docs
34+
# path: /home/runner/work/bdk-ffi/bdk-ffi/bdk-python/docs/_build/html/

bdk-python/.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,10 @@ build/
1515

1616
testing-setup-py-simple-example.py
1717
localenvironment/
18+
venv
19+
env
20+
21+
# API docs
22+
api.rst
23+
index.rst
24+
_build/

bdk-python/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,11 @@ python setup.py --verbose bdist_wheel
4040
```shell
4141
pip install ./dist/bdkpython-<yourversion>.whl
4242
```
43+
44+
## generate the docs
45+
46+
```shell
47+
pip3 install --requirement requirements-dev.txt
48+
python3 scripts/generate_docs.py
49+
sphinx-build -b html -W --keep-going docs/ docs/_build/html
50+
```

0 commit comments

Comments
 (0)