Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,22 @@ 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')"
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
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
duckdb
geojson
numpy<2
numpy
pandas
pygmt_helper @ git+https://github.com/ucgmsim/pygmt_helper.git
pytest
Expand Down
Loading