From fd3063665c69677ba0cbbcbf6c6ca316e8358168 Mon Sep 17 00:00:00 2001 From: Matt Carey Date: Wed, 5 Mar 2025 11:53:32 +0000 Subject: [PATCH] fix: script dependencies --- .github/workflows/release.yml | 7 ++++++- scripts/build_docs.py | 4 ++++ scripts/update_version.py | 9 ++++++--- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0862706..8aa0670 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,12 +33,17 @@ jobs: - name: Update version in __init__.py if: ${{ steps.release.outputs.release_created }} run: | - uv run --python-dep tomli scripts/update_version.py + uv run scripts/update_version.py - name: Build and publish package if: ${{ steps.release.outputs.release_created }} env: UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }} run: | + # Make sure py.typed files exist + touch py.typed + mkdir -p stackone_ai + touch stackone_ai/py.typed + uv build uv publish diff --git a/scripts/build_docs.py b/scripts/build_docs.py index 235cee6..c6dfc2f 100644 --- a/scripts/build_docs.py +++ b/scripts/build_docs.py @@ -1,3 +1,7 @@ +#!/usr/bin/env python +# /// script +# requires-python = ">=3.11" +# /// import re from pathlib import Path diff --git a/scripts/update_version.py b/scripts/update_version.py index ae2c3f3..04e8e81 100755 --- a/scripts/update_version.py +++ b/scripts/update_version.py @@ -1,10 +1,13 @@ #!/usr/bin/env python +# /// script +# requires-python = ">=3.11" +# dependencies = [ +# "tomli", +# ] +# /// """ Script to ensure version consistency between pyproject.toml and __init__.py. Run this script after release-please updates the version in pyproject.toml. - -Dependencies: -- tomli """ import re