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

Maintenance #354

Merged
merged 1 commit into from
Jan 10, 2025
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 .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ jobs:
- python-version: "3.11"
name: full
os: ubuntu
conda: "scipy numba 'empymod>=2.3.2' xarray tqdm h5py discretize matplotlib"
conda: "scipy numba 'empymod>=2.3.2' xarray tqdm h5py 'discretize>=0.11' matplotlib"
- python-version: "3.12"
name: plain
os: ubuntu
conda: "scipy numba 'empymod>=2.3.2'"
- python-version: "3.12"
name: full
os: ubuntu
conda: "scipy numba 'empymod>=2.3.2' xarray tqdm h5py discretize matplotlib"
conda: "scipy numba 'empymod>=2.3.2' xarray tqdm h5py 'discretize>=0.11' matplotlib"

env:
# Used for coveralls flag
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ docs = [
]
tests = [
"flake8",
"discretize>=0.11",
"pytest",
"coveralls",
"pytest_cov",
Expand Down
1 change: 1 addition & 0 deletions tests/test_electrodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,7 @@ def adj(v):
shape_u=mesh.n_edges, shape_v=1,
complex_u=rng.choice([True, False]), # Random float or complex.
complex_v=rng.choice([True, False]), # Random float or complex.
random_seed=rng,
)


Expand Down
7 changes: 6 additions & 1 deletion tests/test_simulations.py
Original file line number Diff line number Diff line change
Expand Up @@ -887,6 +887,7 @@ def test_adjoint(self, tmpdir):
sim.jtvec,
self.mesh.shape_cells,
self.survey.shape,
random_seed=rng,
)

sim = simulations.Simulation(
Expand All @@ -900,6 +901,7 @@ def test_adjoint(self, tmpdir):
sim.jtvec,
self.mesh.shape_cells,
self.survey.shape,
random_seed=rng,
)

@pytest.mark.skipif(discretize is None, reason="discretize not installed.")
Expand All @@ -920,6 +922,7 @@ def test_adjoint_hti(self):
sim.jtvec,
(2, *self.mesh.shape_cells),
self.survey.shape,
random_seed=rng,
)

@pytest.mark.skipif(discretize is None, reason="discretize not installed.")
Expand All @@ -940,6 +943,7 @@ def test_adjoint_vti(self):
sim.jtvec,
(2, *self.mesh.shape_cells),
self.survey.shape,
random_seed=rng,
)

@pytest.mark.skipif(discretize is None, reason="discretize not installed.")
Expand All @@ -961,6 +965,7 @@ def test_adjoint_triaxial(self):
sim.jtvec,
(3, *self.mesh.shape_cells),
self.survey.shape,
random_seed=rng,
)

@pytest.mark.skipif(discretize is None, reason="discretize not installed.")
Expand All @@ -986,7 +991,7 @@ def func1(x):
return sim.data.synthetic.data, func2

assert discretize.tests.check_derivative(
func1, m0, plotIt=False, num=3,
func1, m0, plotIt=False, num=3, random_seed=rng,
)

@pytest.mark.skipif(discretize is None, reason="discretize not installed.")
Expand Down
Loading