Skip to content

Make package publishable to PyPI - #13

Merged
tanem merged 8 commits into
mainfrom
feat/pypi-publish
Jun 11, 2026
Merged

Make package publishable to PyPI#13
tanem merged 8 commits into
mainfrom
feat/pypi-publish

Conversation

@tanem

@tanem tanem commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Summary

Prepares mt5-pnl-exporter for its first PyPI release (1.0.0). No src/ or runtime changes — packaging and release mechanics only.

  • Packaging metadata (pyproject.toml): PEP 639 licence (license = "MIT" + license-files), [project.urls], trove classifiers, keywords, and twine>=6.1 as a dev dep.
  • Release workflow (.github/workflows/release.yml): Trusted Publishing (OIDC, no stored token). A published GitHub Release → PyPI; manual workflow_dispatch → TestPyPI. One shared build job; twine check --strict runs before upload; TestPyPI uses skip-existing so the rehearsal is repeatable.
  • CI guard + pins (.github/workflows/ci.yml): uv build + twine check --strict on every push/PR; all actions reconciled from tag pins to commit SHAs (Renovate-managed), resolving the doc-vs-reality drift.
  • Docs: CONTRIBUTING.md gains a "Releasing" section and drops an inaccurate "bundled schema file" claim; CLAUDE.md notes the release workflow.

Design: docs/superpowers/specs/2026-06-12-pypi-publish-design.md · Plan: docs/superpowers/plans/2026-06-12-pypi-publish.md

Test Plan

  • ruff, mypy --strict, pytest (86 passed, 100% coverage) all pass locally
  • uv build + uv run twine check --strict dist/* PASSED on both artifacts
  • Both workflow YAML files parse
  • CI green on this PR

After merge (manual, human-driven)

  1. Register pending publishers on PyPI and TestPyPI (owner tanem, repo mt5-pnl-exporter, workflow release.yml, env pypi / testpypi); create the pypi and testpypi GitHub Environments.
  2. Run release.yml via workflow_dispatch → TestPyPI rehearsal; confirm OIDC + rendered page.
  3. Tag v1.0.0, draft a GitHub Release, publish → PyPI.

🤖 Generated with Claude Code

tanem and others added 8 commits June 12, 2026 05:29
Metadata (PEP 639 licence, urls, classifiers, keywords), a Trusted
Publishing release workflow triggered by GitHub Releases with a
TestPyPI dispatch rehearsal, a CI twine-check guard, and ci.yml SHA-pin
reconciliation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Clarify that the GitHub Release is the trigger and changelog; pin twine
as a Renovate-managed dev dependency rather than an ephemeral uvx tool.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Task-by-task plan for packaging metadata, the Trusted-Publishing release
workflow, the CI twine-check guard, ci.yml SHA pins, and docs, with
resolved action SHAs and the manual setup + rollout steps.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Address code-quality review: re-run twine check in the release build job
before publishing, make the TestPyPI rehearsal repeatable with
skip-existing, and list the build/twine-check steps in CONTRIBUTING's
CI-replication block.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@tanem
tanem merged commit 181ba8d into main Jun 11, 2026
1 of 2 checks passed
@tanem
tanem deleted the feat/pypi-publish branch June 15, 2026 01:29
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