Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

Commit

Permalink
Switch to uv for CI (#552)
Browse files Browse the repository at this point in the history
* Switch to uv

Signed-off-by: zethson <[email protected]>

* python -m

Signed-off-by: zethson <[email protected]>

* system

Signed-off-by: zethson <[email protected]>

* system #2

Signed-off-by: zethson <[email protected]>

* install UV for coverage

Signed-off-by: zethson <[email protected]>

* Remove @

Signed-off-by: zethson <[email protected]>

* explicit naming

Signed-off-by: zethson <[email protected]>

* explicit naming

Signed-off-by: zethson <[email protected]>

* fully editable

Signed-off-by: zethson <[email protected]>

* fully editable

Signed-off-by: zethson <[email protected]>

* fully editable

Signed-off-by: zethson <[email protected]>

* coverage fix

Signed-off-by: zethson <[email protected]>

* Simplify

Signed-off-by: zethson <[email protected]>

* Simplify

Signed-off-by: zethson <[email protected]>

---------

Signed-off-by: zethson <[email protected]>
  • Loading branch information
Zethson authored Mar 24, 2024
1 parent b3ac0fb commit 720e6db
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 17 deletions.
29 changes: 13 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
python-version: ["3.11"]
group: ["bionty-unit", "bionty-docs"]
timeout-minutes: 25

Expand All @@ -35,11 +35,9 @@ jobs:
path: lndocs
ref: main
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: ".github/workflows/build.yml" # See dependencies below
- name: Cache pre-commit
uses: actions/cache@v3
with:
Expand All @@ -48,10 +46,10 @@ jobs:

- name: Install Python dependencies
run: |
python -m pip install -U pip
pip install -U laminci
pip install rich
pip install ipywidgets
python -m pip install -U pip uv
python -m uv pip install --system -U laminci
python -m uv pip install --system rich
python -m uv pip install --system ipywidgets
- name: Configure AWS
uses: aws-actions/configure-aws-credentials@v1
Expand All @@ -61,7 +59,7 @@ jobs:
aws-region: eu-central-1

- name: Lint
if: matrix.python-version == '3.10' && matrix.group == 'bionty-unit'
if: matrix.python-version == '3.11' && matrix.group == 'bionty-unit'
run: |
nox -s lint
- name: Build
Expand All @@ -75,7 +73,7 @@ jobs:
path: .coverage

- name: Deploy docs
if: ${{ matrix.python-version == '3.10' && matrix.group == 'bionty-docs' }}
if: ${{ matrix.python-version == '3.11' && matrix.group == 'bionty-docs' }}
id: netlify
uses: nwtgck/[email protected]
with:
Expand All @@ -92,14 +90,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "pip"
cache-dependency-path: ".github/workflows/build.yml"
python-version: "3.11"
- run: |
pip install coverage[toml]
pip install --no-deps .
python -m pip install -U pip uv
uv pip install --system coverage[toml]
uv pip install --system --no-deps .
- uses: actions/download-artifact@v2
- name: run coverage
run: |
Expand Down
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def docs(session: nox.Session):
@nox.session
@nox.parametrize("group", ["bionty-unit", "bionty-docs"])
def build(session: nox.Session, group: str):
session.run(*"pip install -e .[dev]".split())
session.run(*"uv pip install --system -e .[dev]".split())
coverage_args = "--cov=bionty_base --cov-append --cov-report=term-missing"
if group == "bionty-unit":
session.run(*f"pytest {coverage_args} ./tests".split())
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ classifiers = [
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
dependencies = [
"pronto>=2.5.4, <2.5.6",
Expand Down

0 comments on commit 720e6db

Please sign in to comment.