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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ repos:
args: ["--skip=src/otherCode,*.ipynb,*.pdf,*.svg", "-w", "docs", "src"]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.16.4
rev: v0.16.6
hooks:
- id: ruff-check
args: ["--color", "always"]
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ ignore = [
"E226", # missing whitespace around arthmetic operator
"TD002", # missing todo author
"TD003", # missing todo link
"float-equality-comparison",
]

extend-select = [
Expand Down
2 changes: 2 additions & 0 deletions tests/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ def models():
def test_theoretical_Sa():
with pytest.raises(ValueError):
theoretical_Sa(ts=-45.0, eba=20.1, r=10)

with pytest.raises(ValueError):
theoretical_Sa(ts=-45.0, eba=-20.1, r=0.0)


Expand Down
4 changes: 2 additions & 2 deletions tests/test_model_outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ def test_psmsmodel(rm, reference_model, f, theta, ts):

mod.calculate_ts_single(**m, validate_parameters=True)

m['boundary_type'] = echosms.boundary_type.none
with pytest.raises(ValueError):
m['boundary_type'] = echosms.boundary_type.none
mod.calculate_ts_single(**m, validate_parameters=False)


Expand Down Expand Up @@ -169,8 +169,8 @@ def test_kamodel(rm):
assert np.allclose(mod.calculate_ts(p), -44.4474, atol=0.0001), "Incorrect TS value"

# check the invalid boundary type code
p['boundary_type'] = echosms.boundary_type.none
with pytest.raises(ValueError):
p['boundary_type'] = echosms.boundary_type.none
mod.calculate_ts_single(**p, validate_parameters=False)


Expand Down
Loading