Skip to content
Merged
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
10 changes: 7 additions & 3 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
from datetime import datetime
import time

# are we running circle CI?
CIRCLECI = 'CIRCLECI' in os.environ

# Parse year using SOURCE_DATE_EPOCH, falling back to current time.
# https://reproducible-builds.org/specs/source-date-epoch/
sourceyear = datetime.utcfromtimestamp(int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))).year
Expand Down Expand Up @@ -153,6 +156,7 @@ def _check_dependencies():


# Sphinx gallery configuration

sphinx_gallery_conf = {
'examples_dirs': ['../examples', '../tutorials', '../plot_types'],
'filename_pattern': '^((?!sgskip).)*$',
Expand All @@ -169,12 +173,11 @@ def _check_dependencies():
'remove_config_comments': True,
'min_reported_time': 1,
'thumbnail_size': (320, 224),
'compress_images': ('thumbnails', 'images'),
'compress_images': () if CIRCLECI else ('thumbnails', 'images'),
'matplotlib_animations': True,
# 3.7 CI doc build should not use hidpi images during the testing phase
'image_srcset': [] if sys.version_info[:2] == (3, 7) else ["2x"],
'junit': ('../test-results/sphinx-gallery/junit.xml'
if 'CIRCLECI' in os.environ else ''),
'junit': '../test-results/sphinx-gallery/junit.xml' if CIRCLECI else '',
}

plot_gallery = 'True'
Expand Down Expand Up @@ -286,6 +289,7 @@ def _check_dependencies():
html_logo = "_static/logo2.svg"
html_theme_options = {
"logo_link": "index",
"collapse_navigation": True if CIRCLECI else False,
"icon_links": [
{
"name": "gitter",
Expand Down