Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC/TST make circle faster #20727

Merged
merged 1 commit into from Jul 23, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 7 additions & 3 deletions doc/conf.py
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