Skip to content

ci: fixes to the Lab environment publishing flow - #456

Merged
TheGupta2012 merged 6 commits into
mainfrom
fix/lab-env-publish-flow
Oct 15, 2026
Merged

TheGupta2012 merged 6 commits into
mainfrom
fix/lab-env-publish-flow

Conversation

@TheGupta2012

@TheGupta2012 TheGupta2012 commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Summary of changes

Follow-up to #455. This PR collects fixes to the Lab environment publishing flow (publish-lab-env.yml, bin/publish_lab_env.py). It stays open while the staging and production runs find what needs to change.

Changes so far

  • Environment name: pyqasm (vX.Y.Z) instead of pyqasm X.Y.Z, to match the existing pyqasm environments. The kernel display name is Python 3 [pyqasm vX.Y.Z]. The preflight duplicate-name check follows the new name.
  • Backport rule: the rule that keeps an older release from becoming the group's latest now reads the version from both name formats, in any case. Before, it did not recognise pyqasm (v1.2.1) as pyqasm.
  • Only user-facing extras: the first staging run (run) built an environment with 100 packages. The test, lint and docs extras added about 50 developer packages: pytest, pylint, mypy, black, sphinx and a second qbraid-cli. The environment now gets pyqasm with every other extra the release declares, plus ipykernel.
Install Linux packages
Before: all extras, ipykernel, matplotlib 100
Now: pyqasm[cli,pulse,visualization], ipykernel 48
Live 1.2.1 environment 41

The 7 extra packages over 1.2.1 come from the cli extra (typer, rich, click helpers) and the pulse extra (openpulse). A new user-facing extra is picked up from PyPI without a code change.

  • pyqasm logo: qbraid envs create --logo only takes a qBraid provider name, and pyqasm is not a provider. The script now sets the pyqasm light and dark PNGs from qbraid-static-assets as the logo by default (pyqasm-light-no-text.png, pyqasm-dark-no-text.png). An optional variable, QBRAID_ENV_LOGO_URL, takes the https URL of a PNG and overrides both. QBRAID_ENV_LOGO is gone.

    • Preflight checks that each logo URL serves image/png. Lab saves kernel icons as PNG files.
    • After create, the URLs go on the local registry entry, which upload sends to the API. The light logo is also written as the local kernel icon.
    • After create, the script removes the Python logo-svg.svg that the CLI copies into the kernel directory. JupyterLab shows logo-svg ahead of the PNGs, so the launcher kept the Python icon.
    • Lab downloads the kernel icon from the API's light logo on install, so users see the pyqasm icon.
    • If the API logo differs after upload, the script sets it through the environment update route.

    Neither GitHub Environment sets QBRAID_ENV_LOGO_URL, so runs use the defaults.

First staging run

Every step passed:

  • built on ubuntu-24.04 with the system Python 3.12.3
  • smoke test passed
  • uploaded as pyqasm_vq5daq, approved, and set as the latest of the default qBraid environment group

The environment has since been deleted from staging.

Testing

  • A real create run with qbraid-cli[envs]==0.16.10 accepted the new name. The stored kernel display name is Python 3 [pyqasm v1.3.0]. The same run installed the new package set, and the smoke test passed on it.
  • A real create run with a logo URL wrote it as the kernel icon and stored it on the registry entry. Both default URLs serve image/png, and the light one downloads byte for byte as the kernel icon.
  • black, pylint (10.00) and actionlint pass. Mocked unit tests (46) pass, including a create test that fails without the SVG removal. They cover both name formats, the dev-extras exclusion, the default logos and override, the logo checks, and the upload fallback.

The existing pyqasm environments use names like "pyqasm (v1.2.1)". The
workflow now names new ones the same way, with kernel display name
"Python 3 [pyqasm vX.Y.Z]". The backport rule reads the version from
both name formats, in any case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@argus-eye

argus-eye Bot commented Oct 15, 2026

Copy link
Copy Markdown

Argus review

Auto-review is off for this repo. Tick the box below to run a review on this PR.

  • Trigger Argus review

Estimated cost

  • Files changed: 2
  • Diff lines (±): 8
  • Historical avg: ~350.7k tokens · ~$1.38 · across last 13 review(s)

Tip: you can also comment @argus-eye review at any time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: qBraid/pyqasm/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e9cbbf96-05dd-402f-bdfc-14ceaf4d2878

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

The test, lint and docs extras pulled in about 50 developer packages
(pytest, pylint, mypy, black, sphinx, a second qbraid-cli) that no notebook
uses. The environment now gets pyqasm with every other extra its release
declares, plus ipykernel: 48 packages instead of 100. That is the live
1.2.1 environment plus the cli and pulse extras. matplotlib still comes
from the visualization extra, so the explicit entry is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@TheGupta2012
TheGupta2012 deployed to env-publish-staging October 15, 2026 09:09 — with GitHub Actions Active
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

TheGupta2012 and others added 2 commits October 15, 2026 14:45
`qbraid envs create --logo` only takes a qBraid provider name, and pyqasm
is not a provider. The new optional QBRAID_ENV_LOGO_URL variable takes the
https URL of a PNG logo instead. Preflight checks that it serves image/png.

After create, the script stores the URL on the local registry entry, which
upload sends to the API, and writes it as the local kernel icon. Lab
downloads the kernel icon from the API's logo on install. If the logo is
missing after upload, the script sets it through the environment update
route.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Use the pyqasm light and dark PNGs from qbraid-static-assets as the
catalog logo. Lab uses the light one as the kernel icon. The optional
QBRAID_ENV_LOGO_URL variable still overrides both. Drop QBRAID_ENV_LOGO,
since pyqasm is not a qBraid provider.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@TheGupta2012
TheGupta2012 deployed to env-publish-staging October 15, 2026 10:50 — with GitHub Actions Active
qbraid envs create copies the Python logo-svg.svg into the kernel
directory. JupyterLab shows logo-svg ahead of logo-64x64.png, so the
launcher kept the Python icon. Remove the SVG after setting the PNGs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@TheGupta2012
TheGupta2012 deployed to env-publish-staging October 15, 2026 10:57 — with GitHub Actions Active
@TheGupta2012

Copy link
Copy Markdown
Member Author

staging publish works, merging

@TheGupta2012
TheGupta2012 merged commit fad3092 into main Oct 15, 2026
18 checks passed

This branch was successfully deployed

1 active deployment
env-publish-staging — ac304a1f Deployed Oct 15, 2026 by TheGupta2012 via Build and publish on staging #4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants