-
Notifications
You must be signed in to change notification settings - Fork 2
Vs30 refactor #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
AndrewRidden-Harper
wants to merge
131
commits into
master
Choose a base branch
from
vs30_refactor
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Vs30 refactor #42
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 4ec2c75
use rasterio coordinate transforms
AndrewRidden-Harper b090427
immediately exclude invalid map values
AndrewRidden-Harper 3b02d6f
basic prototype
AndrewRidden-Harper 00344e6
bug fixes
AndrewRidden-Harper c9f9e64
in progress
AndrewRidden-Harper f345744
add typer
AndrewRidden-Harper 4788062
working pieces but not all brought together
AndrewRidden-Harper dd3a5d9
improved id raster creation
AndrewRidden-Harper a68f170
improvements for making initial vs30 rasters
AndrewRidden-Harper 4704724
improved structure
AndrewRidden-Harper 70bd683
small fixes
AndrewRidden-Harper 5176b5b
basic cluster_update functionality
AndrewRidden-Harper edb2a4a
improved handling of clustered data
AndrewRidden-Harper 97ca0a2
initial vs30 raster compatible with new column names
AndrewRidden-Harper f110d5e
create the hybrid geology, coast dist, slope raster
AndrewRidden-Harper f63c1c2
renamed modules
AndrewRidden-Harper 98e6afd
del old vs30 code
AndrewRidden-Harper 482b663
del more old vs30 code
AndrewRidden-Harper 0f48dc4
reorganised
AndrewRidden-Harper 21a98c1
renamed to spatial for clarity
AndrewRidden-Harper 3de4a50
cli command for spatial update (mvn)
AndrewRidden-Harper 0d45450
pipeline v1 (untested)
AndrewRidden-Harper a1cb7fa
resolved some small differences between old and new
AndrewRidden-Harper d6009bb
updates for consistency with old code
AndrewRidden-Harper 598af30
more descriptive filenames
AndrewRidden-Harper f490ce0
improved output filename clarity
AndrewRidden-Harper 64ab83b
more descriptive file and variable names
AndrewRidden-Harper 55d3ec7
add flag in config for doing the Bayesian update
AndrewRidden-Harper d810376
only take inputs from config.yaml for simplicity
AndrewRidden-Harper aee54b1
experimental debugging
AndrewRidden-Harper 3ec24f6
adopted legacy GDAL coordinate transformations
AndrewRidden-Harper e4fdb51
del unnecessary float64 declarations
AndrewRidden-Harper e14a427
more descriptive variable names
AndrewRidden-Harper fd99974
tidied up cpt observation clustering code
AndrewRidden-Harper e464557
tidying up comments docstrings etc..
AndrewRidden-Harper 55b4ee2
centralize hardcoded values in config.yaml
AndrewRidden-Harper a715efc
address code review findings
AndrewRidden-Harper aae637e
adding foster 2019 nz vs30 map pdf
AndrewRidden-Harper 9675224
compute-at-locations command
AndrewRidden-Harper be966d6
add multiprocessing
AndrewRidden-Harper bb70dc2
consolidate no data values
AndrewRidden-Harper 8a6d59a
multi proc working
AndrewRidden-Harper eea382a
pydandic, pass config filename, threadpoolctl
AndrewRidden-Harper 627b3c5
initial commit of tests and benchmark data
AndrewRidden-Harper 9e7b2a6
improved testing coverage
AndrewRidden-Harper b91367f
compute_at_locations separated into helper functions
AndrewRidden-Harper 3149520
common combine code and more helper functions
AndrewRidden-Harper 6478768
Uses cli.from_docstring(app)
AndrewRidden-Harper a2e2588
tidying up config file
AndrewRidden-Harper e493b80
config.yaml contains all input filenames
AndrewRidden-Harper 9b96321
claude code-compactor tool
AndrewRidden-Harper ab08e89
reorganized config and code-simplification
AndrewRidden-Harper 1e4dcf9
Add GitHub workflows for code quality checks
AndrewRidden-Harper 0f6d1ff
claude code-simplifier pass 2
AndrewRidden-Harper a9e35cd
deptry and ruff fix
AndrewRidden-Harper 09659a0
deptry fix
AndrewRidden-Harper 390e33e
change resource path code to pass GitHub pytests
AndrewRidden-Harper e1c534d
PR comment, added coordinate details
AndrewRidden-Harper 9e46668
fix testing issues with typer ansi and numpy version
AndrewRidden-Harper d6c0b4e
required coverage to 90% from 95%
AndrewRidden-Harper 5f26fa9
claude code-simplifier tool
AndrewRidden-Harper f94778e
moved most params to constants.py and tidied imports
AndrewRidden-Harper 1ce87bd
del unnecessary variables and funcs
AndrewRidden-Harper 94fa6ad
imports moved to module level
AndrewRidden-Harper 281a6ce
params from config only at initialization, then passed as function args
AndrewRidden-Harper 6d89c14
major tidy up
AndrewRidden-Harper 40a172c
del wrapper functions
AndrewRidden-Harper c92c0e7
del large section headers
AndrewRidden-Harper 2ea2e7b
math replaced with np
AndrewRidden-Harper 68848f0
del unnecessary variable assignments
AndrewRidden-Harper 9597219
moved more variables into constants.py
AndrewRidden-Harper ed1679b
del inaccurate comment
AndrewRidden-Harper e2d2cec
correct comment
AndrewRidden-Harper 3a40e6d
del non-critical tests
AndrewRidden-Harper 5ce6c5f
more comprehensive docstring and clearer parameter names
AndrewRidden-Harper 64daa65
improved variable names
AndrewRidden-Harper 1320b36
del wrapper function posterior_from_bayesian_update
AndrewRidden-Harper e14c54d
refactored code to get vs30 for ids
AndrewRidden-Harper 971d31d
claude code-simplifier tool
AndrewRidden-Harper e9ab5f8
trimmed single_threaded_blas docstring
AndrewRidden-Harper a7ad269
use pytest built-in tmp_path fixture
AndrewRidden-Harper dfb223c
docstring cleanup
AndrewRidden-Harper 18d387a
docstring cleanup
AndrewRidden-Harper 497de98
cleanup docstrings
AndrewRidden-Harper 3a5cd63
summarise comments
AndrewRidden-Harper 269beb7
simplify nesting
AndrewRidden-Harper d0b55f6
fix indent
AndrewRidden-Harper 3a01597
fix indent
AndrewRidden-Harper 4e69de1
using np.clip to avoid needing a separate mask
AndrewRidden-Harper 34b3161
cleanup unnecessary typer echoes
AndrewRidden-Harper 5fe769a
correcting arguments
AndrewRidden-Harper 575733d
enable add_completion
AndrewRidden-Harper 5dfb652
Merge remote-tracking branch 'origin/vs30_refactor' into vs30_refactor
AndrewRidden-Harper 0502b64
replace np.sum with np.count_nonzero for clarity
AndrewRidden-Harper 4bfe883
avoid explicit assignment of mask
AndrewRidden-Harper ed9f350
make code block for raster reproject
AndrewRidden-Harper 7aa0bf0
added a block comment
AndrewRidden-Harper f5d5288
streamline coordinate transformation code
AndrewRidden-Harper e2f4cc6
del blank line in code block
AndrewRidden-Harper b5f252d
make code block for reading CSV file and validation
AndrewRidden-Harper 9a2636d
use pd.testing.assert_frame_equal and del old compare_csvs function
AndrewRidden-Harper 7481ee5
del unnecessary variable assignments and single use function
AndrewRidden-Harper 2f2acb0
trim comment
AndrewRidden-Harper 3663bba
added explanation comment for calculating effective_n
AndrewRidden-Harper cd002e1
trim docstring and comments of calculate_chunk_size()
AndrewRidden-Harper 9ba864a
del unnecessary comments in ensure_shapefile_extracted()
AndrewRidden-Harper 7afa264
use rasterio indexes for sampling instead of list compreshension
AndrewRidden-Harper c4766fe
use pytest approx
AndrewRidden-Harper 4aa14ba
revert to list comprehension in src.sample to extract
AndrewRidden-Harper 6f4d2dc
del CLI plot-posterior-values
AndrewRidden-Harper a846032
created pipeline.py and improved CLI
AndrewRidden-Harper 6ed3ca0
Align GitHub workflows to other repos by using uv and PyPI
AndrewRidden-Harper 17fd590
update to python >= 3.11 for qcore-utils compatibility
AndrewRidden-Harper a0fb7ea
GDAL setup in GitHub workflows
AndrewRidden-Harper 19bca09
Moer GDAL setup in GitHub workflows
AndrewRidden-Harper 1b97e96
GDAL version fix
AndrewRidden-Harper 40f3e63
pin GDAL Python bindings to system libgdal version in CI workflows
AndrewRidden-Harper 6fe735d
GitHub Actions deptry test fix
AndrewRidden-Harper dc1ecbb
del unnecessary matplotlib from dependencies
AndrewRidden-Harper efaf8c0
fix ty typecheck
AndrewRidden-Harper 8a88461
fix more ty type check issues
AndrewRidden-Harper 7c51dde
update tests to call funcs in pipeline.py instead of using CLI
AndrewRidden-Harper 20c3e29
add numpydoc config to pyproject.toml
AndrewRidden-Harper c2c24d1
fix numpydoc linter issues and shorter module docstrings
AndrewRidden-Harper fe96998
del git-extension.yml as no git in pyproject.toml
AndrewRidden-Harper 254b77d
unify chunk merging for any n_proc
AndrewRidden-Harper 4c9c88b
Remove short CLI flags in favor of Typer auto-generated long options
AndrewRidden-Harper e01931d
Unify progress bar for points CLI into single parent-level display
AndrewRidden-Harper 418ebbc
Rename map CLI command to grid to avoid Python builtin shadowing work…
AndrewRidden-Harper e1a7c6d
Improve progress bar descriptions with model type labels and smoother…
AndrewRidden-Harper File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| 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 |
This file contains hidden or 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
| 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 |
This file contains hidden or 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
This file contains hidden or 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
| 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 |
This file contains hidden or 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
| 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/ |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.