Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
c51a329
vectorized bounding box around measurements
AndrewRidden-Harper Dec 4, 2025
4ec2c75
use rasterio coordinate transforms
AndrewRidden-Harper Dec 4, 2025
b090427
immediately exclude invalid map values
AndrewRidden-Harper Dec 4, 2025
3b02d6f
basic prototype
AndrewRidden-Harper Dec 8, 2025
00344e6
bug fixes
AndrewRidden-Harper Dec 8, 2025
c9f9e64
in progress
AndrewRidden-Harper Dec 10, 2025
f345744
add typer
AndrewRidden-Harper Dec 10, 2025
4788062
working pieces but not all brought together
AndrewRidden-Harper Dec 11, 2025
dd3a5d9
improved id raster creation
AndrewRidden-Harper Dec 12, 2025
a68f170
improvements for making initial vs30 rasters
AndrewRidden-Harper Dec 13, 2025
4704724
improved structure
AndrewRidden-Harper Dec 15, 2025
70bd683
small fixes
AndrewRidden-Harper Dec 15, 2025
5176b5b
basic cluster_update functionality
AndrewRidden-Harper Dec 16, 2025
edb2a4a
improved handling of clustered data
AndrewRidden-Harper Dec 17, 2025
97ca0a2
initial vs30 raster compatible with new column names
AndrewRidden-Harper Dec 17, 2025
f110d5e
create the hybrid geology, coast dist, slope raster
AndrewRidden-Harper Dec 17, 2025
f63c1c2
renamed modules
AndrewRidden-Harper Dec 17, 2025
98e6afd
del old vs30 code
AndrewRidden-Harper Dec 17, 2025
482b663
del more old vs30 code
AndrewRidden-Harper Dec 17, 2025
0f48dc4
reorganised
AndrewRidden-Harper Dec 17, 2025
21a98c1
renamed to spatial for clarity
AndrewRidden-Harper Dec 19, 2025
3de4a50
cli command for spatial update (mvn)
AndrewRidden-Harper Dec 19, 2025
0d45450
pipeline v1 (untested)
AndrewRidden-Harper Dec 23, 2025
a1cb7fa
resolved some small differences between old and new
AndrewRidden-Harper Jan 5, 2026
d6009bb
updates for consistency with old code
AndrewRidden-Harper Jan 5, 2026
598af30
more descriptive filenames
AndrewRidden-Harper Jan 5, 2026
f490ce0
improved output filename clarity
AndrewRidden-Harper Jan 5, 2026
64ab83b
more descriptive file and variable names
AndrewRidden-Harper Jan 6, 2026
55d3ec7
add flag in config for doing the Bayesian update
AndrewRidden-Harper Jan 6, 2026
d810376
only take inputs from config.yaml for simplicity
AndrewRidden-Harper Jan 7, 2026
aee54b1
experimental debugging
AndrewRidden-Harper Jan 8, 2026
3ec24f6
adopted legacy GDAL coordinate transformations
AndrewRidden-Harper Jan 8, 2026
e4fdb51
del unnecessary float64 declarations
AndrewRidden-Harper Jan 8, 2026
e14a427
more descriptive variable names
AndrewRidden-Harper Jan 8, 2026
fd99974
tidied up cpt observation clustering code
AndrewRidden-Harper Jan 9, 2026
e464557
tidying up comments docstrings etc..
AndrewRidden-Harper Jan 9, 2026
55b4ee2
centralize hardcoded values in config.yaml
AndrewRidden-Harper Jan 11, 2026
a715efc
address code review findings
AndrewRidden-Harper Jan 11, 2026
aae637e
adding foster 2019 nz vs30 map pdf
AndrewRidden-Harper Jan 11, 2026
9675224
compute-at-locations command
AndrewRidden-Harper Jan 12, 2026
be966d6
add multiprocessing
AndrewRidden-Harper Jan 12, 2026
bb70dc2
consolidate no data values
AndrewRidden-Harper Jan 12, 2026
8a6d59a
multi proc working
AndrewRidden-Harper Jan 13, 2026
eea382a
pydandic, pass config filename, threadpoolctl
AndrewRidden-Harper Jan 13, 2026
627b3c5
initial commit of tests and benchmark data
AndrewRidden-Harper Jan 14, 2026
9e7b2a6
improved testing coverage
AndrewRidden-Harper Jan 20, 2026
b91367f
compute_at_locations separated into helper functions
AndrewRidden-Harper Jan 20, 2026
3149520
common combine code and more helper functions
AndrewRidden-Harper Jan 21, 2026
6478768
Uses cli.from_docstring(app)
AndrewRidden-Harper Jan 21, 2026
a2e2588
tidying up config file
AndrewRidden-Harper Jan 22, 2026
e493b80
config.yaml contains all input filenames
AndrewRidden-Harper Jan 22, 2026
9b96321
claude code-compactor tool
AndrewRidden-Harper Jan 26, 2026
ab08e89
reorganized config and code-simplification
AndrewRidden-Harper Jan 27, 2026
1e4dcf9
Add GitHub workflows for code quality checks
AndrewRidden-Harper Jan 27, 2026
0f6d1ff
claude code-simplifier pass 2
AndrewRidden-Harper Jan 27, 2026
a9e35cd
deptry and ruff fix
AndrewRidden-Harper Jan 27, 2026
09659a0
deptry fix
AndrewRidden-Harper Jan 27, 2026
390e33e
change resource path code to pass GitHub pytests
AndrewRidden-Harper Jan 27, 2026
e1c534d
PR comment, added coordinate details
AndrewRidden-Harper Jan 27, 2026
9e46668
fix testing issues with typer ansi and numpy version
AndrewRidden-Harper Jan 27, 2026
d6c0b4e
required coverage to 90% from 95%
AndrewRidden-Harper Jan 27, 2026
5f26fa9
claude code-simplifier tool
AndrewRidden-Harper Jan 27, 2026
f94778e
moved most params to constants.py and tidied imports
AndrewRidden-Harper Jan 30, 2026
1ce87bd
del unnecessary variables and funcs
AndrewRidden-Harper Jan 30, 2026
94fa6ad
imports moved to module level
AndrewRidden-Harper Jan 30, 2026
281a6ce
params from config only at initialization, then passed as function args
AndrewRidden-Harper Jan 31, 2026
6d89c14
major tidy up
AndrewRidden-Harper Feb 3, 2026
40a172c
del wrapper functions
AndrewRidden-Harper Feb 3, 2026
c92c0e7
del large section headers
AndrewRidden-Harper Feb 3, 2026
2ea2e7b
math replaced with np
AndrewRidden-Harper Feb 3, 2026
68848f0
del unnecessary variable assignments
AndrewRidden-Harper Feb 4, 2026
9597219
moved more variables into constants.py
AndrewRidden-Harper Feb 9, 2026
ed1679b
del inaccurate comment
AndrewRidden-Harper Feb 9, 2026
e2d2cec
correct comment
AndrewRidden-Harper Feb 9, 2026
3a40e6d
del non-critical tests
AndrewRidden-Harper Feb 10, 2026
5ce6c5f
more comprehensive docstring and clearer parameter names
AndrewRidden-Harper Feb 10, 2026
64daa65
improved variable names
AndrewRidden-Harper Feb 11, 2026
1320b36
del wrapper function posterior_from_bayesian_update
AndrewRidden-Harper Feb 11, 2026
e14c54d
refactored code to get vs30 for ids
AndrewRidden-Harper Feb 11, 2026
971d31d
claude code-simplifier tool
AndrewRidden-Harper Feb 11, 2026
e9ab5f8
trimmed single_threaded_blas docstring
AndrewRidden-Harper Feb 11, 2026
a7ad269
use pytest built-in tmp_path fixture
AndrewRidden-Harper Feb 23, 2026
dfb223c
docstring cleanup
AndrewRidden-Harper Feb 23, 2026
18d387a
docstring cleanup
AndrewRidden-Harper Feb 23, 2026
497de98
cleanup docstrings
AndrewRidden-Harper Feb 23, 2026
3a5cd63
summarise comments
AndrewRidden-Harper Feb 23, 2026
269beb7
simplify nesting
AndrewRidden-Harper Feb 23, 2026
d0b55f6
fix indent
AndrewRidden-Harper Feb 23, 2026
3a01597
fix indent
AndrewRidden-Harper Feb 23, 2026
4e69de1
using np.clip to avoid needing a separate mask
AndrewRidden-Harper Feb 23, 2026
34b3161
cleanup unnecessary typer echoes
AndrewRidden-Harper Feb 23, 2026
5fe769a
correcting arguments
AndrewRidden-Harper Feb 23, 2026
575733d
enable add_completion
AndrewRidden-Harper Feb 23, 2026
5dfb652
Merge remote-tracking branch 'origin/vs30_refactor' into vs30_refactor
AndrewRidden-Harper Feb 23, 2026
0502b64
replace np.sum with np.count_nonzero for clarity
AndrewRidden-Harper Feb 24, 2026
4bfe883
avoid explicit assignment of mask
AndrewRidden-Harper Feb 24, 2026
ed9f350
make code block for raster reproject
AndrewRidden-Harper Feb 24, 2026
7aa0bf0
added a block comment
AndrewRidden-Harper Feb 24, 2026
f5d5288
streamline coordinate transformation code
AndrewRidden-Harper Feb 24, 2026
e2f4cc6
del blank line in code block
AndrewRidden-Harper Feb 24, 2026
b5f252d
make code block for reading CSV file and validation
AndrewRidden-Harper Feb 24, 2026
9a2636d
use pd.testing.assert_frame_equal and del old compare_csvs function
AndrewRidden-Harper Feb 24, 2026
7481ee5
del unnecessary variable assignments and single use function
AndrewRidden-Harper Feb 24, 2026
2f2acb0
trim comment
AndrewRidden-Harper Feb 24, 2026
3663bba
added explanation comment for calculating effective_n
AndrewRidden-Harper Feb 24, 2026
cd002e1
trim docstring and comments of calculate_chunk_size()
AndrewRidden-Harper Feb 24, 2026
9ba864a
del unnecessary comments in ensure_shapefile_extracted()
AndrewRidden-Harper Feb 24, 2026
7afa264
use rasterio indexes for sampling instead of list compreshension
AndrewRidden-Harper Feb 24, 2026
c4766fe
use pytest approx
AndrewRidden-Harper Feb 24, 2026
4aa14ba
revert to list comprehension in src.sample to extract
AndrewRidden-Harper Feb 24, 2026
6f4d2dc
del CLI plot-posterior-values
AndrewRidden-Harper Feb 24, 2026
a846032
created pipeline.py and improved CLI
AndrewRidden-Harper Feb 25, 2026
6ed3ca0
Align GitHub workflows to other repos by using uv and PyPI
AndrewRidden-Harper Feb 25, 2026
17fd590
update to python >= 3.11 for qcore-utils compatibility
AndrewRidden-Harper Feb 25, 2026
a0fb7ea
GDAL setup in GitHub workflows
AndrewRidden-Harper Feb 25, 2026
19bca09
Moer GDAL setup in GitHub workflows
AndrewRidden-Harper Feb 25, 2026
1b97e96
GDAL version fix
AndrewRidden-Harper Feb 25, 2026
40f3e63
pin GDAL Python bindings to system libgdal version in CI workflows
AndrewRidden-Harper Feb 25, 2026
6fe735d
GitHub Actions deptry test fix
AndrewRidden-Harper Feb 25, 2026
dc1ecbb
del unnecessary matplotlib from dependencies
AndrewRidden-Harper Feb 25, 2026
efaf8c0
fix ty typecheck
AndrewRidden-Harper Feb 25, 2026
8a88461
fix more ty type check issues
AndrewRidden-Harper Feb 25, 2026
7c51dde
update tests to call funcs in pipeline.py instead of using CLI
AndrewRidden-Harper Feb 25, 2026
20c3e29
add numpydoc config to pyproject.toml
AndrewRidden-Harper Feb 25, 2026
c2c24d1
fix numpydoc linter issues and shorter module docstrings
AndrewRidden-Harper Feb 25, 2026
fe96998
del git-extension.yml as no git in pyproject.toml
AndrewRidden-Harper Feb 25, 2026
254b77d
unify chunk merging for any n_proc
AndrewRidden-Harper Feb 25, 2026
4c9c88b
Remove short CLI flags in favor of Typer auto-generated long options
AndrewRidden-Harper Feb 26, 2026
e01931d
Unify progress bar for points CLI into single parent-level display
AndrewRidden-Harper Feb 27, 2026
418ebbc
Rename map CLI command to grid to avoid Python builtin shadowing work…
AndrewRidden-Harper Feb 27, 2026
e1a7c6d
Improve progress bar descriptions with model type labels and smoother…
AndrewRidden-Harper Feb 27, 2026
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
24 changes: 24 additions & 0 deletions .github/workflows/deptry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Deptry Dependency Check

on: [pull_request]

jobs:
dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Setup the minimum required python distribution
- uses: actions/setup-python@v5
- name: Setup uv
uses: astral-sh/setup-uv@v5
- name: Install GDAL system libraries
run: sudo apt-get update && sudo apt-get install -y libgdal-dev
# GDAL's Python bindings must match the system libgdal version exactly.
# Pin the version in pyproject.toml to match the system libgdal.
- run: |
sed -i "s/\"GDAL\"/\"GDAL==$(gdal-config --version)\"/" pyproject.toml
uv sync
# Install deptry
- run: uv pip install deptry
# Run deptry to check that all dependencies are present.
- run: uv run deptry . -ddg test,types
36 changes: 36 additions & 0 deletions .github/workflows/numpydoc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Numpydoc Lint

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
numpydoc-lint:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: fd-find
version: 1.0

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'

- name: Install dependencies
run: |
pip install numpydoc
sudo apt-get install

- name: Run Numpydoc Lint
run: |
fdfind . vs30/ -E "__init__.py" --extension py | xargs numpydoc lint
52 changes: 50 additions & 2 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,61 @@ jobs:
- name: Install dependencies with mamba
shell: bash -el {0}
run: |
mamba install -c conda-forge gdal numpy pandas pyproj scikit-learn scipy matplotlib pytest geopandas
mamba install -c conda-forge gdal numpy pandas pyproj scikit-learn scipy matplotlib pytest pytest-cov geopandas

- name: Install project in dev mode
shell: bash -el {0}
run: pip install -e .

- name: Run tests
shell: bash -el {0}
run: pytest
run: pytest --cov=vs30 --cov-report=html tests

- name: Upload coverage data
uses: actions/upload-artifact@v4
with:
name: coverage-data
path: .coverage
include-hidden-files: true
if-no-files-found: ignore

coverage:
needs: test
runs-on: ubuntu-latest

steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install dependencies
run: |
python -m pip install --upgrade coverage[toml]

- name: Download coverage data
uses: actions/download-artifact@v4
with:
name: coverage-data

- name: Combine coverage and fail if it's under 85%
run: |
python -m coverage html --skip-covered --skip-empty

# Report and write to summary.
python -m coverage report | sed 's/^/ /' >> $GITHUB_STEP_SUMMARY

# Report again and fail if under 85%.
python -Im coverage report --fail-under=85

- name: Upload HTML report if check failed
uses: actions/upload-artifact@v4

with:
name: html-report
path: htmlcov

if: ${{ failure() }}
8 changes: 8 additions & 0 deletions .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: Ruff
on: [pull_request]
jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
36 changes: 36 additions & 0 deletions .github/workflows/types.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Type Check

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
typecheck:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true

- name: Install GDAL system libraries
run: sudo apt-get update && sudo apt-get install -y libgdal-dev

- name: Install project with types
# GDAL's Python bindings must match the system libgdal version exactly.
# Pin the version in pyproject.toml to match the system libgdal.
run: |
sed -i "s/\"GDAL\"/\"GDAL==$(gdal-config --version)\"/" pyproject.toml
uv sync --all-extras --dev

- name: Run type checking with ty
run: uv run ty check --exclude setup.py --exclude VsViewer/
Loading
Loading