From 85ddb6f5f9bc2dc333ff6e7bb1a98871b2bbdfa3 Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Wed, 2 Mar 2022 14:35:17 +0100 Subject: [PATCH] Remove autogen_config --- docs/Makefile | 8 ++------ docs/autogen_config.py | 45 ------------------------------------------ docs/source/conf.py | 10 ---------- 3 files changed, 2 insertions(+), 61 deletions(-) delete mode 100644 docs/autogen_config.py diff --git a/docs/Makefile b/docs/Makefile index 02cb617a3..f760bf014 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -53,15 +53,11 @@ clean: rm -rf $(BUILDDIR)/* rm -rf source/config.rst -html: source/config.rst +html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." -source/config.rst: - python3 autogen_config.py - @echo "Created docs for config options" - dirhtml: $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @@ -176,7 +172,7 @@ linkcheck: @echo @echo "Link check complete; look for any errors in the above output " \ "or in $(BUILDDIR)/linkcheck/output.txt." - + spelling: $(SPHINXBUILD) -b spelling $(ALLSPHINXOPTS) $(BUILDDIR)/spelling @echo "Spell check complete; look for any errors in the above output " \ diff --git a/docs/autogen_config.py b/docs/autogen_config.py deleted file mode 100644 index f06efe917..000000000 --- a/docs/autogen_config.py +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env python - -import os -from notebook.notebookapp import NotebookApp - -header = """\ -.. _config: - - -Config file and command line options -==================================== - -The notebook server can be run with a variety of command line arguments. -A list of available options can be found below in the :ref:`options section -`. - -Defaults for these options can also be set by creating a file named -``jupyter_notebook_config.py`` in your Jupyter folder. The Jupyter -folder is in your home directory, ``~/.jupyter``. - -To create a ``jupyter_notebook_config.py`` file, with all the defaults -commented out, you can use the following command line:: - - $ jupyter notebook --generate-config - - -.. _options: - -Options -------- - -This list of options can be generated by running the following and hitting -enter:: - - $ jupyter notebook --help - -""" -try: - destination = os.path.join(os.path.dirname(__file__), 'source/config.rst') -except: - destination = os.path.join(os.getcwd(), 'config.rst') - -with open(destination, 'w') as f: - f.write(header) - f.write(NotebookApp().document_config_options()) diff --git a/docs/source/conf.py b/docs/source/conf.py index 1aa7613b4..a36185a6b 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -46,16 +46,6 @@ print("===============================") for item in sys.path: print(item) -# Check if docs are being built by ReadTheDocs -# If so, generate a config.rst file and populate it with documentation about -# configuration options - -if os.environ.get('READTHEDOCS', ''): - # Readthedocs doesn't run our Makefile, so we do this to force it to generate - # the config docs. - with open('../autogen_config.py') as f: - exec(compile(f.read(), '../autogen_config.py', 'exec'), {}) - # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here.