From 31e5b898a254b473efabf7a48e52d5a998902f49 Mon Sep 17 00:00:00 2001 From: Roman Gorshunov Date: Thu, 11 Jul 2019 15:57:58 +0200 Subject: [PATCH] Fix: Pegleg Exceptions docs rendering on RTD Readthedocs failed to render Pegleg exceptions with error: > WARNING: autodoc: failed to import exception ... from module > 'pegleg'; the following exception was raised: No module named 'click' Trying to add Pegleg requirements to the installed requirements list, so that Readthedocs has all modules, including those needed for the Pegleg itself. Change-Id: I1780a9be3aeb0c3e2e775cbb1f713c2033f13e08 --- .readthedocs.yaml | 25 +++++++++++++++++++++++++ Makefile | 1 + doc/source/exceptions.rst | 24 +++++++++++++----------- 3 files changed, 39 insertions(+), 11 deletions(-) create mode 100644 .readthedocs.yaml diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 00000000..f89da498 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,25 @@ +# .readthedocs.yml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Build documentation in the docs/ directory with Sphinx +sphinx: + configuration: doc/source/conf.py + +# Build documentation with MkDocs +#mkdocs: +# configuration: mkdocs.yml + +# Optionally build your docs in additional formats such as PDF and ePub +formats: + - pdf + +# Optionally set the version of Python and requirements required to build your docs +python: + version: 3.7 + install: + - requirements: doc/requirements.txt + - requirements: requirements.txt diff --git a/Makefile b/Makefile index 1b41f039..1a65fff7 100644 --- a/Makefile +++ b/Makefile @@ -103,6 +103,7 @@ docs: clean .PHONY: clean clean: rm -rf build + rm -rf doc/build .PHONY: py_lint py_lint: diff --git a/doc/source/exceptions.rst b/doc/source/exceptions.rst index 13c1066a..0e1c47e4 100644 --- a/doc/source/exceptions.rst +++ b/doc/source/exceptions.rst @@ -17,42 +17,44 @@ Pegleg Exceptions ================== +.. currentmodule:: pegleg.engine.exceptions + Base Exceptions --------------- -.. autoexception:: pegleg.engine.exceptions.PeglegBaseException +.. autoexception:: PeglegBaseException :members: :undoc-members: Git Exceptions -------------- -.. autoexception:: pegleg.engine.exceptions.GitConfigException +.. autoexception:: GitConfigException :members: :show-inheritance: :undoc-members: -.. autoexception:: pegleg.engine.exceptions.GitException +.. autoexception:: GitException :members: :show-inheritance: :undoc-members: -.. autoexception:: pegleg.engine.exceptions.GitAuthException +.. autoexception:: GitAuthException :members: :show-inheritance: :undoc-members: -.. autoexception:: pegleg.engine.exceptions.GitProxyException +.. autoexception:: GitProxyException :members: :show-inheritance: :undoc-members: -.. autoexception:: pegleg.engine.exceptions.GitSSHException +.. autoexception:: GitSSHException :members: :show-inheritance: :undoc-members: -.. autoexception:: pegleg.engine.exceptions.GitInvalidRepoException +.. autoexception:: GitInvalidRepoException :members: :show-inheritance: :undoc-members: @@ -67,24 +69,24 @@ Authentication Exceptions PKI Exceptions -------------- -.. autoexception:: pegleg.engine.exceptions.IncompletePKIPairError +.. autoexception:: IncompletePKIPairError Genesis Bundle Exceptions ------------------------- -.. autoexception:: pegleg.engine.exceptions.GenesisBundleEncryptionException +.. autoexception:: GenesisBundleEncryptionException :members: :show-inheritance: :undoc-members: -.. autoexception:: pegleg.engine.exceptions.GenesisBundleGenerateException +.. autoexception:: GenesisBundleGenerateException :members: :show-inheritance: Passphrase Exceptions --------------------- -.. autoexception:: pegleg.engine.exceptions.PassphraseCatalogNotFoundException +.. autoexception:: PassphraseCatalogNotFoundException :members: :show-inheritance: :undoc-members: