From dbb110f5c4c4350129eeefb1f2037e9cfa4ab56e Mon Sep 17 00:00:00 2001 From: Barry57 <160387047+Barry57@users.noreply.github.com> Date: Wed, 30 Oct 2024 20:19:19 +0800 Subject: [PATCH] Update conf.py --- docs/source/conf.py | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 4923296..a70a2a4 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -16,34 +16,6 @@ sys.path.insert(0, os.path.abspath("../..")) sys.path.append(os.path.abspath(os.path.join(__file__, "..", "..", ".."))) -# Copy over the examples. Function copied from GPyTorch's conf.py -examples_source = os.path.abspath( - os.path.join(os.path.dirname(__file__), "..", "..", "examples") -) -examples_dest = os.path.abspath(os.path.join(os.path.dirname(__file__), "examples")) -if os.path.exists(examples_dest): - shutil.rmtree(examples_dest) -os.mkdir(examples_dest) -for root, dirs, files in os.walk(examples_source): - for dr in dirs: - os.mkdir(os.path.join(root.replace(examples_source, examples_dest), dr)) - for fil in files: - if os.path.splitext(fil)[1] in [".py", ".md", ".rst"]: - source_filename = os.path.join(root, fil) - dest_filename = source_filename.replace(examples_source, examples_dest) - # If we're skipping examples, put a dummy file in place - if os.getenv("SKIP_EXAMPLES"): - if dest_filename.endswith("index.rst"): - shutil.copyfile(source_filename, dest_filename) - else: - with open(os.path.splitext(dest_filename)[0] + ".rst", "w") as f: - basename = os.path.splitext(os.path.basename(dest_filename))[0] - f.write(f"{basename}\n" + "=" * 80) - - # Otherwise, copy over the real example files - else: - shutil.copyfile(source_filename, dest_filename) - # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration