Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 27 additions & 17 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,17 @@
#
import os
import sys
sys.path.insert(0, os.path.abspath('..'))

sys.path.insert(0, os.path.abspath(".."))

# General configuration
# ---------------------


# Trick to get the jupyter nbs to the documentation
import shutil
project_root = '..'

project_root = ".."
print("Copy tutorial notebooks into docs/_tutorials")


Expand All @@ -35,9 +37,11 @@ def all_but_ipynb(dir, contents):


shutil.rmtree(os.path.join(project_root, "docs/_tutorials"), ignore_errors=True)
shutil.copytree(os.path.join(project_root, "tutorials"),
os.path.join(project_root, "docs/_tutorials"),
ignore=all_but_ipynb)
shutil.copytree(
os.path.join(project_root, "tutorials"),
os.path.join(project_root, "docs/_tutorials"),
ignore=all_but_ipynb,
)

# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
Expand All @@ -54,7 +58,7 @@ def all_but_ipynb(dir, contents):
"sphinx_gallery.gen_gallery",
"nb2plots",
"texext",
"nbsphinx"
"nbsphinx",
]

# generate autosummary pages
Expand Down Expand Up @@ -91,7 +95,12 @@ def all_but_ipynb(dir, contents):
master_doc = "index"

# Do not include release announcement template
exclude_patterns = ["release/release_template.rst", "neat/fittools", '_build', '**.ipynb_checkpoints']
exclude_patterns = [
"release/release_template.rst",
"neat/fittools",
"_build",
"**.ipynb_checkpoints",
]

# General substitutions.
project = "NEAT"
Expand Down Expand Up @@ -127,13 +136,13 @@ def all_but_ipynb(dir, contents):
# show_authors = True

sphinx_gallery_conf = {
'examples_dirs': '../examples', # path to your example scripts
'gallery_dirs': 'auto_examples', # path to where to save gallery generated output
'plot_gallery': False,
'filename_pattern': '/plot',
'ignore_pattern': r'.*util\.py'
"examples_dirs": "../examples", # path to your example scripts
"gallery_dirs": "auto_examples", # path to where to save gallery generated output
"plot_gallery": False,
"filename_pattern": "/plot",
"ignore_pattern": r".*util\.py",
}
nbsphinx_execute = 'never'
nbsphinx_execute = "never"

# The name of the Pygments (syntax highlighting) style to use.
# pygments_style = 'friendly'
Expand All @@ -142,7 +151,7 @@ def all_but_ipynb(dir, contents):
# A list of prefixs that are ignored when creating the module index. (new in Sphinx 0.6)
modindex_common_prefix = ["neat."]

#doctest_global_setup = "import neat"
# doctest_global_setup = "import neat"

# Options for HTML output
# -----------------------
Expand Down Expand Up @@ -189,8 +198,7 @@ def all_but_ipynb(dir, contents):
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]

html_css_files = [
"custom.css"]
html_css_files = ["custom.css"]

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
Expand All @@ -204,7 +212,9 @@ def all_but_ipynb(dir, contents):
# html_index = 'index.html'

# Custom sidebar templates, maps page names to templates.
html_sidebars = {"**": ["logo-text.html", "globaltoc.html", "localtoc.html", "searchbox.html"]}
html_sidebars = {
"**": ["logo-text.html", "globaltoc.html", "localtoc.html", "searchbox.html"]
}

# Additional templates that should be rendered to pages, maps page names to
# templates.
Expand Down
2 changes: 1 addition & 1 deletion docs/release/contribs.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def call(cmd):
print("- " + c)

print(f"\nIt contained the following {len(merges)} merges:\n")
for (merge, message) in merges:
for merge, message in merges:
if merge.startswith("Merge pull request #"):
PR = f" ({merge.split()[3]})"
else:
Expand Down
12 changes: 6 additions & 6 deletions docs/release/report_functions_without_rst_generated.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
print("Run this script from the doc/ directory of the repository")
funcs = inspect.getmembers(neat, inspect.isfunction)

for n,f in funcs:
#print(n + ": "+str(f))
cmd = "find . -name *\."+n+".rst -print"
#print(cmd)
result=os.popen(cmd).read()
#print(result)
for n, f in funcs:
# print(n + ": "+str(f))
cmd = "find . -name *\." + n + ".rst -print"
# print(cmd)
result = os.popen(cmd).read()
# print(result)

if len(result) == 0:
print("Missing file from docs: ", n)
Expand Down
Loading
Loading