Skip to content

feat: make package PyPI-installable and add release workflow#6

Merged
bartzbeielstein merged 1 commit into
mainfrom
feat/pypi-publishing
Jun 2, 2026
Merged

feat: make package PyPI-installable and add release workflow#6
bartzbeielstein merged 1 commit into
mainfrom
feat/pypi-publishing

Conversation

@bartzbeielstein
Copy link
Copy Markdown
Contributor

Why

spotanomaly2 could not be installed from PyPI: three first-party deps were pulled from git via [tool.uv.sources], which is stripped from the built wheel, leaving unresolvable bare requirements. There was also no release workflow.

What

Dependencies → PyPI

  • Pin spotanomaly2-safe>=0.1.0, spotforecast2>=3.5.0, spotforecast2-safe>=15.6.0 as normal versioned requirements.
  • Drop [tool.uv.sources] and [tool.hatch.metadata].allow-direct-references.
  • Regenerate uv.lock from PyPI (spotforecast2 0.22.4→3.5.0, spotforecast2-safe 2.0.1→15.6.0, spotoptim 0.10.3→0.12.4).

Fix API break the version jump exposed

  • OneStepAheadFold moved spotforecast2.model_selectionspotforecast2_safe.splitter. Updated the tuner adapter import + two test imports. Suite green: 401 passed, 3 xfailed; ruff + reuse lint pass.

Release pipeline (adapted from spotanomaly2-safe)

  • .github/workflows/release.yml: semantic-release + PyPI trusted publishing (id-token: write). No back-merge job (single-branch setup).
  • .releaserc.json: conventional-commits config that bumps the pyproject version, builds, and creates the GitHub release.
  • REUSE.toml: annotate .releaserc.json and the generated CHANGELOG.md.

Before merging — required

  1. Register the PyPI pending publisher (https://pypi.org/manage/account/publishing/): project spotanomaly2, owner sequential-parameter-optimization, repo spotanomaly2, workflow release.yml, environment blank. Must exist before the first run or the publish step fails.
  2. Merging to main performs a live, irreversible PyPI publish. The v2.0.0 baseline tag is seeded, so this feat: cuts 2.1.0.

🤖 Generated with Claude Code

Replace the git-sourced first-party deps with normal versioned PyPI
requirements so the built wheel resolves under `pip install spotanomaly2`:

- pyproject: pin spotanomaly2-safe>=0.1.0, spotforecast2>=3.5.0,
  spotforecast2-safe>=15.6.0; drop [tool.uv.sources] and
  [tool.hatch.metadata].allow-direct-references entirely.
- uv.lock: re-resolve from PyPI (spotforecast2 0.22.4->3.5.0,
  spotforecast2-safe 2.0.1->15.6.0, spotoptim 0.10.3->0.12.4).

Fix the API break the version jump exposed: OneStepAheadFold moved from
spotforecast2.model_selection to spotforecast2_safe.splitter. Update the
tuner adapter import and the two test imports. Full suite green
(401 passed, 3 xfailed) against the PyPI-pinned versions.

Add the release pipeline (adapted from spotanomaly2-safe):

- .github/workflows/release.yml: semantic-release + PyPI trusted
  publishing (id-token: write). back-merge job omitted (single-branch).
- .releaserc.json: conventional-commits config that bumps the pyproject
  version, builds, and creates the GitHub release.
- REUSE.toml: annotate .releaserc.json and the generated CHANGELOG.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@bartzbeielstein bartzbeielstein merged commit 94f45a3 into main Jun 2, 2026
2 checks passed
@bartzbeielstein bartzbeielstein deleted the feat/pypi-publishing branch June 2, 2026 16:22
@bartzbeielstein
Copy link
Copy Markdown
Contributor Author

🎉 This PR is included in version 2.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant