This repository has been archived by the owner on Jul 2, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from CosmiQ/dev
Release 0.3.1
- Loading branch information
Showing
17 changed files
with
253 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
language: python | ||
sudo: false | ||
python: | ||
- "2.7" | ||
- "3.6" | ||
|
||
# command to install dependencies | ||
install: | ||
- sudo apt-get update | ||
# We do this conditionally because it saves us some downloading if the | ||
# version is the same. | ||
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then | ||
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh; | ||
else | ||
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; | ||
fi | ||
- bash miniconda.sh -b -p $HOME/miniconda | ||
- export PATH="$HOME/miniconda/bin:$PATH" | ||
- hash -r | ||
- conda config --set always_yes yes --set changeps1 no | ||
- conda update -q conda | ||
# Useful for debugging any issues with conda | ||
- conda info -a | ||
# switch python version spec in environment.yml to match TRAVIS_PYTHON_VERSION | ||
# annoying workaround to `conda env create python=$TRAVIS_PYTHON_VERSION` not working | ||
- sed -i -E 's/(python=)(.*)/\1'$TRAVIS_PYTHON_VERSION'/' ./environment.yml | ||
- conda env create -n cw-eval --file=environment.yml | ||
- source activate cw-eval | ||
- python --version | ||
- pip install -q -e . | ||
- pip install codecov pytest pytest-cov | ||
# command to run tests | ||
script: | ||
- pytest --cov=./ | ||
|
||
after_success: | ||
- codecov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
include *.txt | ||
include *.md | ||
include cw_eval/data/*.geojson |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
|
||
"""cw_eval""" | ||
|
||
__version__ = '0.3' | ||
__version__ = '0.3.1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import os | ||
import geopandas as gpd | ||
|
||
# define the current directory as `data_dir` | ||
data_dir = os.path.abspath(os.path.dirname(__file__)) | ||
|
||
|
||
def load_geojson(gj_fname): | ||
"""Load a geojson into a gdf using GeoPandas.""" | ||
return gpd.read_file(os.path.join(data_dir, gj_fname)) | ||
|
||
|
||
def gt_gdf(): | ||
"""Load in a ground truth GDF example.""" | ||
return load_geojson('gt.geojson') | ||
|
||
|
||
def pred_gdf(): | ||
"""Load in an example prediction GDF.""" | ||
return load_geojson('pred.geojson') |
Empty file.
Oops, something went wrong.