Skip to content

Publish marqov to PyPI (0.2.0): swap to marqov-quantumflow, add CI/release, single-source version#48

Merged
ddri merged 3 commits into
mainfrom
feat/sdk-pypi-publish-integrated
Jun 29, 2026
Merged

Publish marqov to PyPI (0.2.0): swap to marqov-quantumflow, add CI/release, single-source version#48
ddri merged 3 commits into
mainfrom
feat/sdk-pypi-publish-integrated

Conversation

@ddri

@ddri ddri commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

What this does

Makes the marqov SDK installable from PyPI (pip install marqov) and adds the release pipeline. The core change is a one-line dependency swap; everything else follows from it.

This is Phase 2 of the open-core separation (Phase 1 published the QuantumFlow fork marqov-quantumflow). It's integrated on top of the recently-merged community executors (Quantinuum, pyket, pyquil, Rigetti, IonQ) — all of their [all] extras and code are preserved.

Changes

  • Dependency swap: quantumflow @ git+https://…@v1.4.0marqov-quantumflow==1.0.0. PyPI rejects git-URL dependencies, so this is what makes pip install marqov possible. The import name stays quantumflow, so no marqov/*.py changes. Also bumps scipy>=1.11.0>=1.11.2 (1.11.0/1.11.1 have no Python 3.12 wheel).
  • First public version 0.2.0, single-sourced. __version__ in marqov/__init__.py is now the single source of truth; pyproject is dynamic and reads it via [tool.hatch.version] (the hatchling/pydantic idiom). The existing tests/test_version.py is updated to assert against the installed metadata (it previously read the now-dynamic pyproject version). marqov --version, marqov.__version__, and the wheel metadata now always agree.
  • CI + release workflows (the SDK had none): ci.yml runs the full suite with [all,dev]; release.yml publishes to TestPyPI (manual dispatch) / PyPI (on v* tag) via Trusted Publishing (no tokens).
  • PyPI metadata: authors, project URLs, classifiers, keywords; .gitignore now excludes all venvs + .claude/ (the latter was being bundled into the sdist).
  • Tooling/guards: tools/check_no_url_deps.py, tools/verify_marqov_wheel.py (scans the built wheel's Requires-Dist for URL deps), tools/verify_sdk_against_fork.py.

Known limitation (pre-existing, tracked separately)

The 13 test_decorators.py tests are marked xfail. They fail under the full [all] suite because @task serializes the decorated function with cloudpickle at decoration time, which overflows into a RecursionError when the function is a local/closure and many heavy backends are imported. This is pre-existing — the identical 13 fail on unmodified main; it was simply never caught because there was no CI. The real fix is architectural (don't pickle at decoration; reference by name / defer to dispatch — Temporal doesn't require it and Covalent does it lazily). Tracked internally; strict=False since they pass in isolation. Module-level task functions are unaffected.

Verification

  • Full [all,dev] suite green on CI: 414 passed, 13 xfail, 16 skipped.
  • import quantumflow resolves to marqov-quantumflow 1.0.0 (the fork) — no upstream collision.
  • marqov 0.2.0 builds clean: no direct-URL deps in Requires-Dist, sdist free of local tooling, twine check passes.

Note

Medium Risk
Swapping the core transpilation dependency and adding automated PyPI publish affects every install and release; mistakes in version/tag alignment or URL deps would block or break publishing, but runtime SDK code paths are largely unchanged.

Overview
Prepares 0.2.0 for public PyPI install (pip install marqov) by replacing the git-pinned quantumflow dependency with marqov-quantumflow==1.0.0, removing hatchling direct-URL support, and bumping scipy>=1.11.2 for Python 3.12 wheels. Package version is dynamic via [tool.hatch.version] reading marqov/__init__.py; PyPI metadata (authors, classifiers, URLs) is added and README install lines drop git URLs.

Adds GitHub Actions: ci.yml installs [all,dev], runs check_no_url_deps.py, and pytest; release.yml builds with uv, checks tag vs wheel version, and publishes via Trusted Publishing (TestPyPI on dispatch, PyPI on v* tags). .gitignore excludes venv patterns and .claude/ so sdists stay clean.

Tests: test_version.py asserts __version__ matches installed metadata; decorator tests are xfail (known cloudpickle-at-decoration issue under heavy [all] imports). New tools/ scripts guard URL deps in pyproject.toml and validate wheels / fork resolution. CHANGELOG.md documents the release; uv.lock reflects the PyPI fork and full optional extras.

Reviewed by Cursor Bugbot for commit 7e0befc. Bugbot is set up for automated code reviews on this repo. Configure here.

ddri added 2 commits June 29, 2026 10:27
…ingle-source version, add CI/release, metadata

Re-integrated onto current main (which added Quantinuum/pyket/pyquil executors).
- depend on published marqov-quantumflow==1.0.0 (drop git-URL dep); scipy>=1.11.2
- single-source version from marqov/__init__.py via hatchling (pyproject dynamic);
  update existing test_version.py to the metadata-based drift guard
- PyPI metadata (authors, urls, classifiers, keywords); gitignore venvs + .claude
- CI installs .[all,dev]; Trusted-Publishing release workflow
…atform#1259); note in CHANGELOG

The 13 test_decorators.py tests fail under the full [all] suite because @task
cloudpickles the (local) function at decoration time and overflows in a heavy
import environment. Pre-existing (identical failures on unmodified main), fix is
architectural (tracked in marqov-platform#1259). strict=False since they pass in
isolation. Unblocks an honest, green CI for the 0.2.0 release.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 6a322de. Configure here.

Comment thread tools/check_no_url_deps.py Outdated
Comment thread pyproject.toml
@ddri ddri self-assigned this Jun 29, 2026
…extra

- check_no_url_deps.py now scans project.optional-dependencies too (a git/URL
  dep in [all]/[quantinuum]/etc. would otherwise slip past CI but land in
  Requires-Dist and be rejected by PyPI). Verified it catches a planted URL.
- remove duplicate qiskit/pyquil entries in the [all] extra (pre-existing).
@ddri ddri merged commit 9eeea5f into main Jun 29, 2026
3 checks passed
@ddri ddri deleted the feat/sdk-pypi-publish-integrated branch June 30, 2026 15:10
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.

1 participant