Skip to content

Commit 71dd2a2

Browse files
committed
sphinx docs
1 parent ce2555a commit 71dd2a2

18 files changed

+1889
-1120
lines changed

.github/workflows/sphinx.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Build-sphinx-docs
2+
3+
# Controls when the workflow will run
4+
on:
5+
# Triggers the workflow on push or pull request events but only for the main branch
6+
push:
7+
branches: [main]
8+
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
13+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
14+
jobs:
15+
# This workflow contains a single job called "build"
16+
build:
17+
# The type of runner that the job will run on
18+
runs-on: ubuntu-latest
19+
20+
# Steps represent a sequence of tasks that will be executed as part of the job
21+
steps:
22+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
23+
- uses: actions/checkout@v2
24+
25+
- name: Set up Python 3.10
26+
uses: actions/setup-python@v2
27+
with:
28+
python-version: "3.10"
29+
- name: Install dependencies
30+
run: |
31+
pip install pdm
32+
poetry install --with docs
33+
- name: Build HTML
34+
run: |
35+
cd docs/
36+
make clean html && make html
37+
- name: Run ghp-import (push docs on gh-pages branch to github pages)
38+
run: |
39+
poetry run ghp-import -n -p -f docs/_build/html

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = .
9+
BUILDDIR = _build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/conf.py

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# For the full list of built-in configuration values, see the documentation:
4+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
5+
import os
6+
import sys
7+
sys.path.insert(0, os.path.abspath('..'))
8+
9+
# -- Project information -----------------------------------------------------
10+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
11+
12+
project = 'fastapi_2fa'
13+
copyright = '2024, Diego Margoni'
14+
author = 'Diego Margoni'
15+
release = '0.1.0'
16+
17+
# -- General configuration ---------------------------------------------------
18+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
19+
20+
# Add any Sphinx extension module names here, as strings. They can be
21+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
22+
# ones.
23+
extensions = [
24+
'sphinx.ext.autodoc',
25+
'sphinx.ext.viewcode',
26+
'sphinx.ext.napoleon'
27+
]
28+
29+
templates_path = ['_templates']
30+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
31+
32+
33+
34+
# -- Options for HTML output -------------------------------------------------
35+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
36+
37+
# The theme to use for HTML and HTML Help pages. See the documentation for
38+
# a list of builtin themes.
39+
#
40+
html_theme = 'sphinx_rtd_theme'
41+
42+
html_static_path = ['_static']

docs/fastapi_2fa.api.deps.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
fastapi\_2fa.api.deps package
2+
=============================
3+
4+
Submodules
5+
----------
6+
7+
fastapi\_2fa.api.deps.db module
8+
-------------------------------
9+
10+
.. automodule:: fastapi_2fa.api.deps.db
11+
:members:
12+
:undoc-members:
13+
:show-inheritance:
14+
15+
fastapi\_2fa.api.deps.users module
16+
----------------------------------
17+
18+
.. automodule:: fastapi_2fa.api.deps.users
19+
:members:
20+
:undoc-members:
21+
:show-inheritance:
22+
23+
Module contents
24+
---------------
25+
26+
.. automodule:: fastapi_2fa.api.deps
27+
:members:
28+
:undoc-members:
29+
:show-inheritance:

docs/fastapi_2fa.api.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
fastapi\_2fa.api package
2+
========================
3+
4+
Subpackages
5+
-----------
6+
7+
.. toctree::
8+
:maxdepth: 4
9+
10+
fastapi_2fa.api.deps
11+
12+
Module contents
13+
---------------
14+
15+
.. automodule:: fastapi_2fa.api
16+
:members:
17+
:undoc-members:
18+
:show-inheritance:

docs/fastapi_2fa.core.rst

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
fastapi\_2fa.core package
2+
=========================
3+
4+
Submodules
5+
----------
6+
7+
fastapi\_2fa.core.config module
8+
-------------------------------
9+
10+
.. automodule:: fastapi_2fa.core.config
11+
:members:
12+
:undoc-members:
13+
:show-inheritance:
14+
15+
fastapi\_2fa.core.enums module
16+
------------------------------
17+
18+
.. automodule:: fastapi_2fa.core.enums
19+
:members:
20+
:undoc-members:
21+
:show-inheritance:
22+
23+
fastapi\_2fa.core.security module
24+
---------------------------------
25+
26+
.. automodule:: fastapi_2fa.core.security
27+
:members:
28+
:undoc-members:
29+
:show-inheritance:
30+
31+
fastapi\_2fa.core.two\_factor\_auth module
32+
------------------------------------------
33+
34+
.. automodule:: fastapi_2fa.core.two_factor_auth
35+
:members:
36+
:undoc-members:
37+
:show-inheritance:
38+
39+
fastapi\_2fa.core.utils module
40+
------------------------------
41+
42+
.. automodule:: fastapi_2fa.core.utils
43+
:members:
44+
:undoc-members:
45+
:show-inheritance:
46+
47+
Module contents
48+
---------------
49+
50+
.. automodule:: fastapi_2fa.core
51+
:members:
52+
:undoc-members:
53+
:show-inheritance:

docs/fastapi_2fa.crud.rst

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
fastapi\_2fa.crud package
2+
=========================
3+
4+
Submodules
5+
----------
6+
7+
fastapi\_2fa.crud.backup\_token module
8+
--------------------------------------
9+
10+
.. automodule:: fastapi_2fa.crud.backup_token
11+
:members:
12+
:undoc-members:
13+
:show-inheritance:
14+
15+
fastapi\_2fa.crud.base\_crud module
16+
-----------------------------------
17+
18+
.. automodule:: fastapi_2fa.crud.base_crud
19+
:members:
20+
:undoc-members:
21+
:show-inheritance:
22+
23+
fastapi\_2fa.crud.device module
24+
-------------------------------
25+
26+
.. automodule:: fastapi_2fa.crud.device
27+
:members:
28+
:undoc-members:
29+
:show-inheritance:
30+
31+
fastapi\_2fa.crud.users module
32+
------------------------------
33+
34+
.. automodule:: fastapi_2fa.crud.users
35+
:members:
36+
:undoc-members:
37+
:show-inheritance:
38+
39+
Module contents
40+
---------------
41+
42+
.. automodule:: fastapi_2fa.crud
43+
:members:
44+
:undoc-members:
45+
:show-inheritance:

docs/fastapi_2fa.db.rst

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
fastapi\_2fa.db package
2+
=======================
3+
4+
Submodules
5+
----------
6+
7+
fastapi\_2fa.db.base module
8+
---------------------------
9+
10+
.. automodule:: fastapi_2fa.db.base
11+
:members:
12+
:undoc-members:
13+
:show-inheritance:
14+
15+
fastapi\_2fa.db.base\_class module
16+
----------------------------------
17+
18+
.. automodule:: fastapi_2fa.db.base_class
19+
:members:
20+
:undoc-members:
21+
:show-inheritance:
22+
23+
fastapi\_2fa.db.session module
24+
------------------------------
25+
26+
.. automodule:: fastapi_2fa.db.session
27+
:members:
28+
:undoc-members:
29+
:show-inheritance:
30+
31+
Module contents
32+
---------------
33+
34+
.. automodule:: fastapi_2fa.db
35+
:members:
36+
:undoc-members:
37+
:show-inheritance:

docs/fastapi_2fa.models.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
fastapi\_2fa.models package
2+
===========================
3+
4+
Submodules
5+
----------
6+
7+
fastapi\_2fa.models.device module
8+
---------------------------------
9+
10+
.. automodule:: fastapi_2fa.models.device
11+
:members:
12+
:undoc-members:
13+
:show-inheritance:
14+
15+
fastapi\_2fa.models.users module
16+
--------------------------------
17+
18+
.. automodule:: fastapi_2fa.models.users
19+
:members:
20+
:undoc-members:
21+
:show-inheritance:
22+
23+
Module contents
24+
---------------
25+
26+
.. automodule:: fastapi_2fa.models
27+
:members:
28+
:undoc-members:
29+
:show-inheritance:

docs/fastapi_2fa.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
fastapi\_2fa package
2+
====================
3+
4+
Subpackages
5+
-----------
6+
7+
.. toctree::
8+
:maxdepth: 4
9+
10+
fastapi_2fa.api
11+
fastapi_2fa.core
12+
fastapi_2fa.crud
13+
fastapi_2fa.db
14+
fastapi_2fa.models
15+
fastapi_2fa.schemas
16+
fastapi_2fa.tasks
17+
18+
Submodules
19+
----------
20+
21+
fastapi\_2fa.main module
22+
------------------------
23+
24+
.. automodule:: fastapi_2fa.main
25+
:members:
26+
:undoc-members:
27+
:show-inheritance:
28+
29+
Module contents
30+
---------------
31+
32+
.. automodule:: fastapi_2fa
33+
:members:
34+
:undoc-members:
35+
:show-inheritance:

0 commit comments

Comments
 (0)