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

Update submodules/template digest to 37c37e6 - abandoned #61

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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 submodules/template
10 changes: 5 additions & 5 deletions tests/boilercore_tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ def _filter_certain_warnings():
filter_boiler_warnings()


@pytest.fixture()
@pytest.fixture
def project_session_path(tmp_path_factory) -> Path:
"""Project session path."""
return get_session_path(tmp_path_factory, boilercore)


@pytest.fixture()
@pytest.fixture
def params(project_session_path):
"""Parameters."""
return Params(source=project_session_path / "params.yaml")
Expand All @@ -47,7 +47,7 @@ def cache_dir(project_session_path) -> Path:
return cache_directory


@pytest.fixture()
@pytest.fixture
def cached_function_and_cache_file(
request, project_session_path
) -> Iterator[tuple[Callable[..., Any], Path]]:
Expand Down Expand Up @@ -76,11 +76,11 @@ def fun(
(cache_dir / cache_filename).unlink(missing_ok=True)


@pytest.fixture()
@pytest.fixture
def cached_function(cached_function_and_cache_file): # noqa: D103
return cached_function_and_cache_file[0]


@pytest.fixture()
@pytest.fixture
def cache_file(cached_function_and_cache_file): # noqa: D103
return cached_function_and_cache_file[1]
6 changes: 3 additions & 3 deletions tests/boilercore_tests/modelfun/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@
MODELFUN = Path("src/boilercore/stages/modelfun.ipynb").resolve()


@pytest.fixture()
@pytest.fixture
def ns(request) -> SimpleNamespace:
"""Namespace for the model function notebook."""
return get_nb_ns(MODELFUN.read_text(encoding="utf-8"))


@pytest.fixture()
@pytest.fixture
def model(params):
"""Deserialized model."""
return FIT.get_models(params.paths.models)[1]


@pytest.fixture()
@pytest.fixture
def plt(plt):
"""Plot."""
sns.set_theme(
Expand Down
10 changes: 5 additions & 5 deletions tests/boilercore_tests/modelfun/test_modelfun.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def test_syms(group_name: str):
assert all(var == sym.name for var, sym in symvars.items())


@pytest.mark.slow()
@pytest.mark.slow
def test_forward_model(model):
"""Test that the model evaluates to the expected output for known input."""
# fmt: off
Expand All @@ -54,7 +54,7 @@ def test_forward_model(model):


# TODO: Add `nan` failed fit check
@pytest.mark.slow()
@pytest.mark.slow
@pytest.mark.usefixtures("plt")
@pytest.mark.parametrize(
("run", "y", "expected"),
Expand Down Expand Up @@ -95,7 +95,7 @@ def test_model_fit(params, model, run, y, expected):
assert result == approx(expected)


@pytest.mark.slow()
@pytest.mark.slow
def test_ode(ns):
"""Verify the solution to the ODE by substitution."""
# Don't subs/simplify the lhs then try equating to zero. Doesn't work. "Truth value of
Expand All @@ -104,14 +104,14 @@ def test_ode(ns):
assert ode.subs(T(x), T_int_expr).simplify()


@pytest.mark.slow()
@pytest.mark.slow
def test_temperature_continuous(ns):
"""Test that temperature is continuous at the domain transition."""
T_wa_expr_w, T_wa_expr_a = ns.T_wa_expr_w, ns.T_wa_expr_a # noqa: N806
assert Eq(T_wa_expr_w, T_wa_expr_a).simplify()


@pytest.mark.slow()
@pytest.mark.slow
def test_temperature_gradient_continuous(ns):
"""Test that the temperature gradient is continuous at the domain transition."""
q_wa_expr_w, q_wa_expr_a = ns.q_wa_expr_w, ns.q_wa_expr_a
Expand Down
Loading