ci: upgrade Hatch to 1.13.0 and adopt uv as installer (#8313)

* try uv

* upgrade hatch

* rm unnecessary specification

* release note
This commit is contained in:
Stefano Fiorucci 2024-10-17 10:32:14 +02:00 committed by GitHub
parent 78f378b34d
commit 7788bfe558
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 14 additions and 5 deletions

View File

@ -10,6 +10,9 @@ on:
paths:
- "**.py"
env:
HATCH_VERSION: "1.13.0"
jobs:
docstrings-linting:
runs-on: ubuntu-latest
@ -19,7 +22,7 @@ jobs:
uses: actions/checkout@v4
- name: Install Hatch
run: pip install hatch=="1.9.3"
run: pip install hatch==${{ env.HATCH_VERSION }}
- name: ruff docstrings linting
run: hatch run ruff check haystack

View File

@ -18,7 +18,7 @@ on:
env:
PYTHON_VERSION: "3.8"
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
HATCH_VERSION: "1.9.3"
HATCH_VERSION: "1.13.0"
jobs:
run:

View File

@ -8,7 +8,7 @@ on:
- "!v[0-9]+.[0-9]+.[0-9]-rc0"
env:
HATCH_VERSION: "1.9.3"
HATCH_VERSION: "1.13.0"
jobs:
release-on-pypi:

View File

@ -13,7 +13,7 @@ on:
- "!v1.[0-9]+.x"
env:
HATCH_VERSION: "1.9.3"
HATCH_VERSION: "1.13.0"
PYTHON_VERSION: "3.10"
jobs:

View File

@ -30,7 +30,7 @@ env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HF_API_TOKEN: ${{ secrets.HUGGINGFACE_API_KEY }}
PYTHON_VERSION: "3.8"
HATCH_VERSION: "1.9.3"
HATCH_VERSION: "1.13.0"
jobs:
format:

View File

@ -60,6 +60,7 @@ dependencies = [
]
[tool.hatch.envs.default]
installer = "uv"
dependencies = [
"pre-commit",
"ruff",
@ -151,6 +152,7 @@ types = "mypy --install-types --non-interactive --cache-dir=.mypy_cache/ {args:h
lint = "pylint -ry -j 0 {args:haystack}"
[tool.hatch.envs.readme]
installer = "uv"
detached = true # To avoid installing the dependencies from the default environment
dependencies = ["haystack-pydoc-tools"]

View File

@ -0,0 +1,4 @@
---
enhancements:
- |
Upgrade Hatch to 1.13.0 and adopt uv as installer, to speed up the CI.