Skip to content

Commit b066db0

Browse files
authored
Merge pull request #74 from iterorganization/fail-docs-ci-on-warn
Fail CI if there are warnings when building docs
2 parents ff3167f + 3c96e42 commit b066db0

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

docs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# You can set these variables from the command line, and also
55
# from the environment for the first two.
6-
SPHINXOPTS ?=
6+
SPHINXOPTS ?= -W
77
SPHINXBUILD ?= sphinx-build
88
SOURCEDIR = source
99
GENERATEDDIR = $(SOURCEDIR)/generated

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ test = [
4848
"pytest-randomly",
4949
]
5050
docs = [
51+
"waveform-editor[muscle3]",
5152
"sphinx>=6.0.0,<7.0.0",
5253
"sphinx-autosummary-accessors>=0.1.2",
5354
"sphinx-immaterial>=0.11.0,<0.12",

waveform_editor/util.py

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,19 @@ class State:
4343
4444
Example:
4545
46-
ignore_clicks = State()
47-
def process(obj):
48-
if ignore_clicks:
49-
return
50-
...
51-
widget = pn.widgets.Button(name="Process", on_click=process)
52-
53-
# Elsewhere we can use a with statement to temporarily ignore clicks:
54-
with ignore_clicks:
55-
# process will not do anything, even though the on_click triggers
56-
widget.clicks = 0
46+
.. code-block:: python
47+
48+
ignore_clicks = State()
49+
def process(obj):
50+
if ignore_clicks:
51+
return
52+
...
53+
widget = pn.widgets.Button(name="Process", on_click=process)
54+
55+
# Elsewhere we can use a with statement to temporarily ignore clicks:
56+
with ignore_clicks:
57+
# process will not do anything, even though the on_click triggers
58+
widget.clicks = 0
5759
"""
5860

5961
def __init__(self):

0 commit comments

Comments
 (0)