File tree Expand file tree Collapse file tree 3 files changed +22
-4
lines changed Expand file tree Collapse file tree 3 files changed +22
-4
lines changed Original file line number Diff line number Diff line change 6060 @echo " Build finished. The HTML pages are in $( BUILDDIR) /html."
6161
6262html-noexamples :
63- $(SPHINXBUILD ) -D plot_gallery=0 -b html $(ALLSPHINXOPTS ) $(SOURCEDIR ) $(BUILDDIR ) /html
63+ SPHINX_GALLERY_PLOT=False $(SPHINXBUILD ) -b html $(ALLSPHINXOPTS ) $(SOURCEDIR ) $(BUILDDIR ) /html
6464 @echo
6565 @echo " Build finished. The HTML pages are in $( BUILDDIR) /html."
6666
@@ -167,7 +167,7 @@ changes:
167167 @echo " The overview file is in $( BUILDDIR) /changes."
168168
169169linkcheck :
170- $(SPHINXBUILD ) -D plot_gallery=0 -b linkcheck $(ALLSPHINXOPTS ) $(BUILDDIR ) /linkcheck
170+ SPHINX_GALLERY_PLOT=False $(SPHINXBUILD ) -b linkcheck $(ALLSPHINXOPTS ) $(BUILDDIR ) /linkcheck
171171 @echo
172172 @echo " Link check complete; look for any errors in the above output " \
173173 " or in $( BUILDDIR) /linkcheck/output.txt."
Original file line number Diff line number Diff line change 6868if "dev" in autosklearn .__version__ :
6969 binder_branch = "development"
7070
71+ # Getting issues with the `-D plot_gallery=0` for sphinx gallery, this is a workaround
72+ # We do this by setting an evironment variable we check and modifying the python config
73+ # object.
74+ # We have this extra processing as it enters as a raw string and we need a boolean value
75+ gallery_env_var = "SPHINX_GALLERY_PLOT"
76+
77+ sphinx_plot_gallery_flag = True
78+ if gallery_env_var in os .environ :
79+ value = os .environ [gallery_env_var ]
80+ if value in ["False" , "false" , "0" ]:
81+ sphinx_plot_gallery_flag = False
82+ elif value in ["True" , "true" , "1" ]:
83+ sphinx_plot_gallery_flag = True
84+ else :
85+ raise ValueError (f'Env variable { gallery_env_var } must be set to "false" or "true"' )
86+
7187sphinx_gallery_conf = {
7288 # path to the examples
7389 'examples_dirs' : '../examples' ,
7894 #'reference_url': {
7995 # 'autosklearn': None
8096 #},
97+ 'plot_gallery' : sphinx_plot_gallery_flag ,
8198 'backreferences_dir' : None ,
8299 'filename_pattern' : 'example.*.py$' ,
83100 'ignore_pattern' : r'custom_metrics\.py|__init__\.py|example_parallel_manual_spawning_python.py' ,
Original file line number Diff line number Diff line change 4242 "seaborn" ,
4343 ],
4444 "docs" : [
45- "sphinx" ,
46- "sphinx-gallery<=0.10.0 " ,
45+ "sphinx<4.3 " ,
46+ "sphinx-gallery" ,
4747 "sphinx_bootstrap_theme" ,
4848 "numpydoc" ,
4949 "sphinx_toolbox" ,
50+ "docutils==0.16"
5051 ],
5152}
5253
You can’t perform that action at this time.
0 commit comments