Skip to content

Add Sphinx directive to automate QPY version history table generation#16091

Open
jathin-sr wants to merge 2 commits intoQiskit:mainfrom
jathin-sr:qpy-version-history
Open

Add Sphinx directive to automate QPY version history table generation#16091
jathin-sr wants to merge 2 commits intoQiskit:mainfrom
jathin-sr:qpy-version-history

Conversation

@jathin-sr
Copy link
Copy Markdown

Fixes #16086

This PR introduces a Sphinx extension that dynamically generates the QPY version history table from git tags at documentation build time.

This removes the need to manually update the table during releases, which has previously led to missed updates (e.g. 2.3.1, 2.4.0).

Implementation details:

  • Adds a custom directive in docs/_ext/
  • Extracts QPY_VERSION and QPY_COMPATIBILITY_VERSION from tagged releases
  • Handles legacy versions (< 0.20.0) manually
  • Integrates into qiskit.qpy docstring via directive

Inspired by the versionutils.py extension used in the qiskit-metapackage repo.

AI/LLM disclosure

  • I didn't use LLM tooling, or only used it privately.
  • I used the following tool to help write this PR description: ChatGPT
  • I used the following tool to generate or modify code: ChatGPT

@jathin-sr jathin-sr requested a review from a team as a code owner April 27, 2026 11:28
@qiskit-bot qiskit-bot added the Community PR PRs from contributors that are not 'members' of the Qiskit repo label Apr 27, 2026
@qiskit-bot
Copy link
Copy Markdown
Collaborator

Thank you for opening a new pull request.

Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient.

While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone.

One or more of the following people are relevant to this code:

  • @Qiskit/terra-core
  • @mtreinish

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 27, 2026

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Community PR PRs from contributors that are not 'members' of the Qiskit repo

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Automate QPY Version history generation

3 participants