Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 88f53b1

Browse files
authored
Merge pull request matplotlib#20727 from jklymak/doc-make-circle-faster
DOC/TST: make circle faster
2 parents 63fad3b + b3250ad commit 88f53b1

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

doc/conf.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
from datetime import datetime
2323
import time
2424

25+
# are we running circle CI?
26+
CIRCLECI = 'CIRCLECI' in os.environ
27+
2528
# Parse year using SOURCE_DATE_EPOCH, falling back to current time.
2629
# https://reproducible-builds.org/specs/source-date-epoch/
2730
sourceyear = datetime.utcfromtimestamp(int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))).year
@@ -153,6 +156,7 @@ def _check_dependencies():
153156

154157

155158
# Sphinx gallery configuration
159+
156160
sphinx_gallery_conf = {
157161
'examples_dirs': ['../examples', '../tutorials', '../plot_types'],
158162
'filename_pattern': '^((?!sgskip).)*$',
@@ -169,12 +173,11 @@ def _check_dependencies():
169173
'remove_config_comments': True,
170174
'min_reported_time': 1,
171175
'thumbnail_size': (320, 224),
172-
'compress_images': ('thumbnails', 'images'),
176+
'compress_images': () if CIRCLECI else ('thumbnails', 'images'),
173177
'matplotlib_animations': True,
174178
# 3.7 CI doc build should not use hidpi images during the testing phase
175179
'image_srcset': [] if sys.version_info[:2] == (3, 7) else ["2x"],
176-
'junit': ('../test-results/sphinx-gallery/junit.xml'
177-
if 'CIRCLECI' in os.environ else ''),
180+
'junit': '../test-results/sphinx-gallery/junit.xml' if CIRCLECI else '',
178181
}
179182

180183
plot_gallery = 'True'
@@ -286,6 +289,7 @@ def _check_dependencies():
286289
html_logo = "_static/logo2.svg"
287290
html_theme_options = {
288291
"logo_link": "index",
292+
"collapse_navigation": True if CIRCLECI else False,
289293
"icon_links": [
290294
{
291295
"name": "gitter",

0 commit comments

Comments
 (0)