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
13 changes: 9 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
default_language_version:
python: python3
repos:
- repo: https://github.com/psf/black
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.3.0
hooks:
- id: black
language_version: python3
- repo: https://github.com/pycqa/flake8
rev: 7.0.0
rev: 7.1.1
hooks:
- id: flake8
language_version: python3
additional_dependencies:
- flake8-bugbear==23.12.2
- flake8-builtins==2.2.0
- flake8-mutable==1.2.0
- flake8-rst-docstrings==0.3.0
- flake8-docstrings==1.7.0
- repo: https://github.com/MiraGeoscience/pre-commit-hooks
rev: v1.0.1
hooks:
- id: prepare-commit-msg
- id: check-commit-msg
4 changes: 2 additions & 2 deletions meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ requirements:
- discretize >=0.10.0
- empymod >=2.0.0
- geoana >=0.5.0
- geoh5py >=0.9.1,<0.11
- geoh5py >=0.10.0a0.dev0, <0.11.0
- matplotlib-base
- numpy >=1.20
- pandas
- pymatsolver >=0.2
- pymatsolver >=0.2.0, <0.3.0
- scikit-learn >=1.2
- scipy >=1.8.0
run_constrained:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dependencies = [
"discretize>=0.10.0",
"empymod>=2.0.0",
"geoana>=0.5.0",
"geoh5py>=0.9.1,<0.11",
"geoh5py>=0.10.0-alpha.1, <0.11",
Copy link
Copy Markdown
Author

@sebhmg sebhmg Oct 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stating that simpeg requires at geoh5py 0.10

I am not sure here: does this branch of simpeg work with geoh5 0.9, @domfournier ?
In any case, I suppose it is safer to be restrictive.

For now, geoh5py 0.10-alpha is not published to the public. Since simpeg is supposed to be installed in a Conda environment, that should be OK, as long as the environment has a geoh5py 0.10-alpha version (installed from the giithub repo, or from a published pre-release on our private conda or pip repo).
Does that sound right?
@domfournier , @SophieCurinier ?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might still work for 0.9.0, but probably safer to restrict as 0.10 breaks backward compatibility on the value_maps.

"matplotlib",
"numpy>=1.20",
"pandas",
Expand Down
2 changes: 1 addition & 1 deletion simpeg/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def __init__(
relative_error=None,
noise_floor=None,
standard_deviation=None,
**kwargs
**kwargs,
):
super().__init__(**kwargs)
self.survey = survey
Expand Down
2 changes: 1 addition & 1 deletion simpeg/electromagnetics/frequency_domain/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def __init__(
forward_only=False,
permittivity=None,
storeJ=False,
**kwargs
**kwargs,
):
super().__init__(mesh=mesh, survey=survey, **kwargs)
self.forward_only = forward_only
Expand Down
2 changes: 1 addition & 1 deletion simpeg/electromagnetics/natural_source/simulation_1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def __init__(
thicknesses=None,
thicknessesMap=None,
fix_Jmatrix=False,
**kwargs
**kwargs,
):
super().__init__(mesh=None, survey=survey, **kwargs)
self.fix_Jmatrix = fix_Jmatrix
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def __init__(
etaMap=None,
Ainv=None, # A DC's Ainv
_f=None, # A pre-computed DC field
**kwargs
**kwargs,
):
super().__init__(mesh=mesh, survey=survey, **kwargs)
self.sigma = sigma
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def __init__(
rho=rho,
sigmaMap=None,
rhoMap=None,
**kwargs
**kwargs,
)
self.q = q
self.qMap = qMap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(
storeJ=False,
actinds=None,
storeInnerProduct=True,
**kwargs
**kwargs,
):
super().__init__(mesh=mesh, survey=survey, **kwargs)
self.tau = tau
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def __init__(
source_list=None,
survey_geometry="surface",
survey_type="dipole-dipole",
**kwargs
**kwargs,
):
if source_list is None:
raise AttributeError("Survey cannot be instantiated without sources")
Expand Down
12 changes: 6 additions & 6 deletions simpeg/flow/richards/empirical.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def __init__(
alphaMap=None,
beta=3.96,
betaMap=None,
**kwargs
**kwargs,
):
super().__init__(mesh=mesh, **kwargs)
self.theta_r = theta_r
Expand Down Expand Up @@ -224,7 +224,7 @@ def __init__(
AMap=None,
gamma=4.74,
gammaMap=None,
**kwargs
**kwargs,
):
super().__init__(mesh=mesh, **kwargs)
self.Ks = Ks
Expand Down Expand Up @@ -292,7 +292,7 @@ def haverkamp(mesh, **kwargs):
Haverkamp_theta,
["Ks", "A", "gamma"],
["alpha", "beta", "theta_r", "theta_s"],
**kwargs
**kwargs,
)


Expand Down Expand Up @@ -344,7 +344,7 @@ def __init__(
nMap=None,
alpha=0.036,
alphaMap=None,
**kwargs
**kwargs,
):
super().__init__(mesh=mesh, **kwargs)
self.theta_r = theta_r
Expand Down Expand Up @@ -499,7 +499,7 @@ def __init__(
nMap=None,
alpha=0.036,
alphaMap=None,
**kwargs
**kwargs,
):
super().__init__(mesh=mesh, **kwargs)
self.Ks = Ks
Expand Down Expand Up @@ -807,7 +807,7 @@ def van_genuchten(mesh, **kwargs):
Vangenuchten_theta,
["alpha", "n", "Ks", "I"],
["alpha", "n", "theta_r", "theta_s"],
**kwargs
**kwargs,
)


Expand Down
2 changes: 1 addition & 1 deletion simpeg/flow/richards/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def __init__(
do_newton=False,
root_finder_max_iter=30,
root_finder_tol=1e-4,
**kwargs
**kwargs,
):
debug = kwargs.pop("debug", None)
if debug is not None:
Expand Down
2 changes: 1 addition & 1 deletion simpeg/inversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def __init__(
counter=None,
debug=False,
name="BaseInversion",
**kwargs
**kwargs,
):
if directiveList is None:
directiveList = []
Expand Down
4 changes: 2 additions & 2 deletions simpeg/regularization/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def __init__(self, mesh=None, alpha_x=1.0, alpha_y=1.0, alpha_z=1.0, **kwargs):
length_scale_x=alpha_x,
length_scale_y=alpha_y,
length_scale_z=alpha_z,
**kwargs
**kwargs,
)


Expand All @@ -217,7 +217,7 @@ def __init__(
alpha_x=alpha_x,
alpha_y=alpha_y,
alpha_z=alpha_z,
**kwargs
**kwargs,
)


Expand Down
4 changes: 2 additions & 2 deletions simpeg/utils/plot_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def hillshade(array, azimuth, angle_altitude):
Y,
hillshade(DATA, shade_azimuth, shade_angle_altitude),
shade_ncontour,
**shadeOpts
**shadeOpts,
)

if dataloc:
Expand All @@ -279,7 +279,7 @@ def plot_1d_layer_model(
plot_elevation=False,
show_layers=False,
vlim=None,
**kwargs
**kwargs,
):
"""
Plot the vertical profile for a 1D layered Earth model.
Expand Down
2 changes: 1 addition & 1 deletion tests/base/test_Props.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def __init__(
AMap=None,
gamma=4.74,
gammaMap=None,
**kwargs
**kwargs,
):
super().__init__(**kwargs)
self.Ks = Ks
Expand Down
2 changes: 1 addition & 1 deletion tests/pf/test_forward_PFproblem.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def test_ana_forward(self):
*self.sphere_center,
self.chiblk,
self.b0,
"secondary"
"secondary",
)

n_obs, n_comp = self.rxLoc.shape[0], len(self.survey.components)
Expand Down
Loading