diff --git a/.github/workflows/python-ci.yml b/.github/workflows/python-ci.yml index a159f81..60747b6 100644 --- a/.github/workflows/python-ci.yml +++ b/.github/workflows/python-ci.yml @@ -19,6 +19,7 @@ jobs: python: ['3.13', '3.14', '3.15'] env: UV_LOCKED: '1' + UV_CACHE_DIR: /home/runner/.cache/uv steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: @@ -26,17 +27,16 @@ jobs: - uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3 with: python-version: ${{ matrix.python }} - enable-cache: true - cache-python: true - cache-suffix: python-${{ matrix.python }} + enable-cache: false - uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 with: path: | .venv .mypy_cache - key: python-${{ matrix.python }}-venv-${{ hashFiles('uv.lock') }} + /home/runner/.cache/uv + key: python-${{ matrix.python }}-deps-${{ hashFiles('uv.lock') }} restore-keys: | - python-${{ matrix.python }}-venv- + python-${{ matrix.python }}-deps- - name: Install Task uses: go-task/setup-task@a00fbb05ce67b35648be3c78cbc9fd85354c757e # v2.2.0 with: @@ -51,6 +51,8 @@ jobs: run: task test - name: Build run: uv build + - name: Prune the uv cache + run: uv cache prune --ci infra-scan: name: Scan with KICS diff --git a/CHANGELOG.md b/CHANGELOG.md index e771c0a..1242a65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,14 +4,16 @@ All notable changes to this package are documented here. The format follows [Kee ## [Unreleased] +## [0.5.0] - 2026-11-15 + ### Added -- Shorter README with a module overview and a limitations section. - Tag-triggered release workflow that checks the tag against the package version, runs the checks, builds and attests the wheel and sdist, and publishes the GitHub release with notes from this changelog. ### Changed - Relaxed the Langfuse requirement from an exact pin to the patch releases of the tested minor version (`langfuse>=5.2.0,<5.3`). +- Shortened the README to a module overview and a limitations section. ## [0.4.0] - 2026-11-15 @@ -50,5 +52,6 @@ All notable changes to this package are documented here. The format follows [Kee - Replaced type-specific score convenience methods with the typed `Score` and `ScoreTarget` API. - Limited support to Python 3.13–3.14 and Langfuse 4.14.2. -[Unreleased]: https://github.com/DigintLab/digintlab-langfuse-python/compare/v0.4.0...HEAD +[Unreleased]: https://github.com/DigintLab/digintlab-langfuse-python/compare/v0.5.0...HEAD +[0.5.0]: https://github.com/DigintLab/digintlab-langfuse-python/compare/v0.4.0...v0.5.0 [0.4.0]: https://github.com/DigintLab/digintlab-langfuse-python/releases/tag/v0.4.0 diff --git a/README.md b/README.md index 6745d89..e248e97 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Typed helpers for tracing, scoring, and redacting agent runs with Langfuse. Python 3.13 to 3.15. Not on PyPI; install a tagged release from GitHub: ```bash -uv add "digintlab-langfuse-python @ git+https://github.com/DigintLab/digintlab-langfuse-python@v0.4.0" +uv add "digintlab-langfuse-python @ git+https://github.com/DigintLab/digintlab-langfuse-python@v0.5.0" ``` Add the `[redaction]` extra for PII detection. Each [release](https://github.com/DigintLab/digintlab-langfuse-python/releases) also ships a wheel and an sdist. diff --git a/pyproject.toml b/pyproject.toml index 1fbe624..d4e3396 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "digintlab-langfuse-python" -version = "0.4.0" +version = "0.5.0" description = "Typed Python helpers for Langfuse tracing, scoring, callbacks, and LiteLLM metadata in DigIntLab agent runtimes." readme = "README.md" requires-python = ">=3.13,<3.16" diff --git a/tests/package_contract/test_packaging.py b/tests/package_contract/test_packaging.py index 7f8abfe..951379a 100644 --- a/tests/package_contract/test_packaging.py +++ b/tests/package_contract/test_packaging.py @@ -2,6 +2,7 @@ import shutil import subprocess +import sys from pathlib import Path from zipfile import ZipFile @@ -26,15 +27,21 @@ def test_wheel_contains_py_typed(tmp_path: Path) -> None: with ZipFile(wheels[0]) as wheel: assert "digintlab_langfuse/py.typed" in wheel.namelist() + constraints = tmp_path / "constraints.txt" + venv_dir = tmp_path / "venv" + setup_commands = ( + # Pin the clean install to uv.lock so it reuses cached builds instead of resolving and compiling the newest releases. + [uv, "export", "--locked", "--no-dev", "--no-emit-project", "--no-hashes", "--no-header", "--output-file", str(constraints)], + [uv, "venv", "--python", sys.executable, str(venv_dir)], + [uv, "pip", "install", "--python", str(venv_dir), "--constraint", str(constraints), str(wheels[0])], + ) + for command in setup_commands: + setup_result = subprocess.run(command, cwd=repo_root, text=True, capture_output=True, check=False) # noqa: S603 + assert setup_result.returncode == 0, setup_result.stdout + setup_result.stderr + import_result = subprocess.run( # noqa: S603 [ - uv, - "run", - "--isolated", - "--no-project", - "--with", - str(wheels[0]), - "python", + str(venv_dir / "bin" / "python"), "-c", ( "import digintlab_langfuse\n" diff --git a/uv.lock b/uv.lock index a60034d..313e399 100644 --- a/uv.lock +++ b/uv.lock @@ -641,7 +641,7 @@ wheels = [ [[package]] name = "digintlab-langfuse-python" -version = "0.4.0" +version = "0.5.0" source = { editable = "." } dependencies = [ { name = "botocore" },