Skip to content

Commit d78660f

Browse files
Merge Pre release branch onto main (#84)
* new fault_system_solution_helper module * a simple rupture grouping algo; * drop_zero_rate differentiates between FSS and IS; * refactor subsection filter & tests * migrate to filter_rupture_ids.for_subsections(); * migrate to filter_rupture_ids.for_parent_fault_ids(); * fixed method names; added doc page for subsection_id_filter; * refactor filter tests; WIP on DeprecationWarnings; new filter_parent_fault_ids; detox * fixing many deprecation warnings; updated geopandas, pandas, numpy, pyvista libs; changes to read_csv_dtype configuration; detox * refactor filters int package; more test cover; implement new filters; migrate old functions and deprecate warn the originals; * unifying filter methods; improve docstrings & tests; * implement rate and mag filtering on rupture_id_filter; * migrate find rupture polygons into filter class; move drop_zero_rates into class init; * implement ChainableSetBase; migrate FilterRuptureIds to be chainable; * add set operation support for chaining (join_prior) and test coverage; * join arguments tidied up; strings and ENUMS are supported; * fix set operand method names; * fix set operations return type * implement set operands for supported set methods; improve docs * merge 3d geometry changes from @voj; add some testing; * new participation rate functions; detox * test 3d surfaces * migrate participation functions into classes proper; add FSS section_participation; * make subsection_id_filter chainable; * added participation methods to fault_system_solution * simplify FSS participation using rate_weighted_mean; refactor dataframe dtypes; participation performance testing; * standardise participation functions API and return column; * fix rate_column; add .all() methods to filter classes; * add TinyInversionSolution fixture; tune pytest fixture scoping for massive test speed up (~3 times faster); * doc and docstrings improvements; Better typing in filter package; * more on rupture_grouping * add module docstring to inversion_solution_file; * adding dataframe schema validations with panderas; * WIP, adding InversionSolutionFile::RuptureRateSchema; * Feature/52 refactor inversion solution (#53) * Chore/54 test coverage (#55) * Chore/59 doc fixes (#61) * make parent fault filter chainable (#66) * fix for #57 (return int type for polygons); * update pytz dep (#69) * Feature/49 named fault participation (#67) * Feature: named_fault_participation_rate #49 * Epic Feature: enhanced participation rate options #42 * refactor to remove *Protocol superclasses (#73) * refactor to remove *Protocol superclasses; migrate and improve docstrings; detox * Feature/71 scale rupture rates (#74) * fold in changes suggested by @chrisdicaprio on PR #73; * fix drop_zero_rates on FilterRuptureIds.for_magnitude(); * fix for_parent_fault_ids * fix test_ruptures_for_subsections * fix for_rupture_rate * fix for_polygon ; fix impacted tests; * Bump version: 0.13.0 → 1.0.0-alpha * add joint_type arg to relevant FilterRuptureId class methods (#80) * add joint_type arg to `for_parent_fault_names` * `for_parent_fault_ids`; add tolist() convenience method; * refactor for readability/efficiency; add full test coverage for new arg; * add `join_type` arg to `for_subsection_ids` (working but a little slow); detox; * rename arg for consistency * refactoring; new docstrings; named_faults support; detox; * remove commented line * changelog entry; * Bump version: 1.0.0-alpha → 1.0.0-beta * align version ids * Chore/82 make docs and api align (#83) * Bump version: 1.0.0-beta-0 → 1.0.0 --------- Co-authored-by: Chris DiCaprio <[email protected]>
1 parent a5666e0 commit d78660f

File tree

109 files changed

+8775
-3634
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+8775
-3634
lines changed

.bumpversion.cfg

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,23 @@
11
[bumpversion]
2-
current_version = 0.12.3
2+
current_version = 1.0.0
33
commit = True
44
tag = True
5+
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(-(?P<release>.*)-(?P<build>\d+))?
6+
serialize =
7+
{major}.{minor}.{patch}-{release}-{build}
8+
{major}.{minor}.{patch}
9+
10+
[bumpversion:part:release]
11+
first_value = regular
12+
optional_value = regular
13+
values =
14+
alpha
15+
beta
16+
rc
17+
test
18+
regular
19+
20+
[bumpversion:part:build]
521

622
[bumpversion:file:pyproject.toml]
723
search = version = "{current_version}"

.github/workflows/run-tests.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,16 @@ jobs:
2222

2323
steps:
2424
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
25-
- uses: actions/checkout@v3
26-
- uses: actions/setup-python@v4
25+
- uses: actions/checkout@v4
26+
- uses: actions/setup-python@v5
2727
with:
2828
python-version: ${{ matrix.python-versions }}
2929

3030
- name: Install and configure Poetry
3131
uses: GNS-Science/install-poetry@main
32+
# uses: snok/install-poetry@v1
3233
with:
34+
version: 1.8.4
3335
virtualenvs-create: true
3436
virtualenvs-in-project: true
3537
installer-parallel: true
@@ -39,7 +41,7 @@ jobs:
3941
#----------------------------------------------
4042
- name: Load cached venv
4143
id: cached-poetry-dependencies
42-
uses: actions/cache@v3
44+
uses: actions/cache@v4
4345
with:
4446
path: .venv
4547
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}-run-tests
@@ -49,8 +51,12 @@ jobs:
4951
#----------------------------------------------
5052
- name: Install dependencies
5153
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
52-
run: |
54+
run:
5355
poetry install --no-interaction --no-root --with dev --all-extras
56+
57+
- name: Install tox-gh-actions
58+
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
59+
run:
5460
poetry add tox-gh-actions
5561

5662
- name: test with tox (uses tox-gh-actions to select correct environment)
@@ -61,7 +67,7 @@ jobs:
6167
run: ls -l .
6268

6369
- name: Submit coverage report
64-
uses: codecov/codecov-action@v4
70+
uses: codecov/codecov-action@v5
6571
with:
6672
files: ./coverage.xml # optional
6773
flags: unittests # optional

CHANGELOG.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,59 @@
11
# Changelog
22

3+
## [1.0.0] 2025-02-27
4+
- version update for v1.0.0 release
5+
6+
## [1.0.0-beta-0] 2025-02-27
7+
## Changed
8+
- 'refactored the usage docs
9+
10+
## Added
11+
- `join_type` argument as needed in `FilterRutpureId` methods.
12+
13+
# Removed
14+
- methods are no longer exported from the top-level package.
15+
16+
## [1.0.0-alpha] 2025-02-20
17+
18+
## Changed
19+
- drop_zero_rate differentiates between FSS and IS;
20+
- faster testing (~3 times faster)
21+
- documentation improvements
22+
- fix many deprecation warnings
23+
- updated dependencies: geopandas, pandas, numpy, pyvista libs
24+
- read_csv dtype configuration improvements
25+
- many old functions are deprecated/migrated to new filter package
26+
- refactor dataframe dtypes
27+
- standardise participation functions API and return columns
28+
- refactor `solvis.inversion_solution` package to `solvis.solution` and collect modules into packages
29+
- new packages `solvis.solution.inversion_solution` and `solvis.solution.fault_system_solution`
30+
- improved test coverage
31+
- refactored to/from archive code to reinstate some skipped tests
32+
- doc/typing improvements
33+
- fixes to the dynamic docstrings helper class & setup
34+
- API simplifications
35+
- updated flake8 and applied many docstring fixes.
36+
- refactored participation methods into module/class.
37+
- use valid NSHM fault names in docstring examples.
38+
- `FilterParentFaultIds` class is now chainable, like the other filters.
39+
- fix for #77 (drop_zero_rates is ignored)
40+
41+
## Added
42+
- new filter package providing classes for filtering solutions
43+
- support for 3d geometry (thanks @voj)
44+
- simplify FSS participation using rate_weighted_mean
45+
- participation performance testing;
46+
- added participation methods to fault_system_solution
47+
- a simple rupture grouping algorithm (can this be a different type of filter??);
48+
- `pandera` library for dataframe model validations and better docs
49+
- ChainableSet now supports set.symmetric_difference
50+
- named_fault support in filtering and solution participation.
51+
- new scale_rupture_rates() method on InversionSolution
52+
53+
## Removed
54+
- deprecated `solvis.solvis` functions removed.
55+
- deprecated `solvis.inversion_solution.*` functions/methods removed.
56+
357
## [0.12.3] 2024-07-04
458
bump version to verify new pypi workflow
559

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
::: solvis.filter.chainable_set_base

docs/api/filter/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
::: solvis.filter
2+
<!-- options:
3+
show_root_heading: false -->
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
::: solvis.filter.parent_fault_id_filter
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
::: solvis.filter.rupture_id_filter
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
::: solvis.filter.subsection_id_filter

docs/api/inversion_solution/composite_solution.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/api/inversion_solution/fault_system_solution.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)