From 2a66e40d9bd4f84d17d928ad8a681bccbec9c790 Mon Sep 17 00:00:00 2001 From: Marc Bonnici Date: Mon, 14 May 2018 10:50:32 +0100 Subject: [PATCH] doc/config: Do not generate API documentation On the latest version of Sphinx the way we were doing API generation caused issues. Due to the structure/formatting of our code base the output was not very useful anyway so remove the automatic generation with the aim to manually document the relevant API in the future. --- doc/Makefile | 2 -- doc/source/api_reference.rst | 7 ------- doc/source/conf.py | 9 --------- doc/source/index.rst | 1 - 4 files changed, 19 deletions(-) delete mode 100644 doc/source/api_reference.rst diff --git a/doc/Makefile b/doc/Makefile index 6b44bbcb..92d38550 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -18,7 +18,6 @@ WAEXTOPTS = source/plugins ../wa ../wa/tests ../wa/framework PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source -ALLSPHINXAPIOPTS = -f $(SPHINXAPIOPTS) -o source/api ../wa # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source @@ -49,7 +48,6 @@ help: clean: rm -rf $(BUILDDIR)/* - rm -rf source/api/* rm -rf source/plugins/* rm -rf source/developer_reference/instrument_method_map.rst diff --git a/doc/source/api_reference.rst b/doc/source/api_reference.rst deleted file mode 100644 index eae70687..00000000 --- a/doc/source/api_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -API Reference -~~~~~~~~~~~~~ - -.. toctree:: - :maxdepth: 5 - - api/wa diff --git a/doc/source/conf.py b/doc/source/conf.py index cc36b5a9..33d1da81 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -23,7 +23,6 @@ import sys import os import shlex -from sphinx.apidoc import main this_dir = os.path.dirname(__file__) sys.path.insert(0, os.path.join(this_dir, '..')) @@ -306,19 +305,11 @@ texinfo_documents = [ # If true, do not generate a @detailmenu in the "Top" node's menu. #texinfo_no_detailmenu = False -def run_apidoc(_): - sys.path.append(os.path.join(os.path.dirname(__file__), '..')) - cur_dir = os.path.abspath(os.path.dirname(__file__)) - api_output = os.path.join(cur_dir, 'api') - module = os.path.join(cur_dir, '..', '..', 'wa') - main(['-f', '-o', api_output, module, '--force']) - def setup(app): module_dir = os.path.join('..', '..', 'wa') excluded_extensions = [os.path.join(module_dir, 'framework'), os.path.join(module_dir, 'tests')] os.chdir(os.path.dirname(__file__)) - app.connect('builder-inited', run_apidoc) generate_plugin_documentation(module_dir, 'plugins', excluded_extensions) generate_target_documentation('plugins') generate_run_config_documentation('run_config') diff --git a/doc/source/index.rst b/doc/source/index.rst index 965da2ba..4fe11ccc 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -80,7 +80,6 @@ References :maxdepth: 2 plugins - api_reference .. :ref:`FAQ ` .. ================