Skip to content

Commit

Permalink
Add alt text to relevant images (#45) (#48)
Browse files Browse the repository at this point in the history
(cherry picked from commit 0208cae)

Co-authored-by: Rebecca Dimock <[email protected]>
  • Loading branch information
mergify[bot] and beckykd authored Dec 19, 2024
1 parent a5abf4b commit 8b3033a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions qiskit_addon_obp/utils/visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@ def plot_accumulated_error(metadata: OBPMetadata, axes: Axes) -> None:
which exists within our context.
.. plot::
:alt: Output from the previous code.
:context:
:nofigs:
>>> from qiskit_addon_obp.utils.metadata import OBPMetadata
>>> metadata = OBPMetadata.from_json("docs/_static/dummy_visualization_metadata.json")
.. plot::
:alt: Output from the previous code.
:context: close-figs
:include-source:
Expand Down Expand Up @@ -97,6 +99,7 @@ def plot_left_over_error_budget(metadata: OBPMetadata, axes: Axes) -> None:
>>> metadata = OBPMetadata.from_json("docs/_static/dummy_visualization_metadata.json")
.. plot::
:alt: Output from the previous code.
:context: close-figs
:include-source:
Expand Down Expand Up @@ -144,6 +147,7 @@ def plot_slice_errors(metadata: OBPMetadata, axes: Axes) -> None:
>>> metadata = OBPMetadata.from_json("docs/_static/dummy_visualization_metadata.json")
.. plot::
:alt: Output from the previous code.
:context: close-figs
:include-source:
Expand Down Expand Up @@ -198,6 +202,7 @@ def plot_num_paulis(metadata: OBPMetadata, axes: Axes) -> None:
>>> metadata = OBPMetadata.from_json("docs/_static/dummy_visualization_metadata.json")
.. plot::
:alt: Output from the previous code.
:context: close-figs
:include-source:
Expand Down Expand Up @@ -245,6 +250,7 @@ def plot_num_truncated_paulis(metadata: OBPMetadata, axes: Axes) -> None:
>>> metadata = OBPMetadata.from_json("docs/_static/dummy_visualization_metadata.json")
.. plot::
:alt: Output from the previous code.
:context: close-figs
:include-source:
Expand Down Expand Up @@ -299,6 +305,7 @@ def plot_sum_paulis(metadata: OBPMetadata, axes: Axes) -> None:
>>> metadata = OBPMetadata.from_json("docs/_static/dummy_visualization_metadata.json")
.. plot::
:alt: Output from the previous code.
:context: close-figs
:include-source:
Expand Down Expand Up @@ -355,6 +362,7 @@ def plot_num_qwc_groups(metadata: OBPMetadata, axes: Axes) -> None:
>>> metadata = OBPMetadata.from_json("docs/_static/dummy_visualization_metadata.json")
.. plot::
:alt: Output from the previous code.
:context: close-figs
:include-source:
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ commands =

[testenv:lint]
image-tester-commit = 7ae965ccf21c39e5170334ec7f4882756883860a
deps =
deps =
git+https://github.com/Qiskit/documentation.git@{[testenv:lint]image-tester-commit}\#egg=sphinx-alt-text-validator&subdirectory=scripts/image-tester
basepython = python3.10
extras =
Expand All @@ -34,7 +34,7 @@ commands =
nbqa ruff docs/
mypy qiskit_addon_obp/
pylint -rn qiskit_addon_obp/ test/
sphinx-alt-text-validator -f qiskit_addon_obp -s qiskit_addon_obp/utils/visualization.py
sphinx-alt-text-validator -f qiskit_addon_obp
nbqa pylint -rn docs/
typos
reno lint
Expand Down

0 comments on commit 8b3033a

Please sign in to comment.