Skip to content

Commit

Permalink
ci: upgrade Hatch to 1.13.0 and adopt uv as installer (#8313)
Browse files Browse the repository at this point in the history
* try uv

* upgrade hatch

* rm unnecessary specification

* release note
  • Loading branch information
anakin87 authored Oct 17, 2024
1 parent 78f378b commit 7788bfe
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/docstrings_linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
paths:
- "**.py"

env:
HATCH_VERSION: "1.13.0"

jobs:
docstrings-linting:
runs-on: ubuntu-latest
Expand All @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pypi_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/readme_sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ dependencies = [
]

[tool.hatch.envs.default]
installer = "uv"
dependencies = [
"pre-commit",
"ruff",
Expand Down Expand Up @@ -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"]

Expand Down
4 changes: 4 additions & 0 deletions releasenotes/notes/upgrade-hatch-uv-5e5cccdf7450d01f.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
enhancements:
- |
Upgrade Hatch to 1.13.0 and adopt uv as installer, to speed up the CI.

0 comments on commit 7788bfe

Please sign in to comment.