You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
html-noplot does not work with strict build options #913
The official instructions for building html-noplot include setting -D plot_gallery=0 -b html $(ALLSPHINXOPTS). This will emit the following warning:
The config value `plot_gallery' has type `str', defaults to `bool'.
This effectively prevents us from having -W in ALLSPHINXOPTS, i.e. running in strict mode that turns warnings into errors. Given that you cannot set anything besides strings from the CLI, this is pretty limiting.
If you put plot_gallery = 'True' in your conf.py instead of plot_gallery = True in your conf.py it should work, as Sphinx will see it as a str var, then in SG we try to be smart about converting string values to booleans. Can you try it, and if it works, open a PR to improve the docs here?
That indeed works, thanks. Still, this feels kinda awkward since we didn't have plot_gallery config option before. I'm guessing it just assumes plot_gallery=True if nothing is set and then complains because the CLI option is a string. Maybe we should fix this behavior rather than documenting the workaround?
Activity
larsoner commentedon Feb 8, 2022
If you put
plot_gallery = 'True'in yourconf.pyinstead ofplot_gallery = Truein yourconf.pyit should work, as Sphinx will see it as a str var, then in SG we try to be smart about converting string values to booleans. Can you try it, and if it works, open a PR to improve the docs here?pmeier commentedon Feb 8, 2022
That indeed works, thanks. Still, this feels kinda awkward since we didn't have
plot_galleryconfig option before. I'm guessing it just assumesplot_gallery=Trueif nothing is set and then complains because the CLI option is a string. Maybe we should fix this behavior rather than documenting the workaround?larsoner commentedon Feb 11, 2022
That would be nice. It might just require making the default configuration
'plot_gallery': 'true'or something. Want to take a look?Adds `plot_gallery` as a string by default