Skip to content

Commit

Permalink
Merge pull request #7 from espdev/fix-issue1
Browse files Browse the repository at this point in the history
Update dependencies to fix #1
  • Loading branch information
espdev committed Apr 14, 2021
2 parents 0c9367a + 7b6dc8d commit ce6022b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 20 deletions.
13 changes: 6 additions & 7 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Expand Up @@ -36,7 +36,7 @@ packages = [
python = "^3.6"
numpy = "^1.18.1"
scipy = "^1.4.1"
scikit-fmm = "^2019.1.30"
scikit-fmm = ">=2021.1.21,<2021.2"
pydantic = "^1.4"
importlib-metadata = "^1.6.0"

Expand Down
13 changes: 2 additions & 11 deletions skmpe/_parameters.py
Expand Up @@ -4,7 +4,7 @@
import enum
from typing import Type, Union

from pydantic import confloat, conint, validator
from pydantic import confloat, conint
from scipy.integrate import RK23, RK45, DOP853, Radau, BDF, LSODA

from ._base import mpe_module, ImmutableDataObject
Expand Down Expand Up @@ -109,7 +109,7 @@ class Parameters(ImmutableDataObject):
"""

travel_time_spacing: confloat(gt=0.0) = 1.0
travel_time_order: TravelTimeOrder = TravelTimeOrder.first
travel_time_order: TravelTimeOrder = TravelTimeOrder.second
travel_time_cache: bool = False

ode_solver_method: OdeSolverMethod = OdeSolverMethod.RK45
Expand All @@ -121,15 +121,6 @@ class Parameters(ImmutableDataObject):
dist_tol: confloat(ge=0.0) = 1e-3
max_small_dist_steps: conint(strict=True, gt=1) = 100

@validator('travel_time_order')
def _check_travel_time_order(cls, v): # noqa
if v == TravelTimeOrder.second: # pragma: no cover
raise ValueError(
'Currently the second order for computing travel time does not work properly.'
'\nSee the following issue for details: https://github.com/scikit-fmm/scikit-fmm/issues/28'
)
return v

def __str__(self): # pragma: no cover
return self.__repr_str__('\n')

Expand Down
2 changes: 1 addition & 1 deletion tests/test_mpe.py
Expand Up @@ -12,7 +12,7 @@

travel_time_order_param = pytest.mark.parametrize('travel_time_order', [
pytest.param(1),
pytest.param(2, marks=pytest.mark.skip('https://github.com/scikit-fmm/scikit-fmm/issues/28')),
pytest.param(2),
])


Expand Down

0 comments on commit ce6022b

Please sign in to comment.