diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1435ef2f..664afb56 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -10,16 +10,35 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: astral-sh/setup-uv@v3 + - id: build-fhaviary + uses: hynek/build-and-inspect-python-package@v2 with: - enable-cache: true - - run: uv sync - - name: Build a binary wheel and a source tarball - run: | - uv build --sdist --wheel --out-dir dist/ . - uv build --sdist --wheel --out-dir dist/ packages/gsm8k - uv build --sdist --wheel --out-dir dist/ packages/hotpotqa - # TODO: go back to `uv publish` after https://github.com/astral-sh/uv/issues/8030 + upload-name-suffix: -fhaviary + - name: Download built fhaviary artifact to dist/ + uses: actions/download-artifact@v4 + with: + name: ${{ steps.build-fhaviary.outputs.artifact-name }} + path: dist + - id: build-aviary-gsm8k + uses: hynek/build-and-inspect-python-package@v2 + with: + path: packages/gsm8k + upload-name-suffix: -gsm8k + - name: Download built aviary.gsm8k artifact to dist/ + uses: actions/download-artifact@v4 + with: + name: ${{ steps.build-aviary-gsm8k.outputs.artifact-name }} + path: dist + - id: build-aviary-hotpotqa + uses: hynek/build-and-inspect-python-package@v2 + with: + path: packages/hotpotqa + upload-name-suffix: -hotpotqa + - name: Download built aviary.hotpotqa artifact to dist/ + uses: actions/download-artifact@v4 + with: + name: ${{ steps.build-aviary-hotpotqa.outputs.artifact-name }} + path: dist - uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8097a7ee..7570ca83 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -32,6 +32,23 @@ jobs: with: enable-cache: true - run: uv python pin ${{ matrix.python-version }} + - name: Check fhaviary build + if: matrix.python-version == '3.11' + uses: hynek/build-and-inspect-python-package@v2 + with: + upload-name-suffix: -fhaviary + - name: Check aviary.gsm8k build + if: matrix.python-version == '3.11' + uses: hynek/build-and-inspect-python-package@v2 + with: + path: packages/gsm8k + upload-name-suffix: -gsm8k + - name: Check aviary.hotpotqa build + if: matrix.python-version == '3.11' + uses: hynek/build-and-inspect-python-package@v2 + with: + path: packages/hotpotqa + upload-name-suffix: -hotpotqa - run: uv sync --python-preference=only-managed - name: Run refurb run: | # Go with this until https://github.com/astral-sh/uv/issues/6459 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a11ad046..80da9dcc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ default_language_version: python: python3 repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: check-added-large-files - id: check-byte-order-marker @@ -19,7 +19,7 @@ repos: - id: mixed-line-ending - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.6.8 + rev: v0.6.9 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -63,19 +63,13 @@ repos: additional_dependencies: - "validate-pyproject-schema-store[all]>=2024.08.19" # For Ruff renaming RUF025 to C420 - repo: https://github.com/astral-sh/uv-pre-commit - rev: 0.4.17 + rev: 0.4.20 hooks: - id: uv-lock - repo: https://github.com/renovatebot/pre-commit-hooks - rev: 38.101.1 + rev: 38.120.1 hooks: - id: renovate-config-validator - - repo: https://github.com/henryiii/check-sdist - rev: v1.0.0 - hooks: - - id: check-sdist - args: [--inject-junk] - additional_dependencies: [setuptools>=64, setuptools_scm>=8] - repo: https://github.com/pre-commit/mirrors-mypy rev: v1.11.2 hooks: diff --git a/pyproject.toml b/pyproject.toml index 1a8b7209..03b82c28 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -221,7 +221,6 @@ addopts = "--typeguard-packages=aviary --doctest-modules" # By default all warnings emitted during the test session will be displayed in # a summary at the end of the test session. filterwarnings = [ - "ignore:'imghdr' is deprecated and slated for removal in Python 3.13:DeprecationWarning", # SEE: https://github.com/BerriAI/litellm/issues/2929#issuecomment-2345224633 "ignore:Support for class-based `config` is deprecated, use ConfigDict instead", # SEE: https://github.com/BerriAI/litellm/issues/5648 'ignore:open_text is deprecated. Use files\(\) instead:DeprecationWarning', # SEE: https://github.com/BerriAI/litellm/issues/5647 ]