Skip to content

Commit

Permalink
Add Nitrokey Python SDK documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
robin-nitrokey committed Sep 25, 2024
1 parent 15375e2 commit c7f2ea9
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 4 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ jobs:
syntax-check:
name: Check syntax
runs-on: ubuntu-latest
container: python:3.11-slim
container: python:3.11
continue-on-error: true
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: true
- name: Create virtual environment
run: |
python -m venv venv
Expand All @@ -26,10 +28,12 @@ jobs:
build-error-check:
name: Check build error
runs-on: ubuntu-latest
container: python:3.11-slim
container: python:3.11
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: true
- name: Create virtual environment
run: |
python -m venv venv
Expand All @@ -38,4 +42,4 @@ jobs:
- name: Build documentation
run: |
. venv/bin/activate
sphinx-build -W -j 1 -a -D language='en' -b html . __preview
sphinx-build -W -j 1 -a -D language='en' -b html . __preview
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "nitrokey-sdk-py"]
path = nitrokey-sdk-py
url = https://github.com/Nitrokey/nitrokey-sdk-py.git
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@


all: __preview venv
. venv/bin/activate && sphinx-build -j auto -a -D language='en' -b html . __preview
. venv/bin/activate && pip install ./nitrokey-sdk-py && sphinx-build -j auto -a -D language='en' -b html . __preview

watch:
while true; do inotifywait -e MODIFY `find . -name '*.rst'`; make; sleep 1; done
Expand Down
7 changes: 7 additions & 0 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx_copybutton',
Expand Down Expand Up @@ -435,3 +436,9 @@

# Disables the closing of tabs if clicked on the currently active tab
sphinx_tabs_disable_tab_closing = True

# -- Options for autodoc extension -------------------------------------------

autodoc_class_signature = 'separated'
autodoc_member_order = 'groupwise'
autodoc_typehints = 'description'
1 change: 1 addition & 0 deletions nitrokey-sdk-py
Submodule nitrokey-sdk-py added at 4fa730
1 change: 1 addition & 0 deletions software/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ Software

nk-app2/index
nitropy/index
../nitrokey-sdk-py/docs/index

0 comments on commit c7f2ea9

Please sign in to comment.