From 4a94c675970bacdfc69d01347c946c8ecde65bdd Mon Sep 17 00:00:00 2001 From: Karan Gathani Date: Thu, 10 Oct 2024 12:06:41 -0700 Subject: [PATCH 1/3] Add narwals integration cmd --- Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Makefile b/Makefile index 819c835e7..7dfad2900 100644 --- a/Makefile +++ b/Makefile @@ -150,6 +150,7 @@ SUB_FILE:= PYTEST_BROWSERS:= --browser webkit --browser firefox --browser chromium PYTEST_DEPLOYS_BROWSERS:= --browser chromium + # Full test path to playwright tests TEST_FILE:=tests/playwright/$(SUB_FILE) # Default `make` values that shouldn't be directly used; (Use `TEST_FILE` instead!) @@ -247,3 +248,10 @@ upgrade-html-deps: FORCE ## Upgrade Shiny's HTMLDependencies exit 1; \ fi @scripts/htmlDependencies.R + +test-narwhals-integration: FORCE + @echo "-------- Install py-shiny ----------" + uv pip install -e ".[dev,test]" --system + @echo "-------- Running py-shiny tests ----------" + $(MAKE) test playwright TEST_FILE="tests/playwright/shiny/components/data_frame" PYTEST_BROWSERS="--browser chromium" + pytest tests/playwright/shiny/components/data_frame tests/pytest From f3cbb25bc07691b10f6452a3a3ba5832a140068e Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Thu, 10 Oct 2024 15:14:49 -0400 Subject: [PATCH 2/3] Add test for narwhals integration --- .github/workflows/pytest.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 7d7ea7229..851c739e2 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -242,3 +242,17 @@ jobs: name: "playright-examples-${{ runner.os }}-${{ matrix.python-version }}-results" path: test-results/ retention-days: 5 + + test-narwhals-integration: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Setup py-shiny + id: install + uses: ./.github/py-shiny/setup + - name: Run test + run: | + make test-narwhals-integration + From 731fd2c12ca904328c8585560bc501366cd5ab84 Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Thu, 10 Oct 2024 15:19:54 -0400 Subject: [PATCH 3/3] Use UV_SYSTEM_PYTHON env explicitly --- .github/workflows/pytest.yaml | 3 ++- Makefile | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 851c739e2..d9ae2ece0 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -253,6 +253,7 @@ jobs: id: install uses: ./.github/py-shiny/setup - name: Run test + env: + UV_SYSTEM_PYTHON: 1 run: | make test-narwhals-integration - diff --git a/Makefile b/Makefile index 7dfad2900..028c66d3a 100644 --- a/Makefile +++ b/Makefile @@ -251,7 +251,6 @@ upgrade-html-deps: FORCE ## Upgrade Shiny's HTMLDependencies test-narwhals-integration: FORCE @echo "-------- Install py-shiny ----------" - uv pip install -e ".[dev,test]" --system + $(MAKE) ci-install-deps @echo "-------- Running py-shiny tests ----------" $(MAKE) test playwright TEST_FILE="tests/playwright/shiny/components/data_frame" PYTEST_BROWSERS="--browser chromium" - pytest tests/playwright/shiny/components/data_frame tests/pytest