feat: Use Narwhals to allow PyArrow / Polars input #10571
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Bokeh-CI | |
on: | |
push: | |
branches: | |
- main | |
- branch-* | |
pull_request: | |
defaults: | |
run: | |
shell: bash -l {0} | |
env: | |
CHROME_VER: "118.0.5993.88" | |
CHROME_REV: "chromium_2670" | |
jobs: | |
build: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # full history to get proper build version | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
miniconda-version: 'latest' | |
activate-environment: bk-test | |
run-post: ${{ runner.os != 'Windows' }} | |
- name: Install libmamba solver | |
shell: bash -l {0} | |
run: | | |
conda install -q -n base conda-libmamba-solver | |
conda config --set solver libmamba | |
- name: Update bk-test environment | |
shell: bash -l {0} | |
run: | | |
conda env update -q -n bk-test -f conda/environment-build.yml | |
- name: Install node modules | |
run: bash scripts/ci/install_node_modules.sh | |
- name: Build BokehJS | |
working-directory: ./bokehjs | |
run: node make build | |
- name: Build pip packages | |
env: | |
BOKEHJS_ACTION: 'install' | |
run: python -m build . | |
- name: Verify pip install from sdist | |
run: bash scripts/ci/verify_pip_install_from_sdist.sh | |
- name: Verify pip install using sdist | |
run: bash scripts/ci/verify_pip_install_using_sdist.sh | |
- name: Verify pip install using wheel | |
run: bash scripts/ci/verify_pip_install_using_wheel.sh | |
- name: Build conda package | |
run: bash scripts/ci/build_conda_package.sh | |
- name: Verify conda install | |
run: bash scripts/ci/verify_conda_install.sh | |
- name: Upload wheel package | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wheel-package | |
path: dist/bokeh-*-py3-none-any.whl | |
- name: Upload bokehjs package | |
uses: actions/upload-artifact@v4 | |
with: | |
name: bokehjs-package | |
path: bokehjs/build/dist/bokeh-bokehjs-*.tgz | |
codebase: | |
needs: build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-24.04, macos-latest, windows-latest] | |
steps: | |
- name: Configure line endings in git | |
if: runner.os == 'Windows' | |
run: git config --global core.autocrlf false | |
- uses: actions/checkout@v4 | |
- name: Prepare Environment | |
uses: ./.github/workflows/composite/test-setup | |
with: | |
test-env: '3.10' | |
source-tree: 'keep' | |
- name: List installed software | |
run: | | |
conda info | |
conda list | |
echo "node $(node --version)" | |
echo "npm $(npm --version)" | |
- name: Run codebase checks | |
run: pytest --color=yes tests/codebase | |
- name: MyPy | |
if: success() || failure() | |
run: mypy --version && mypy | |
examples: | |
needs: build | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Prepare Environment | |
uses: ./.github/workflows/composite/test-setup | |
with: | |
test-env: '3.10' | |
source-tree: 'delete' | |
- name: Install chromium | |
run: | | |
INSTALLED=$(chromium --version | cut -d' ' -f2 | cut -d'.' -f1-3) | |
EXPECTED=$(echo "$CHROME_VER" | cut -d'.' -f1-3) | |
echo "Currently installed Chromium $INSTALLED; expected $EXPECTED" | |
if [[ "$INSTALLED" = "$EXPECTED" ]]; then | |
echo "Using pre-installed version of chromium" | |
else | |
URL=https://github.com/bokeh/chromium/raw/main/linux/$CHROME_VER | |
wget --no-verbose $URL/$CHROME_REV.assert | |
wget --no-verbose $URL/$CHROME_REV.snap | |
sudo snap ack $CHROME_REV.assert | |
sudo snap install $CHROME_REV.snap | |
fi | |
- name: List installed software | |
run: | | |
conda info | |
conda list | |
echo "node $(node --version)" | |
echo "npm $(npm --version)" | |
chromium --version | |
- name: Start chrome headless | |
working-directory: ./bokehjs | |
run: node make test:spawn:headless # starts chrome in the background on port 9222 | |
- name: Run tests | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
run: pytest -s -v --color=yes --tb line tests/test_examples.py | |
- name: Collect results | |
if: always() | |
env: | |
DST: "examples-report" | |
run: | | |
mkdir -p ${DST} | |
cp --parents examples-report.html $(cat .images-list) ${DST} | |
- name: Upload report | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: examples-report | |
path: examples-report | |
unit-test: | |
needs: build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
max-parallel: 6 | |
matrix: | |
os: [ubuntu-24.04, macos-latest, windows-latest] | |
python-version: ['3.10', '3.11', '3.12', '3.13'] | |
env: | |
OS: ${{ matrix.os }} | |
PYTHON: ${{ matrix.python-version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Prepare Environment | |
uses: ./.github/workflows/composite/test-setup | |
with: | |
test-env: ${{ matrix.python-version }} | |
source-tree: 'delete' | |
- name: Ensure Python version | |
run: if [[ ! "$(python --version | cut -d' ' -f2)" == "${{ matrix.python-version }}"* ]]; then exit 1; fi | |
- name: List installed software | |
run: | | |
conda info | |
conda list | |
echo "node $(node --version)" | |
echo "npm $(npm --version)" | |
- name: Test defaults | |
run: pytest tests/test_defaults.py | |
- name: Test cross | |
run: pytest tests/test_cross.py | |
- name: Run tests | |
if: success() || failure() | |
run: | | |
COLOR="--color=yes" | |
COVERAGE="--cov=bokeh --cov-report=xml" | |
POLICY="--last-failed --last-failed-no-failures none" | |
pytest $COLOR $COVERAGE tests/unit || pytest $COLOR $POLICY tests/unit | |
- name: Upload code coverage | |
uses: codecov/codecov-action@v4 | |
if: success() || failure() | |
with: | |
env_vars: OS,PYTHON | |
flags: unit | |
verbose: true | |
minimal-deps: | |
needs: build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-24.04, windows-latest] | |
env: | |
OS: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Prepare Environment | |
uses: ./.github/workflows/composite/test-setup | |
with: | |
test-env: 'minimal-deps' | |
source-tree: 'delete' | |
- name: List installed software | |
run: | | |
conda info | |
conda list | |
echo "node $(node --version)" | |
echo "npm $(npm --version)" | |
- name: Run tests | |
run: | | |
COLOR="--color=yes" | |
COVERAGE="--cov=bokeh --cov-report=xml" | |
POLICY="--last-failed --last-failed-no-failures none" | |
pytest -m "not sampledata" $COLOR $COVERAGE tests/unit || pytest -m "not sampledata" $COLOR $POLICY tests/unit | |
- name: Upload code coverage | |
uses: codecov/codecov-action@v4 | |
with: | |
env_vars: OS | |
flags: unit,minimal | |
verbose: true | |
documentation: | |
needs: build | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Prepare Environment | |
uses: ./.github/workflows/composite/test-setup | |
with: | |
test-env: '3.10' | |
source-tree: 'delete' | |
- name: List installed software | |
run: | | |
conda info | |
conda list | |
echo "node $(node --version)" | |
echo "npm $(npm --version)" | |
- name: Build docs | |
run: bash scripts/ci/build_docs.sh | |
- name: Upload docs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: docs-html | |
path: docs/bokeh/docs-html.tgz | |
downstream: | |
needs: build | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Prepare Environment | |
uses: ./.github/workflows/composite/test-setup | |
with: | |
test-env: 'downstream' | |
source-tree: 'delete' | |
- name: Install downstream packages | |
run: bash scripts/ci/install_downstream_packages.sh | |
- name: List installed software | |
run: | | |
conda info | |
conda list | |
echo "node $(node --version)" | |
echo "npm $(npm --version)" | |
- name: Run tests | |
run: bash scripts/ci/run_downstream_tests.sh |