Commit 6998cbb0 authored by Barkin Simsek's avatar Barkin Simsek 🐢
Browse files

Automatically pick docstrings from codebase

parent f0d64de8
Pipeline #7158 failed with stages
in 1 minute
......@@ -23,10 +23,12 @@ tests:
pages:
stage: deploy
script:
- pip install -U sphinx
- sphinx-build -b html ./docs/sphinx/ public
- pip install -U sphinx
- pip install -e src/
- sphinx-apidoc -o ./docs/sphinx/ ./src/captchamonitor/
- sphinx-build -b html ./docs/sphinx/ public
artifacts:
paths:
- public
- public
only:
- master
\ No newline at end of file
- master
\ No newline at end of file
......@@ -29,9 +29,11 @@ logs:
init: check_root
apt install python3-pip mypy
pip3 install darglint black pylint isort sphinx
pip3 install darglint black pylint isort sphinx sphinx-autodoc-typehints
docs: FORCE
docs: check_non_root FORCE
pip3 install -e src/
sphinx-apidoc -o ./docs/sphinx/ ./src/captchamonitor/
sphinx-build -b html ./docs/sphinx/ public
check: check_non_root
......
captchamonitor.core package
===========================
Submodules
----------
captchamonitor.core.worker module
---------------------------------
.. automodule:: captchamonitor.core.worker
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: captchamonitor.core
:members:
:undoc-members:
:show-inheritance:
captchamonitor.fetchers package
===============================
Submodules
----------
captchamonitor.fetchers.base\_fetcher module
--------------------------------------------
.. automodule:: captchamonitor.fetchers.base_fetcher
:members:
:undoc-members:
:show-inheritance:
captchamonitor.fetchers.chrome\_browser module
----------------------------------------------
.. automodule:: captchamonitor.fetchers.chrome_browser
:members:
:undoc-members:
:show-inheritance:
captchamonitor.fetchers.firefox\_browser module
-----------------------------------------------
.. automodule:: captchamonitor.fetchers.firefox_browser
:members:
:undoc-members:
:show-inheritance:
captchamonitor.fetchers.tor\_browser module
-------------------------------------------
.. automodule:: captchamonitor.fetchers.tor_browser
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: captchamonitor.fetchers
:members:
:undoc-members:
:show-inheritance:
captchamonitor package
======================
Subpackages
-----------
.. toctree::
:maxdepth: 4
captchamonitor.core
captchamonitor.fetchers
captchamonitor.utils
Submodules
----------
captchamonitor.cm module
------------------------
.. automodule:: captchamonitor.cm
:members:
:undoc-members:
:show-inheritance:
captchamonitor.version module
-----------------------------
.. automodule:: captchamonitor.version
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: captchamonitor
:members:
:undoc-members:
:show-inheritance:
captchamonitor.utils package
============================
Submodules
----------
captchamonitor.utils.collector module
-------------------------------------
.. automodule:: captchamonitor.utils.collector
:members:
:undoc-members:
:show-inheritance:
captchamonitor.utils.config module
----------------------------------
.. automodule:: captchamonitor.utils.config
:members:
:undoc-members:
:show-inheritance:
captchamonitor.utils.consensus\_parser module
---------------------------------------------
.. automodule:: captchamonitor.utils.consensus_parser
:members:
:undoc-members:
:show-inheritance:
captchamonitor.utils.database module
------------------------------------
.. automodule:: captchamonitor.utils.database
:members:
:undoc-members:
:show-inheritance:
captchamonitor.utils.exceptions module
--------------------------------------
.. automodule:: captchamonitor.utils.exceptions
:members:
:undoc-members:
:show-inheritance:
captchamonitor.utils.models module
----------------------------------
.. automodule:: captchamonitor.utils.models
:members:
:undoc-members:
:show-inheritance:
captchamonitor.utils.onionoo module
-----------------------------------
.. automodule:: captchamonitor.utils.onionoo
:members:
:undoc-members:
:show-inheritance:
captchamonitor.utils.small\_scripts module
------------------------------------------
.. automodule:: captchamonitor.utils.small_scripts
:members:
:undoc-members:
:show-inheritance:
captchamonitor.utils.tor\_launcher module
-----------------------------------------
.. automodule:: captchamonitor.utils.tor_launcher
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: captchamonitor.utils
:members:
:undoc-members:
:show-inheritance:
......@@ -21,7 +21,7 @@ sys.path.insert(0, os.path.abspath("../../src/captchamonitor/"))
# -- Project information -----------------------------------------------------
project = "CAPTCHA Monitor"
copyright = "2021, Barkin Simsek"
copyright = "2021, CAPTCHA Monitor"
author = "Barkin Simsek"
# The short X.Y version
......@@ -41,6 +41,8 @@ release = "1.0.0"
# ones.
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.intersphinx",
"sphinx.ext.doctest",
"sphinx.ext.todo",
"sphinx.ext.coverage",
......@@ -48,6 +50,20 @@ extensions = [
"sphinx.ext.viewcode",
]
# Mappings for sphinx.ext.intersphinx. Projects have to have Sphinx-generated doc! (.inv file)
intersphinx_mapping = {
"python": ("https://docs.python.org/3/", None),
}
autosummary_generate = True # Turn on sphinx.ext.autosummary
autoclass_content = "both" # Add __init__ doc (ie. params) to class summaries
autodoc_inherit_docstrings = True # If no docstring, inherit from base class
set_type_checking_flag = (
True # Enable 'expensive' imports for sphinx_autodoc_typehints
)
# autodoc_typehints = "description" # Sphinx-native method. Not as good as sphinx_autodoc_typehints
add_module_names = False # Remove namespaces from class/method signatures
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
......@@ -81,7 +97,7 @@ pygments_style = "sphinx"
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "alabaster"
html_theme = "haiku"
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
......
......@@ -10,6 +10,7 @@ Welcome to CAPTCHA Monitor's documentation!
:maxdepth: 2
:caption: Contents:
modules
Indices and tables
......
captchamonitor
==============
.. toctree::
:maxdepth: 4
captchamonitor
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment