Qiskit / Qiskit/documentation

The `sphinx-alt-text-validator` doesn't verify release notes and files other than `.py`

Open
#2,564 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

infra 🏗️
Dominant language
Jupyter Notebook
Stars
106
Forks
223
Avg merge
1d 8h
Merged PRs (30d)
72

Description

We should extend the sphinx-alt-text-validator that each API use via VCS to check release notes and other files than just Python files.

https://github.com/Qiskit/documentation/blob/19ce99f62ac6862c43b6d7856ce72d97407dc85e/scripts/image-tester/sphinx_alt_text_validator/__init__.py#L28

The Qiskit SDK uses .yaml files for their release notes, and runtime uses .rst.

This is the output of the image checker if we run it in the https://github.com/Qiskit/qiskit/tree/main/releasenotes folder looking for yaml files:

Errors found in releasenotes/notes/1.0/add-annotated-to-drawers-8bcc3a069dd981ad.yaml:
- Error in line 19: .. plot::

Errors found in releasenotes/notes/1.3/add-twirl-circuit-ff4d4437190551bc.yaml:
- Error in line 9: .. plot::

Errors found in releasenotes/notes/1.3/remove_identity_equiv-9c627c8c35b2298a.yaml:
- Error in line 8: .. plot::
- Error in line 18: .. plot::

Errors found in releasenotes/notes/1.3/add-random-clifford-util-5358041208729988.yaml:
- Error in line 8: .. plot::

Errors found in releasenotes/notes/1.1/add-elide-swaps-b0a4c373c9af1efd.yaml:
- Error in line 11: .. plot::
- Error in line 25: .. plot::

Errors found in releasenotes/notes/1.1/star-prerouting-0998b59880c20cef.yaml:
- Error in line 8: .. plot:
- Error in line 20: .. plot:

Errors found in releasenotes/notes/1.1/remove-final-reset-488247c01c4e147d.yaml:
- Error in line 9: .. plot::
- Error in line 23: .. plot::

Errors found in releasenotes/notes/0.23/solovay-kitaev-transpiler-pass-bc256c2f3aac28c6.yaml:
- Error in line 30: .. plot::

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with scripts/image-tester/sphinx_alt_text_validator/init.py at the referenced line and inspect how the validator selects files. Run the image checker against qiskit/releasenotes, including the YAML files and the runtime RST files mentioned in the issue. Done means the checker verifies those files and reports the referenced plot directives appropriately.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, yaml
Domain
documentation, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.