diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 781c02bb14..7fccb60c6a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -26,16 +28,19 @@ 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 - sphinx-build -W -j 1 -a -D language='en' -b html . __preview \ No newline at end of file + sphinx-build -W -j 1 -a -D language='en' -b html . __preview diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000..7554761a5c --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "nitrokey-sdk-py"] + path = nitrokey-sdk-py + url = https://github.com/Nitrokey/nitrokey-sdk-py.git diff --git a/Makefile b/Makefile index 79ecb6354d..14aca7f3c2 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/conf.py b/conf.py index 1c1a834fe5..fd8642eedd 100644 --- a/conf.py +++ b/conf.py @@ -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', @@ -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' diff --git a/nitrokey-sdk-py b/nitrokey-sdk-py new file mode 160000 index 0000000000..4fa7307b95 --- /dev/null +++ b/nitrokey-sdk-py @@ -0,0 +1 @@ +Subproject commit 4fa7307b956715c6c3120f22b13ed8a13f422093 diff --git a/software/index.rst b/software/index.rst index 2fc32150d5..1cf7649483 100644 --- a/software/index.rst +++ b/software/index.rst @@ -7,3 +7,4 @@ Software nk-app2/index nitropy/index + ../nitrokey-sdk-py/docs/index