Skip to content

Commit

Permalink
Merge pull request #30 from TerrainBento/master
Browse files Browse the repository at this point in the history
merge for 2.0
  • Loading branch information
kbarnhart committed May 11, 2020
2 parents 693703d + ab6cf5a commit ba76d4f
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Expand Up @@ -46,9 +46,9 @@ before_install:
echo "backend: Agg" > $HOME/.matplotlib/matplotlibrc
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
curl https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh > $HOME/miniconda.sh
curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh > $HOME/miniconda.sh
else
curl https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh > $HOME/miniconda.sh
curl https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh > $HOME/miniconda.sh
fi
- bash $HOME/miniconda.sh -b -p $(pwd)/anaconda
- export PATH="$(pwd)/anaconda/bin:$PATH"
Expand All @@ -63,6 +63,6 @@ install:
script:
- pip install pytest pytest-cov coveralls
- pip install jupyter pandas plotnine holoviews tqdm rasterio
- pip install --pre terrainbento
- pip install --pre terrainbento
- pytest umami tests/ --doctest-modules --cov=umami --cov-report=xml:$(pwd)/coverage.xml -vvv
after_success: coveralls
4 changes: 2 additions & 2 deletions environment-dev.yml
Expand Up @@ -12,13 +12,13 @@ dependencies:
# for the package
- scipy
- numpy
- landlab>=2.0.0b4
- landlab>=2.0.1
# for the notebooks
- jupyter
- holoviews
- pandas
- tqdm
- plotnine>=0.6.0
- terrainbento>=2.0.0b1
- terrainbento>=2.0.0
- gdal
- rasterio
1 change: 1 addition & 0 deletions tests/conftest.py
@@ -1,5 +1,6 @@
import numpy as np
import pytest

from landlab import RasterModelGrid


Expand Down
2 changes: 1 addition & 1 deletion tests/test_code_discretized_misfit.py
Expand Up @@ -2,8 +2,8 @@

import numpy as np
import pytest
from landlab import RasterModelGrid

from landlab import RasterModelGrid
from umami.calculations import discretized_misfit
from umami.calculations.residual.discretized_misfit import _get_category_labels

Expand Down
2 changes: 1 addition & 1 deletion tests/test_code_joint_density_misfit.py
@@ -1,7 +1,7 @@
import numpy as np
import pytest
from landlab import RasterModelGrid

from landlab import RasterModelGrid
from umami.calculations import joint_density_misfit


Expand Down
2 changes: 1 addition & 1 deletion umami/calculations/__init__.py
Expand Up @@ -10,8 +10,8 @@
chi_intercept,
count_equal,
hypsometric_integral,
watershed_aggregation,
mask_aggregation,
watershed_aggregation,
)
from .residual import (
discretized_misfit,
Expand Down
2 changes: 1 addition & 1 deletion umami/calculations/metric/__init__.py
Expand Up @@ -2,8 +2,8 @@
from .chi_intercept_gradient import chi_gradient, chi_intercept
from .count_equal import count_equal
from .hypsometric_integral import hypsometric_integral
from .watershed_aggregation import watershed_aggregation
from .mask_aggregation import mask_aggregation
from .watershed_aggregation import watershed_aggregation

__all__ = [
"aggregate",
Expand Down
1 change: 1 addition & 0 deletions umami/calculations/metric/hypsometric_integral.py
@@ -1,4 +1,5 @@
import numpy as np

from landlab.utils import get_watershed_mask


Expand Down
1 change: 1 addition & 0 deletions umami/calculations/metric/watershed_aggregation.py
@@ -1,4 +1,5 @@
import numpy as np

from landlab.utils import get_watershed_mask

from .aggregate import _aggregate
Expand Down
3 changes: 2 additions & 1 deletion umami/calculations/residual/kstest.py
@@ -1,7 +1,8 @@
import numpy as np
from landlab.utils import get_watershed_mask
from scipy.stats import ks_2samp

from landlab.utils import get_watershed_mask


def kstest(model_grid, data_grid, field):
"""Calculate an Kolmogorov-Smirnov test for a Landlab grid field.
Expand Down
2 changes: 1 addition & 1 deletion umami/metric.py
Expand Up @@ -4,9 +4,9 @@

import numpy as np
import yaml
from landlab import RasterModelGrid, create_grid

import umami.calculations.metric as calcs
from landlab import RasterModelGrid, create_grid
from umami.utils.create_landlab_components import _create_landlab_components
from umami.utils.io import _read_input, _write_output
from umami.utils.validate import _validate_fields, _validate_func
Expand Down
2 changes: 1 addition & 1 deletion umami/residual.py
Expand Up @@ -4,11 +4,11 @@

import numpy as np
import yaml
from landlab import RasterModelGrid, create_grid
from numpy.testing import assert_array_equal

import umami.calculations.metric as metric_calcs
import umami.calculations.residual as residual_calcs
from landlab import RasterModelGrid, create_grid
from umami.metric import Metric
from umami.utils.create_landlab_components import _create_landlab_components
from umami.utils.io import _read_input, _write_output
Expand Down

0 comments on commit ba76d4f

Please sign in to comment.