Skip to content
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

add joint_type arg to relevant FilterRuptureId class methods #80

Merged
merged 13 commits into from
Feb 25, 2025
24 changes: 13 additions & 11 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
[bumpversion]
current_version = 1.0.0-alpha
current_version = 1.0.0-beta-0
commit = True
tag = True
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(-(?P<release>.*))?
serialize =
{major}.{minor}.{patch}-{release}
{major}.{minor}.{patch}
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(-(?P<release>.*)-(?P<build>\d+))?
serialize =
{major}.{minor}.{patch}-{release}-{build}
{major}.{minor}.{patch}

[bumpversion:part:release]
first_value = regular
optional_value = regular
values =
alpha
beta
rc
test
regular
values =
alpha
beta
rc
test
regular

[bumpversion:part:build]

[bumpversion:file:pyproject.toml]
search = version = "{current_version}"
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## [1.0.0-beta-0] 2025-02-25
## Added
- `join_type` argument as needed in `FilterRutpureId` methods.

## [1.0.0-alpha] 2025-02-20

## Changed
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "solvis"
version = "1.0.0-alpha"
version = "1.0.0-beta-0"
description = "analysis of opensha modular solution files."
authors = ["Chris Chamberlain <[email protected]>"]
license = "AGPL3"
Expand Down
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ omit =
solvis/dochelper/*
solvis/get_secret.py
solvis/config.py
solvis/solution/named_fault.py

[coverage:report]
exclude_lines =
Expand Down
2 changes: 1 addition & 1 deletion solvis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
from .solution import CompositeSolution, FaultSystemSolution, InversionSolution
from .solvis import export_geojson, mfd_hist

__version__ = '1.0.0-alpha'
__version__ = '1.0.0-beta-0'
11 changes: 10 additions & 1 deletion solvis/filter/parent_fault_id_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
```
"""

from typing import TYPE_CHECKING, Iterable, Iterator, NamedTuple, Set, Union
from typing import TYPE_CHECKING, Iterable, Iterator, List, NamedTuple, Set, Union

import shapely.geometry

Expand Down Expand Up @@ -115,6 +115,15 @@ def all(self) -> ChainableSetBase:
result = set(self._solution.solution_file.fault_sections['ParentID'].tolist())
return self.new_chainable_set(result, self._solution)

def tolist(self) -> List[int]:
"""
Returns the filtered parent fault ids as a list of integers.

Returns:
A list of integers representing the filtered parent fault ids.
"""
return list(self)

def for_named_fault_names(
self, named_fault_names: Iterable[str], join_prior: Union[SetOperationEnum, str] = 'intersection'
) -> ChainableSetBase:
Expand Down
Loading