From f3d9e6bdeeea25d9dbcf203f4a38bef0c97f9190 Mon Sep 17 00:00:00 2001 From: Miguel Xochicale Date: Fri, 23 Jun 2023 00:16:04 +0100 Subject: [PATCH] removes generate_apidocs in doc/conf.py to solve duplication calls and correct path doc/conf.py in .readthedocs.yaml (#115) --- .readthedocs.yaml | 2 +- doc/conf.py | 21 --------------------- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 4fe1277..fbd70d3 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -14,7 +14,7 @@ build: # Build documentation in the docs/ directory with Sphinx sphinx: builder: html - configuration: docs/conf.py + configuration: doc/conf.py fail_on_warning: false # Optionally declare the Python requirements required to build your docs diff --git a/doc/conf.py b/doc/conf.py index 84d4b47..c4bd874 100755 --- a/doc/conf.py +++ b/doc/conf.py @@ -55,27 +55,6 @@ html_static_path = [static_folder] -def generate_apidocs(*args): - """Generate API docs automatically by trawling the available modules""" - - global working_dir, module_path - output_path = working_dir - apidoc_command_path = 'sphinx-apidoc' - if hasattr(sys, 'real_prefix'): # called from a virtualenv - apidoc_command_path = os.path.join(sys.prefix, 'bin', 'sphinx-apidoc') - apidoc_command_path = os.path.abspath(apidoc_command_path) - subprocess.check_call( - [apidoc_command_path, '--force', '--separate'] + - ['-o', output_path, module_path] + - [os.path.join(root_dir_abs, pattern) for pattern in exclude_patterns]) - - -def setup(app): - # Hook to allow for automatic generation of API docs - # before doc deployment begins. - app.connect('builder-inited', generate_apidocs) - - # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here.