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

[WIP] Major fixes to datasets.py #20

Merged
merged 22 commits into from
Oct 26, 2017
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: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,7 @@ ENV/

# mypy
.mypy_cache/

# Dask-ml related
src
dask-ml
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,12 @@ install:
- conda create $CHANNELS --name $ENV_NAME python=$PYTHON numpy=$NUMPY
- source activate $ENV_NAME

before_script:
- conda install -y requests jinja2
- ./fetch_dask-ml.py # Fetch dask-ml recipe from conda-forge

script:
- conda build --python $PYTHON --numpy $NUMPY conda.recipe
- conda build -c conda-forge --python $PYTHON --numpy $NUMPY conda.recipe

notifications:
on_success: change
Expand Down
3 changes: 3 additions & 0 deletions conda.recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ requirements:
- dask
- scikit-learn
- six
- dask_ml
- attrs
- rasterio

about:
home: http://github.com/ContinuumIO/xarray_filters
Expand Down
6 changes: 6 additions & 0 deletions environment_py27.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: xarray_filters_py27
channels:
- defaults
- conda-forge # essential for rasterio on osx
dependencies:
- python=2.7
Expand All @@ -16,3 +17,8 @@ dependencies:
- attrs
- conda-forge::rasterio
- conda-forge::gdal=2.1.*
- cython # for dask-ml
- requests # for fetching dask-ml recipe
- jinja2 # for fetching dask-ml recipe
- pip:
- "--editable=git+https://github.com/dask/dask-ml.git@master#egg=dask-ml_master"
8 changes: 7 additions & 1 deletion environment_py35.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: xarray_filters_py35
channels:
- defaults
- conda-forge # essential for rasterio on osx
dependencies:
- python=3.5
- dask
- cython
- numba
- numpy
- pandas
Expand All @@ -15,4 +17,8 @@ dependencies:
- attrs
- conda-forge::rasterio
- conda-forge::gdal=2.1.*

- cython # for dask-ml
- requests # for fetching dask-ml recipe
- jinja2 # for fetching dask-ml recipe
- pip:
- "--editable=git+https://github.com/dask/dask-ml.git@master#egg=dask-ml_master"
7 changes: 6 additions & 1 deletion environment_py36.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: xarray_filters_py36
channels:
- defaults
- conda-forge # essential for rasterio on osx
dependencies:
- python=3.6
Expand All @@ -15,4 +16,8 @@ dependencies:
- attrs
- conda-forge::rasterio
- conda-forge::gdal=2.1.*

- cython # for dask-ml
- requests # for fetching dask-ml recipe
- jinja2 # for fetching dask-ml recipe
- pip:
- "--editable=git+https://github.com/dask/dask-ml.git@master#egg=dask-ml_master"
23 changes: 23 additions & 0 deletions fetch_dask-ml.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env python

from __future__ import absolute_import, division, print_function, unicode_literals

import os
import sys
import requests
import jinja2

recipe_dpath = './dask_ml'
meta_yml_fpath = os.path.join(recipe_dpath, 'meta.yaml')
if os.path.isfile(meta_yml_fpath):
print('Recipe exists: skipping download.')
sys.exit(0)

meta_yml_url = 'https://raw.githubusercontent.com/TomAugspurger/staged-recipes/dask-ml/recipes/dask-ml/meta.yaml'
resp = requests.get(meta_yml_url)
assert resp.status_code == 200, 'Error fetching meta.yaml file'
template = jinja2.Template(resp.text)
os.makedirs(recipe_dpath)
print('Writing '+meta_yml_fpath)
with open(meta_yml_fpath, 'w') as fp:
fp.write(template.render())
Loading