Skip to content

Commit 52ec6ee

Browse files
Add a linter to check the images' alt text (#63) (#66)
* Create linter and allowlist * refactor linter and add it to CI * refactor loop * use VCS to install the linter * Skip invalid image * Small fix of the linter (cherry picked from commit 1996a0d) Co-authored-by: Arnau Casau <47946624+arnaucasau@users.noreply.github.com>
1 parent 7463993 commit 52ec6ee

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tox.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ commands =
2121
nbqa ruff --fix docs/
2222

2323
[testenv:lint]
24+
image-tester-commit = 7ae965ccf21c39e5170334ec7f4882756883860a
25+
deps =
26+
git+https://github.com/Qiskit/documentation.git@{[testenv:lint]image-tester-commit}\#egg=sphinx-alt-text-validator&subdirectory=scripts/image-tester
2427
basepython = python3.10
2528
extras =
2629
lint
@@ -31,6 +34,7 @@ commands =
3134
nbqa ruff docs/
3235
mypy qiskit_addon_utils/
3336
pylint -rn qiskit_addon_utils/ test/
37+
sphinx-alt-text-validator -f qiskit_addon_utils -s qiskit_addon_utils/problem_generators/generate_time_evolution_circuit.py
3438
nbqa pylint -rn docs/
3539
typos
3640
reno lint

0 commit comments

Comments
 (0)