From ac93095f25722d4bd6c8f2cac2b5babc2794239f Mon Sep 17 00:00:00 2001 From: isabel zimmerman Date: Mon, 17 Mar 2025 17:18:47 -0400 Subject: [PATCH 1/3] use uv in ci --- .github/workflows/tests.yml | 40 +++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 395e186..9da2be4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -28,13 +28,14 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - name: Install uv and Python + uses: astral-sh/setup-uv@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | - python -m pip install --upgrade pip - python -m pip install -e ".[dev, all_models]" + uv pip install --upgrade pip + uv pip install -e ".[dev, all_models]" - name: Run Tests run: | pytest -m 'not rsc_test and not docker' --cov --cov-report xml @@ -47,14 +48,15 @@ jobs: if: ${{ !github.event.pull_request.head.repo.fork }} steps: - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - name: Install uv and Python + uses: astral-sh/setup-uv@v5 with: python-version: "3.9" - name: Install dependencies run: | - python -m pip install --upgrade pip - python -m pip install ".[dev]" - python -m pip install --upgrade git+https://github.com/rstudio/vetiver-python@${{ github.sha }} + uv pip install --upgrade pip + uv pip install ".[dev]" + uv pip install --upgrade git+https://github.com/rstudio/vetiver-python@${{ github.sha }} echo {{ github.sha }} - name: run Connect run: | @@ -76,14 +78,15 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - name: Install uv and Python + uses: astral-sh/setup-uv@v5 with: python-version: "3.10" - name: Install dependencies run: | - python -m pip install --upgrade pip - python -m pip install ".[dev]" - python -m pip install --upgrade git+https://github.com/rstudio/vetiver-python@${{ github.sha }} + uv pip install --upgrade pip + uv pip install ".[dev]" + uv pip install --upgrade git+https://github.com/rstudio/vetiver-python@${{ github.sha }} - name: run Docker run: | python script/setup-docker/docker.py @@ -101,13 +104,14 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - name: Install uv and Python + uses: astral-sh/setup-uv@v5 with: python-version: "3.10" - name: Install dependencies run: | - python -m pip install --upgrade pip - python -m pip install -e .[dev] + uv pip install --upgrade pip + uv pip install -e .[dev] - name: Run tests run: | @@ -138,14 +142,15 @@ jobs: uses: actions/checkout@v3 - name: Setup Python - uses: actions/setup-python@v4 + - name: Install uv and Python + uses: astral-sh/setup-uv@v5 with: python-version: "3.11" - name: Install Packages shell: bash run: | - pip install ".[dev,all_models]" + uv pip install ".[dev,all_models]" - name: Run Tests shell: bash @@ -158,7 +163,8 @@ jobs: needs: [test-no-extras, tests, test-connect] steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - name: Install uv and Python + uses: astral-sh/setup-uv@v5 with: python-version: "3.10" - name: "Build Package" From 174b52a9b574c95779ffe9549eec6d74bbe6e1da Mon Sep 17 00:00:00 2001 From: isabel zimmerman Date: Mon, 17 Mar 2025 17:34:18 -0400 Subject: [PATCH 2/3] format yaml --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9da2be4..e4c3868 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -78,8 +78,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Install uv and Python - uses: astral-sh/setup-uv@v5 + - name: Install uv and Python + uses: astral-sh/setup-uv@v5 with: python-version: "3.10" - name: Install dependencies From f2dd4777d6ed0b73d7ce2899bb2e3f093db9f9c8 Mon Sep 17 00:00:00 2001 From: isabel zimmerman Date: Wed, 19 Mar 2025 16:46:42 -0400 Subject: [PATCH 3/3] remove extra setup python --- .github/workflows/tests.yml | 71 ++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 36 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e4c3868..087b562 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -3,7 +3,7 @@ name: tests on: workflow_dispatch: push: - branches: ['main', 'dev-*', 'dev'] + branches: ["main", "dev-*", "dev"] pull_request: release: types: [published] @@ -15,16 +15,16 @@ jobs: strategy: matrix: include: - - os: 'macos-latest' - python-version: '3.9' - - os: 'windows-latest' - python-version: '3.10' - - os: 'ubuntu-latest' - python-version: '3.11' - - os: 'ubuntu-latest' - python-version: '3.12' - - os: 'ubuntu-latest' - python-version: '3.13' + - os: "macos-latest" + python-version: "3.9" + - os: "windows-latest" + python-version: "3.10" + - os: "ubuntu-latest" + python-version: "3.11" + - os: "ubuntu-latest" + python-version: "3.12" + - os: "ubuntu-latest" + python-version: "3.13" steps: - uses: actions/checkout@v3 @@ -74,30 +74,30 @@ jobs: pytest vetiver -m 'rsc_test' test-docker: - name: "Test Docker" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Install uv and Python - uses: astral-sh/setup-uv@v5 - with: - python-version: "3.10" - - name: Install dependencies - run: | - uv pip install --upgrade pip - uv pip install ".[dev]" - uv pip install --upgrade git+https://github.com/rstudio/vetiver-python@${{ github.sha }} - - name: run Docker - run: | - python script/setup-docker/docker.py - pip freeze > vetiver_requirements.txt - docker build -t mock . - docker run -d -v $PWD/pinsboard:/vetiver/pinsboard -p 8080:8080 mock - sleep 5 - curl -s --retry 10 --retry-connrefused http://0.0.0.0:8080 - - name: Run tests - run: | - pytest vetiver -m 'docker' + name: "Test Docker" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install uv and Python + uses: astral-sh/setup-uv@v5 + with: + python-version: "3.10" + - name: Install dependencies + run: | + uv pip install --upgrade pip + uv pip install ".[dev]" + uv pip install --upgrade git+https://github.com/rstudio/vetiver-python@${{ github.sha }} + - name: run Docker + run: | + python script/setup-docker/docker.py + pip freeze > vetiver_requirements.txt + docker build -t mock . + docker run -d -v $PWD/pinsboard:/vetiver/pinsboard -p 8080:8080 mock + sleep 5 + curl -s --retry 10 --retry-connrefused http://0.0.0.0:8080 + - name: Run tests + run: | + pytest vetiver -m 'docker' test-no-extras: name: "Test no exra ml frameworks" @@ -141,7 +141,6 @@ jobs: - name: Checkout Code uses: actions/checkout@v3 - - name: Setup Python - name: Install uv and Python uses: astral-sh/setup-uv@v5 with: