From 6bd94148208c98ae7b0c33d02fad94586eacdee6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8xbro=20Hansen?= Date: Tue, 26 Sep 2023 10:11:02 +0200 Subject: [PATCH] Small maintenance (#675) --- .github/workflows/test.yaml | 20 +++++--------------- .pre-commit-config.yaml | 4 ++-- scripts/download_data.sh | 7 +++++-- 3 files changed, 12 insertions(+), 19 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index a5b6f2b9..d0e8959f 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -16,22 +16,12 @@ concurrency: jobs: pre_commit: - name: Run pre-commit hooks + name: Run pre-commit runs-on: 'ubuntu-latest' steps: - - uses: actions/checkout@v3 - with: - fetch-depth: "1" - - name: set PY - run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV - - uses: actions/cache@v3 - with: - path: ~/.cache/pre-commit - key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }} - - name: pre-commit - uses: pre-commit/action@v3.0.0 - test_suite: - name: Pytest on ${{ matrix.os }} with Python ${{ matrix.python-version }} + - uses: holoviz-dev/holoviz_tasks/pre-commit@v0.1a17 + unit_test_suite: + name: Unit tests on Python ${{ matrix.python-version }}, ${{ matrix.os }} needs: [pre_commit] runs-on: ${{ matrix.os }} strategy: @@ -50,7 +40,7 @@ jobs: SETUPTOOLS_ENABLE_FEATURES: "legacy-editable" USE_PYGEOS: '0' steps: - - uses: holoviz-dev/holoviz_tasks/install@v0.1a15 + - uses: holoviz-dev/holoviz_tasks/install@v0.1a17 with: name: unit_test_suite python-version: ${{ matrix.python-version }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 74635594..16b02f65 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,13 +17,13 @@ repos: - id: trailing-whitespace exclude: \.svg$ - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.0.283 + rev: v0.0.291 hooks: - id: ruff args: [geoviews] files: geoviews/ - repo: https://github.com/hoxbro/clean_notebook - rev: v0.1.10 + rev: v0.1.11 hooks: - id: clean-notebook - repo: https://github.com/codespell-project/codespell diff --git a/scripts/download_data.sh b/scripts/download_data.sh index 8f982033..613ff481 100755 --- a/scripts/download_data.sh +++ b/scripts/download_data.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +set -eux pipefail + bokeh sampledata HERE=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) @@ -8,8 +10,9 @@ geoviews fetch-data --path="$HERE/../examples" python -c " try: import geodatasets as gds - gds.get_path('geoda airbnb') - gds.get_path('nybb') except ImportError: pass +else: + gds.get_path('geoda airbnb') + gds.get_path('nybb') "