Skip to content

Commit

Permalink
switch to uv from pip (#1349)
Browse files Browse the repository at this point in the history
* switch to uv from pip

* add virtual env

* add venv

* relax uv version

---------

Co-authored-by: lbbrhzn <[email protected]>
  • Loading branch information
drc38 and lbbrhzn authored Oct 5, 2024
1 parent 5eca3f1 commit d4fa32b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/constraints.txt

This file was deleted.

15 changes: 11 additions & 4 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,19 @@ jobs:

- name: Upgrade pip
run: |
pip install --constraint=.github/workflows/constraints.txt pip
python -m venv venv
. venv/bin/activate
pip install "$(grep '^uv' < requirements.txt)"
pip --version
- name: Install Python modules
run: |
pip install --constraint=.github/workflows/constraints.txt pre-commit
. venv/bin/activate
uv pip install "$(grep '^pre-commit' < requirements.txt)"
- name: Run pre-commit on all files
run: |
. venv/bin/activate
pre-commit run --all-files --show-diff-on-failure --color=always
hacs:
Expand Down Expand Up @@ -72,10 +76,13 @@ jobs:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Install requirements
run: |
pip install --constraint=.github/workflows/constraints.txt pip
pip install -r requirements.txt --constraint=.github/workflows/constraints.txt
python -m venv venv
. venv/bin/activate
pip install "$(grep '^uv' < requirements.txt)"
uv pip install -r requirements.txt --prerelease=allow
- name: Tests suite
run: |
. venv/bin/activate
pytest \
--cov=./ \
--cov-report=xml \
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
colorlog==6.8.2
pip>=21.0,<24.3
uv>=0.4
ruff==0.6.9
ocpp==1.0.0
websockets==13.1
Expand Down

0 comments on commit d4fa32b

Please sign in to comment.