Skip to content

Commit

Permalink
Fix doc build
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhollas committed Nov 17, 2024
1 parent 2a15acb commit a238f23
Showing 1 changed file with 5 additions and 24 deletions.
29 changes: 5 additions & 24 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
#
# Sphinx configuration for aiida-testing
#
# This file is execfile()d with the current directory set to its
Expand Down Expand Up @@ -37,7 +35,6 @@
with contextlib.suppress(ImportError):
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

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

Expand All @@ -56,7 +53,7 @@

intersphinx_mapping = {
'python': ('https://docs.python.org/3', None),
'aiida': ('http://aiida-core.readthedocs.io/en/v1.6.8/', None),
'aiida': ('https://aiida.readthedocs.io/projects/aiida-core/en/stable/', None),
'pytest': ('https://docs.pytest.org/en/latest/', None)
}

Expand All @@ -66,24 +63,18 @@
# The suffix of source filenames.
source_suffix = '.rst'

# The encoding of source files.
#source_encoding = 'utf-8-sig'

# The master toctree document.
#~ master_doc = 'index'
master_doc = 'index'

# General information about the project.
project = u'aiida-testing'
project = 'aiida-testing'
copyright_first_year = "2019"
copyright_owners = "The AiiDA Team"

current_year = str(time.localtime().tm_year)
copyright_year_string = current_year if current_year == copyright_first_year else "{}-{}".format(
copyright_first_year, current_year
)
copyright_year_string = current_year if current_year == copyright_first_year else f"{copyright_first_year}-{current_year}"
# pylint: disable=redefined-builtin
copyright = u'{}, {}. All rights reserved'.format(copyright_year_string, copyright_owners)
copyright = f'{copyright_year_string}, {copyright_owners}. All rights reserved'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -146,9 +137,7 @@
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
html_theme_options = {
'display_version': True,
}
# html_theme_options = {}

# Add any paths that contain custom themes here, relative to this directory.
#~ html_theme_path = ["."]
Expand Down Expand Up @@ -221,9 +210,6 @@
#html_file_suffix = None

# Language to be used for generating the HTML full-text search index.
# Sphinx supports the following languages:
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
html_search_language = 'en'

# A dictionary with options for the search language support, empty by default.
Expand Down Expand Up @@ -292,11 +278,6 @@ def run_apidoc(_):
apidoc_dir = os.path.join(source_dir, 'apidoc')
package_dir = os.path.join(source_dir, os.pardir, os.pardir, 'aiida_testing')

# In #1139, they suggest the route below, but this ended up
# calling sphinx-build, not sphinx-apidoc
#from sphinx.apidoc import main
#main([None, '-e', '-o', apidoc_dir, package_dir, '--force'])

import subprocess
cmd_path = 'sphinx-apidoc'
if hasattr(sys, 'real_prefix'): # Check to see if we are in a virtualenv
Expand Down

0 comments on commit a238f23

Please sign in to comment.