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 Nov 14, 2024
1 parent 961d4b8 commit 61af949
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 3 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,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 @@ -23,15 +25,18 @@ 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
. venv/bin/activate
pip install -r requirements.txt
pip install ./nitrokey-sdk-py
- name: Build documentation
run: |
. venv/bin/activate
Expand Down
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
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ WORKDIR /docs
COPY requirements.txt /docs
COPY source/conf.py /docs
RUN pip3 install -r requirements.txt

COPY nitrokey-sdk-py /docs/nitrokey-sdk-py
RUN pip3 install ./nitrokey-sdk-py
1 change: 1 addition & 0 deletions nitrokey-sdk-py
Submodule nitrokey-sdk-py added at 4fa730
1 change: 1 addition & 0 deletions source/components/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/index
1 change: 1 addition & 0 deletions source/components/software/nitrokey-sdk-py
9 changes: 8 additions & 1 deletion source/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 @@ -71,7 +72,7 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['venv/*', 'components/nethsm/_*.rst', 'components/to-be-integrated.rst']
exclude_patterns = ['venv/*', 'components/nethsm/_*.rst', 'components/to-be-integrated.rst', 'nitrokey-sdk-py/*']

# The name of the Pygments (syntax highlighting) style to use.
#pygments_style = "solarizeddark"
Expand Down Expand Up @@ -434,3 +435,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'

0 comments on commit 61af949

Please sign in to comment.