feat: migrate build/release tooling to uv + python-semantic-release#67
feat: migrate build/release tooling to uv + python-semantic-release#67tomtranjr wants to merge 1 commit into
Conversation
Replace Poetry + run-number versioning with the uv build backend and python-semantic-release for Conventional-Commit-driven releases. - pyproject.toml: switch build-system to uv_build; set module-name to "deployml" (dist is deployml-core); exclude local .terraform artifacts from the sdist/wheel; add dev group (pytest, python-semantic-release), pytest config, and semantic_release config (build via uv, release on main) - baseline version set to 0.0.60 to match the latest tag/PyPI release; the first automated release bumps to 0.1.0 - .github/workflows/release.yml: uv-based test gate + semantic-release version/publish with OIDC trusted publishing to PyPI (replaces test-pypi.yml) - delete poetry.toml; track uv.lock instead of ignoring poetry.lock - add tests/test_smoke.py (main has no unit tests yet; the suite lives on dev) - docs/contributing.md: document uv workflow and commit-message conventions Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
lokeshmuvva
left a comment
There was a problem hiding this comment.
Started reviewing this against the current uv and python-semantic-release docs. Leaving one question now on CI trigger scope; more to follow separately.
One thing not tied to a specific line: this PR targets main, but contributions here normally branch off dev and PR into dev (dev is ahead of main until a promotion). Was targeting main directly intentional for this migration, or should it be rebased onto dev?
| - 'docs/**' | ||
| - '*.md' | ||
| pull_request: | ||
| branches: [ main ] |
There was a problem hiding this comment.
Question: both triggers here (push and pull_request) are scoped to branches: [ main ] only. Is folding dev in (e.g. branches: [main, dev] on the pull_request trigger) out of scope for this migration, or intentionally deferred? As-is, PRs into dev still get zero CI from this workflow — same gap the old test-pypi.yml had.
summary
Replaces Poetry + run-number versioning with the uv build backend and python-semantic-release (PSR) for Conventional-Commit-driven releases. Both tasks are done together because they rewrite the same files and PSR's build step is
uv build.uv_build. Setsmodule-name = "deployml"(dist isdeployml-core) and excludes local.terraformartifacts from the sdist/wheel.version_tomlkeepspyproject.tomlin sync. Baseline set to0.0.60(matches the latest tag + PyPI); this PR'sfeat:bumps the first automated release to 0.1.0.semantic-release version+uv publishvia OIDC trusted publishing (no tokens). Replacestest-pypi.yml.poetry.toml; tracksuv.lockinstead of ignoringpoetry.lock.tests/test_smoke.py; documents the uv workflow + commit conventions incontributing.md.why 0.1.0 is safe on PyPI
0.1.0>0.0.60(PEP 440) and was never uploaded, so it becomes the new "latest" with no collision. (PyPI only forbids re-uploading an existing version.)verified locally
uv build→ wheel is 182KB (was 41MB before excluding a stray local.terraformprovider binary);docker/,templates/,terraform/assets all present, zero.terraform/tfstate junk.uv run pytest→ 2 passeduv lock --checkin sync;semantic-releaserestricts releases tomainheads-up / decisions made
mainhas no unit tests. The real suite (test_doctor.py,test_helpers.py,test_platform_compat.py, …) is tracked only ondevand targets dev-only source (e.g.platform_compat.pydoesn't exist onmain), so it can't be ported cleanly. Added a minimal smoke test so the gate runs and passes; wire the full suite in once it lands onmain.devis 45 commits ahead ofmainwith that unmerged work. Flagging per the "work off main" convention; not addressed here.required before this can release (repo/PyPI settings, not code)
deployml-core(repodeployml-core/deployml, workflowrelease.yml). Required for OIDCuv publish.main. Allow theGITHUB_TOKEN/bot to bypass required-PR rules, or supply a PAT.PYPI_API_TOKEN/TEST_PYPI_API_TOKENsecrets are no longer used (per-push TestPyPI publishing was dropped).test plan
testjob runs pytest on this PRreleasejob publishes0.1.0to PyPI, tagsv0.1.0, creates the GitHub Release +CHANGELOG.md🤖 Generated with Claude Code