diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 02db228..924bd1f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -25,9 +25,22 @@ jobs: - name: Install build dependencies run: python -m pip install build + + - name: Verify release tag matches package version + run: | + PACKAGE_VERSION=$(python -c "from pathlib import Path; import re; text = Path('src/refract/_version.py').read_text(encoding='utf-8'); match = re.search(r'__version__\\s*=\\s*\"([^\"]+)\"', text); print(match.group(1))") + RELEASE_TAG="${{ github.event.release.tag_name }}" + echo "Package version: ${PACKAGE_VERSION}" + echo "Release tag: ${RELEASE_TAG}" + if [ "v${PACKAGE_VERSION}" != "${RELEASE_TAG}" ]; then + echo "::error::Release tag ${RELEASE_TAG} does not match package version v${PACKAGE_VERSION}" + exit 1 + fi - name: Build sdist and wheel run: python -m build - name: Publish package to PyPI uses: pypa/gh-action-pypi-publish@release/v1 + with: + skip-existing: true diff --git a/CHANGELOG.md b/CHANGELOG.md index e6266af..36c00a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.2.0] — 2026-04-12 + +### Added + +- Relevance-driven `LearnedRouter.fit_from_relevance()` training workflow +- `LearnedRouter.evaluate_from_relevance()` with per-metric quality reporting +- `LearnedRouterEvaluation` summary type +- Learned-router save/load support for persisted routing models +- Examples for training and evaluating learned routing +- Unit coverage for learned-router training, routing, and persistence + +### Changed + +- Exported learned-router APIs from `refract` and `refract.routing` +- Updated README documentation for learned-router training, usage, and evaluation +- Removed the stale PyTorch-based learned extra in favor of the sklearn-based implementation + ## [0.1.0] — 2026-04-11 ### Added @@ -26,5 +43,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Comprehensive test suite (unit + integration) - Examples: quickstart, RAG pipeline, code search, custom metric, benchmarks -[Unreleased]: https://github.com/ujjwalkumar26/refract/compare/v0.1.0...HEAD +[Unreleased]: https://github.com/ujjwalkumar26/refract/compare/v0.2.0...HEAD +[0.2.0]: https://github.com/ujjwalkumar26/refract/releases/tag/v0.2.0 [0.1.0]: https://github.com/ujjwalkumar26/refract/releases/tag/v0.1.0 diff --git a/src/refract/_version.py b/src/refract/_version.py index 3869c62..d7bf7de 100644 --- a/src/refract/_version.py +++ b/src/refract/_version.py @@ -1,3 +1,3 @@ """Version information for refract.""" -__version__ = "0.1.2" +__version__ = "0.2.0"