Skip to content

Commit

Permalink
Add API documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
robin-nitrokey committed Jul 25, 2024
1 parent d85dc6f commit 62ae235
Show file tree
Hide file tree
Showing 27 changed files with 526 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*.pyc
_build
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,11 @@ fix:
.PHONY: test
test:
poetry run python -m unittest -v

.PHONY: generate-api-docs
generate-api-docs:
poetry run sphinx-apidoc --separate --maxdepth 1 --tocfile index --output-dir docs/api src/nitrokey

.PHONY: build-docs
build-docs:
poetry run sphinx-build docs _build
7 changes: 7 additions & 0 deletions docs/api/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
API Reference
=============

.. toctree::
:maxdepth: 1

nitrokey
7 changes: 7 additions & 0 deletions docs/api/nitrokey.nk3.bootloader.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
nitrokey.nk3.bootloader module
==============================

.. automodule:: nitrokey.nk3.bootloader
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/api/nitrokey.nk3.device.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
nitrokey.nk3.device module
==========================

.. automodule:: nitrokey.nk3.device
:members:
:undoc-members:
:show-inheritance:
21 changes: 21 additions & 0 deletions docs/api/nitrokey.nk3.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
nitrokey.nk3 package
====================

Submodules
----------

.. toctree::
:maxdepth: 1

nitrokey.nk3.bootloader
nitrokey.nk3.device
nitrokey.nk3.secrets_app
nitrokey.nk3.updates

Module contents
---------------

.. automodule:: nitrokey.nk3
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/api/nitrokey.nk3.secrets_app.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
nitrokey.nk3.secrets\_app module
================================

.. automodule:: nitrokey.nk3.secrets_app
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/api/nitrokey.nk3.updates.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
nitrokey.nk3.updates module
===========================

.. automodule:: nitrokey.nk3.updates
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/api/nitrokey.nkpk.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
nitrokey.nkpk module
====================

.. automodule:: nitrokey.nkpk
:members:
:undoc-members:
:show-inheritance:
28 changes: 28 additions & 0 deletions docs/api/nitrokey.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
nitrokey package
================

Subpackages
-----------

.. toctree::
:maxdepth: 1

nitrokey.nk3
nitrokey.trussed

Submodules
----------

.. toctree::
:maxdepth: 1

nitrokey.nkpk
nitrokey.updates

Module contents
---------------

.. automodule:: nitrokey
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/api/nitrokey.trussed.admin_app.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
nitrokey.trussed.admin\_app module
==================================

.. automodule:: nitrokey.trussed.admin_app
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/api/nitrokey.trussed.base.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
nitrokey.trussed.base module
============================

.. automodule:: nitrokey.trussed.base
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/api/nitrokey.trussed.bootloader.lpc55.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
nitrokey.trussed.bootloader.lpc55 module
========================================

.. automodule:: nitrokey.trussed.bootloader.lpc55
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/api/nitrokey.trussed.bootloader.nrf52.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
nitrokey.trussed.bootloader.nrf52 module
========================================

.. automodule:: nitrokey.trussed.bootloader.nrf52
:members:
:undoc-members:
:show-inheritance:
19 changes: 19 additions & 0 deletions docs/api/nitrokey.trussed.bootloader.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
nitrokey.trussed.bootloader package
===================================

Submodules
----------

.. toctree::
:maxdepth: 1

nitrokey.trussed.bootloader.lpc55
nitrokey.trussed.bootloader.nrf52

Module contents
---------------

.. automodule:: nitrokey.trussed.bootloader
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/api/nitrokey.trussed.device.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
nitrokey.trussed.device module
==============================

.. automodule:: nitrokey.trussed.device
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/api/nitrokey.trussed.exceptions.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
nitrokey.trussed.exceptions module
==================================

.. automodule:: nitrokey.trussed.exceptions
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/api/nitrokey.trussed.provisioner_app.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
nitrokey.trussed.provisioner\_app module
========================================

.. automodule:: nitrokey.trussed.provisioner_app
:members:
:undoc-members:
:show-inheritance:
31 changes: 31 additions & 0 deletions docs/api/nitrokey.trussed.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
nitrokey.trussed package
========================

Subpackages
-----------

.. toctree::
:maxdepth: 1

nitrokey.trussed.bootloader

Submodules
----------

.. toctree::
:maxdepth: 1

nitrokey.trussed.admin_app
nitrokey.trussed.base
nitrokey.trussed.device
nitrokey.trussed.exceptions
nitrokey.trussed.provisioner_app
nitrokey.trussed.utils

Module contents
---------------

.. automodule:: nitrokey.trussed
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/api/nitrokey.trussed.utils.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
nitrokey.trussed.utils module
=============================

.. automodule:: nitrokey.trussed.utils
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/api/nitrokey.updates.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
nitrokey.updates module
=======================

.. automodule:: nitrokey.updates
:members:
:undoc-members:
:show-inheritance:
11 changes: 11 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
project = 'Nitrokey Python SDK'
copyright = '2024, Nitrokey'
author = 'Nitrokey'
release = '0.1.0'
extensions = [
'sphinx.ext.autodoc',
]
html_theme = 'alabaster'
autodoc_class_signature = 'separated'
autodoc_member_order = 'groupwise'
autodoc_typehints = 'description'
8 changes: 8 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Nitrokey Python SDK
===================

.. toctree::
:maxdepth: 2
:caption: Contents:

api/index
Loading

0 comments on commit 62ae235

Please sign in to comment.