Skip to content

Commit

Permalink
Use UV instead of pip
Browse files Browse the repository at this point in the history
  • Loading branch information
ayalash committed Oct 11, 2024
1 parent bf3a70d commit d39234c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,19 @@ jobs:
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
env:
UV_PYTHON: ${{ matrix.python-version }}

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Checkout the repository
uses: actions/checkout@main
- name: Install the default version of uv
id: setup-uv
uses: astral-sh/setup-uv@v3
- name: Print the installed version
run: echo "Installed uv version is ${{ steps.setup-uv.outputs.uv-version }}"
- name: Install Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install dependencies
run: make env
- name: Lint with pylint
Expand Down
15 changes: 6 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
default: test

test: env
.env/bin/pytest --cov=slash --cov-report=html tests
.venv/bin/pytest --cov=slash --cov-report=html tests

pylint: env
.env/bin/pylint -j 4 --rcfile=.pylintrc slash tests doc
.venv/bin/pylint -j 4 --rcfile=.pylintrc slash tests doc

env: .env/.up-to-date

.env/.up-to-date: Makefile pyproject.toml
python -m venv .env
.env/bin/pip install -e .[testing,doc]
touch .env/.up-to-date
env:
uv venv --seed
uv pip install -e ".[testing,doc]"

doc: env
.env/bin/sphinx-build -a -W -E doc build/sphinx/html
.venv/bin/sphinx-build -a -W -E doc build/sphinx/html

.PHONY: doc

0 comments on commit d39234c

Please sign in to comment.