Skip to content

Commit

Permalink
Moving to setup-uv and hynek/build-and-inspect-python-package in …
Browse files Browse the repository at this point in the history
…CI (#564)
  • Loading branch information
jamesbraza authored Oct 11, 2024
1 parent bead07a commit 34721a3
Show file tree
Hide file tree
Showing 4 changed files with 222 additions and 163 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- run: uv sync
- run: uv build --sdist --wheel --out-dir dist/ .
- uses: hynek/build-and-inspect-python-package@v2
- uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
17 changes: 9 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ jobs:
python-version: [3.11] # Our min supported Python version
steps:
- uses: actions/checkout@v4
- name: Set up uv
run: |-
curl -LsSf https://astral.sh/uv/install.sh | sh
uv python pin ${{ matrix.python-version }}
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- run: uv python pin ${{ matrix.python-version }}
- uses: hynek/build-and-inspect-python-package@v2
- run: uv sync --python-preference=only-managed
- run: uv run refurb paperqa tests
- run: uv run pylint paperqa
Expand All @@ -42,10 +43,10 @@ jobs:
python-version: [3.11, 3.12] # Our min and max supported Python versions
steps:
- uses: actions/checkout@v4
- name: Set up uv
run: |-
curl -LsSf https://astral.sh/uv/install.sh | sh
uv python pin ${{ matrix.python-version }}
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- run: uv python pin ${{ matrix.python-version }}
- run: uv sync --python-preference=only-managed
- name: Cache datasets
uses: actions/cache@v4
Expand Down
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,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
exclude: |
Expand All @@ -23,12 +23,12 @@ 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]
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.8.0
rev: 24.10.0
hooks:
- id: black
- repo: https://github.com/rbubley/mirrors-prettier
Expand Down Expand Up @@ -61,15 +61,15 @@ repos:
additional_dependencies:
- "validate-pyproject-schema-store[all]>=2024.06.24" # Pin for Ruff's FURB154
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.4.18
rev: 0.4.20
hooks:
- id: uv-lock
- repo: https://github.com/renovatebot/pre-commit-hooks
rev: 38.106.4
rev: 38.116.0
hooks:
- id: renovate-config-validator
- repo: https://github.com/adamchainz/blacken-docs
rev: 1.18.0
rev: 1.19.0
hooks:
- id: blacken-docs
- repo: https://github.com/jsh9/markdown-toc-creator
Expand Down
Loading

0 comments on commit 34721a3

Please sign in to comment.