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
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ repos:
- id: pycln
args: [--config=pyproject.toml]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.3
rev: v0.14.4
hooks:
- id: ruff-check
args:
Expand All @@ -31,7 +31,7 @@ repos:
# - --unsafe-fixes
- id: ruff-format
# - repo: https://github.com/pre-commit/mirrors-mypy # TODO: fix mypy errors
# rev: v1.11.0
# rev: v1.18.2
# hooks:
# - id: mypy
# additional_dependencies: [
Expand Down
5 changes: 4 additions & 1 deletion simpeg_drivers/plate_simulation/sweep/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
# '
# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

from __future__ import annotations

import shutil
import sys
from pathlib import Path
Expand All @@ -23,6 +25,7 @@
uuid_from_values,
)
from geoh5py.ui_json.utils import flatten
from typing_extensions import Self

from simpeg_drivers.driver import BaseDriver
from simpeg_drivers.plate_simulation.driver import PlateSimulationDriver
Expand Down Expand Up @@ -82,7 +85,7 @@ def validate_out_group(self, out_group: SimPEGGroup | None) -> SimPEGGroup:
return out_group

@classmethod
def start(cls, filepath: str | Path, mode="r", **_) -> BaseDriver:
def start(cls, filepath: str | Path, mode="r", **_) -> Self:
"""Start the parameter sweep from a ui.json file."""
logger.info("Loading input file . . .")
filepath = Path(filepath).resolve()
Expand Down
5 changes: 4 additions & 1 deletion tests/run_tests/driver_dc_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,10 @@ def test_dc_3d_run(

driver = DC3DInversionDriver.start(str(tmp_path / "Inv_run.ui.json"))
# Should not be auto-scaling
np.testing.assert_allclose(driver.data_misfit.multipliers, [1, 1, 1])
np.testing.assert_allclose(
driver.data_misfit.multipliers, # pylint: disable=no-member ## cannot infer start() return type)
[1, 1, 1],
)
output = get_inversion_output(
driver.params.geoh5.h5file, driver.params.out_group.uid
)
Expand Down