From fe99f15745a14147bb025df671cfc7177fcc9808 Mon Sep 17 00:00:00 2001 From: Jake Faulkner Date: Mon, 17 Feb 2025 14:00:28 +1300 Subject: [PATCH 1/4] chore: upgrade numpy --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 0168637..36ce0e8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ duckdb geojson -numpy<2 +numpy pandas pygmt_helper @ git+https://github.com/ucgmsim/pygmt_helper.git pytest From 96145e406825e45f5eb4028476a07c7802c59e9e Mon Sep 17 00:00:00 2001 From: Jake Faulkner Date: Mon, 17 Feb 2025 14:05:01 +1300 Subject: [PATCH 2/4] ci: use cached uv for dependency installation --- .github/workflows/pytest.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index b561dda..3ace16b 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -16,10 +16,16 @@ jobs: python-version: "3.x" - name: Install GMT run: sudo apt-get update && sudo apt-get install -y gmt libgmt-dev ghostscript - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -e . + + - name: Define a cache dependency glob + uses: astral-sh/setup-uv@v5 + with: + enable-cache: true + cache-dependency-glob: "requirements**.txt" + + - name: Install the project + run: uv sync --all-extras --dev + - name: Initialise DuckDB run: python -c "import duckdb; duckdb.sql('INSTALL sqlite')" From 3f4c7ef84364a3536df43490971fb9e3e31f54d7 Mon Sep 17 00:00:00 2001 From: Jake Faulkner Date: Mon, 17 Feb 2025 14:10:20 +1300 Subject: [PATCH 3/4] ci: make python version consistent --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 196deeb..469a205 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ name = "nshmdb" authors = [{name="QuakeCoRE"}] description = "A library for working with 2022 NSHM fault geometry" readme = "README.md" -requires-python = ">=3.7" +requires-python = ">=3.10" dynamic = ["dependencies", "version"] [project.scripts] From 2f7c4b64d3155d1675814806a923380734f56e05 Mon Sep 17 00:00:00 2001 From: Jake Faulkner Date: Mon, 17 Feb 2025 14:21:26 +1300 Subject: [PATCH 4/4] ci: activate virtual environment --- .github/workflows/pytest.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 3ace16b..8cbefad 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -27,10 +27,11 @@ jobs: run: uv sync --all-extras --dev - name: Initialise DuckDB - run: python -c "import duckdb; duckdb.sql('INSTALL sqlite')" + run: source .venv/bin/activate && python -c "import duckdb; duckdb.sql('INSTALL sqlite')" - name: Run tests run: | + source .venv/bin/activate pytest --cov=nshmdb --cov-report=html tests - name: Upload coverage data