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

Adding path_as_pattern for netcdf #22

Merged
merged 31 commits into from
Jan 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
20685f4
Adding path_as_pattern for netcdf
jsignell Nov 19, 2018
c863bf3
Added version checking and new tests
jsignell Jan 23, 2019
b35ebd8
Changed the order of channels to prioritize conda-forge over defaults
jsignell Jan 23, 2019
7a701b7
Run more tests on CI and get some more packages before running
jsignell Jan 23, 2019
b4be782
Adding missing -y flag to conda command
jsignell Jan 23, 2019
5f4d69b
Adding pytest to second set of tests
jsignell Jan 23, 2019
4040005
Using local intake-xarray
jsignell Jan 24, 2019
d4be74a
Updating to intake style ci
jsignell Jan 24, 2019
ecddae6
Adding more channel info
jsignell Jan 24, 2019
1ea4627
Cleaning up packaging
jsignell Jan 24, 2019
821d6eb
Fixing jinja template
jsignell Jan 24, 2019
76af5a4
Trying to get same python throughout
jsignell Jan 24, 2019
bc6d3b6
Pinning intake to 0.4.1 and adding zarr as dependency
jsignell Jan 24, 2019
7c45ae9
Also add .travis
jsignell Jan 24, 2019
8ca61fc
Using conda environment
jsignell Jan 24, 2019
a7203ab
Fixing syntax
jsignell Jan 24, 2019
a3bf450
verbosity was too high
jsignell Jan 24, 2019
dce5cdb
Just get build reqs first
jsignell Jan 24, 2019
a0a1d88
Restructuring
jsignell Jan 25, 2019
ebbc38a
Fixing errors
jsignell Jan 25, 2019
ca7669b
Fixing up spacing
jsignell Jan 25, 2019
b5ffc67
Adding dask and skipping more if no scipy
jsignell Jan 25, 2019
7632f0f
Skipping more if no backend
jsignell Jan 25, 2019
5f4bee4
Fixing tests and config - adding 2.7, let it fail
jsignell Jan 25, 2019
30f3479
Allow lower versions of xarray and test only defaults
jsignell Jan 25, 2019
ba80d46
Allow defaults to fail, move appveyor content up
jsignell Jan 25, 2019
cb0c32c
Fixing up allow_failures
jsignell Jan 25, 2019
c2bfab4
Fixing again
jsignell Jan 25, 2019
f3e0705
Switching to netcdf4
jsignell Jan 25, 2019
c38c7f0
Don't try to build on windows
jsignell Jan 25, 2019
71d3ed7
Add a nodefaults env - allow it to fail
jsignell Jan 25, 2019
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
71 changes: 38 additions & 33 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,43 @@
# Based on http://conda.pydata.org/docs/travis.html
language: generic
sudo: required

git:
depth: false

os:
- linux
env:
matrix:
- CONDA_PY=36
- linux

branches:
only:
- master

matrix:
fast_finish: true
include:
- env: CONDA_ENV=build
- env: CONDA_ENV=py36
- env: CONDA_ENV=py27
- env: CONDA_ENV=py36-defaults
- env: CONDA_ENV=py37-nodefaults
allow_failures:
- env: CONDA_ENV=py27
- env: CONDA_ENV=py36-defaults
- env: CONDA_ENV=py37-nodefaults
global:
secure: cfv2rjBvZZuebRbqRl1zF0INUmK/Uktes4jEbxWHyzUhGYqdGk2+mbZiT+brV85+43Q8xwmce8oiw2ZLA0U/T7L3rVbT6xtlo4blT277DY2kyKcyFIVfkTcUdlu/2i+3O7lqBjzZNXP0lHbNfEQCUAq1k9hz5/gHDsSdkImnwae3EWXma8n7aw3aQlb48McACdjVZdNvvr7lwfIVvcA7QdrgZSwQ3CxlPf5QOMTu2czpwlEXfnxiv0ysv8lrVNrmDObkjLpgVFyxh3yajL126q+hHtPsR4dtDYb615xUpSZd9BU6H27fJdc9nFAGBMxIIlqt9q6q7VJ8mTNPt+2BnPLZtKK+6xvvh7RrKtbwfBKSI0mFWCFSgLMEqka23y9S2jRkrT7Xr0gk32L6AmSItjKXRalVPZHJm4WTLYDYWEOVqpK7xvYVlFFBQ/XWraQUeD7xBz9BPInKm5gugUuPgRqdNA96XEhLX/gEhIE+rZf1AlbtfM7whpV3/pd6d6P+S+YGG3jbfjwJ884JeIovKrM5g4R9E8LAayWTGaSBNSGQX7F3QyZ+g8fIixaKx2JJtFPYE7tt0XbYzbI4Gd1NC/YWGMD+/EDaDUFEpySxGn0FUtbZaYX7czfPQiA44u/CuSpzdBec5LzHyrWmYWWxYxHu75qQQBfqhHAg44ZTR7w=
install:
- |
echo "Installing a fresh version of Miniconda."
MINICONDA_URL="https://repo.continuum.io/miniconda"
MINICONDA_FILE="Miniconda3-latest-$(case $TRAVIS_OS_NAME in (linux) echo Linux;; (osx) echo MacOSX;;esac)-x86_64.sh"
curl -L -O "${MINICONDA_URL}/${MINICONDA_FILE}"
bash $MINICONDA_FILE -b
- |
echo "Configuring conda."
source $HOME/miniconda3/bin/activate root
conda install -y conda-build anaconda-client flake8

before_install:
- wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"

install: bash ci/travis/install.sh

script:
- |
flake8 .
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
conda build -c intake -c defaults -c conda-forge ./conda
else
# Workaround for Travis-CI bug #2: https://github.com/travis-ci/travis-ci/issues/7773
conda build -c intake -c defaults -c conda-forge --no-test ./conda
fi
- |
if [ -n "$TRAVIS_TAG" ]; then
# If tagged git version, upload package to main channel
anaconda -t ${ANACONDA_TOKEN} upload -u intake --force `conda build --output ./conda`
fi
notifications:
email: false
on_success: change
on_failure: always
- which python
- python --version
- if [[ "$CONDA_ENV" == "build" ]]; then
bash ci/travis/build.sh;
else
bash ci/travis/test.sh;
fi
3 changes: 0 additions & 3 deletions README.rst

This file was deleted.

35 changes: 35 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Based on bokeh appveyor set up
build: false

platform:
- x64

environment:
matrix:
- MINICONDA: C:\Miniconda36-x64
CONDA_ENV: py36
- MINICONDA: C:\Miniconda36-x64
CONDA_ENV: py36-defaults

matrix:
allow_failures:
- CONDA_ENV: py36-defaults


skip_branch_with_pr: true
clone_depth: 5
skip_tags: true

init:
- cmd: set PATH=%MINICONDA%;%MINICONDA%\\Scripts;%MINICONDA%\\Library\\bin;%PATH%
- cmd: echo %path%

install:
- powershell .\\ci\\appveyor\\install.ps1
- "conda env create -n test_env --file ./ci/environment-%CONDA_ENV%.yml"
- "activate test_env"
- "python setup.py install"
- "conda list"

test_script:
- "pytest --verbose"
7 changes: 7 additions & 0 deletions ci/appveyor/build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
function build(){
conda install -c conda-forge conda-build conda-verify jinja2 intake>=0.4.1 xarray>=0.11.0 zarr dask netcdf4
conda list
conda build -c conda-forge ./conda
}

build
5 changes: 5 additions & 0 deletions ci/appveyor/install.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
function install() {
conda config --set auto_update_conda off --set always_yes yes --set changeps1 no --set show_channel_urls true
}

install
9 changes: 9 additions & 0 deletions ci/appveyor/test.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
function test() {
conda env create -n test_env --file ci/environment-py36.yml
source activate test_env
conda list
pip install --no-deps -e .
pytest --verbose
}

test
13 changes: 13 additions & 0 deletions ci/environment-py27.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: test_env
channels:
- conda-forge
dependencies:
- python=2.7
- intake>=0.4.1
- xarray>=0.11.2
- zarr
- pytest
- netcdf4
- rasterio
- scikit-image
- pynio
10 changes: 10 additions & 0 deletions ci/environment-py36-defaults.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: test_env
dependencies:
- python=3.6
- intake
- xarray
- zarr
- pytest
- netcdf4
- rasterio
- scikit-image
12 changes: 12 additions & 0 deletions ci/environment-py36.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: test_env
channels:
- conda-forge
dependencies:
- python=3.6
- intake>=0.4.1
- xarray>=0.11.2
- zarr
- pytest
- netcdf4
- rasterio
- scikit-image
13 changes: 13 additions & 0 deletions ci/environment-py37-nodefaults.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: test_env
channels:
- conda-forge
- nodefaults
dependencies:
- python=3.7
- intake>=0.4.1
- xarray=0.11.0 # pinnned this low as a test
- zarr
- pytest
- netcdf4
- rasterio
- scikit-image
15 changes: 15 additions & 0 deletions ci/travis/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
set -e # exit on error

echo "Installing dependencies."
conda install -c conda-forge conda-build conda-verify jinja2 intake>=0.4.1 xarray>=0.11.0 zarr dask netcdf4
conda list

echo "Building conda package."
conda build -c conda-forge ./conda

# If tagged, upload package to main channel, otherwise, run tests
if [ -n "$TRAVIS_TAG" ]; then
echo "Uploading conda package."
anaconda -t ${ANACONDA_TOKEN} upload -u intake --force `conda build --output ./conda`
fi
5 changes: 5 additions & 0 deletions ci/travis/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
set -e # exit on error

echo "Configuring conda"
conda config --set auto_update_conda off --set always_yes yes --set changeps1 no --set show_channel_urls true
13 changes: 13 additions & 0 deletions ci/travis/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
set -e # exit on error

echo "Creating test env"
conda env create -n test_env --file ci/environment-${CONDA_ENV}.yml
source activate test_env
conda list

echo "Installing intake_xarray."
pip install --no-deps -e .

echo "Running tests"
pytest --verbose
21 changes: 11 additions & 10 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
{% set data = load_setup_py_data() %}

package:
name: intake-xarray
version: {{ GIT_DESCRIBE_TAG }}
version: {{ data['version'] }}

source:
path: ..
git:
depth: false

build:
number: {{ GIT_DESCRIBE_NUMBER }}
number: {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }}
script: python setup.py install --single-version-externally-managed --record=record.txt
noarch: python

Expand All @@ -17,11 +19,11 @@ requirements:
- python
- jinja2
run:
- intake>=0.2
- python
- scipy
- xarray
- zarr

{% for dep in data['install_requires'] %}
- {{ dep.lower() }}
{% endfor %}

test:
source_files:
Expand All @@ -32,8 +34,7 @@ test:
- py.test --verbose

about:
home: https://github.com/ContinuumIO/intake-xarray
license: BSD
home: {{ data['url'] }}
license: {{ data['license'] }}
license_file: LICENSE
summary: |
xarray plugins for Intake
summary: {{ data['description'] }}
Loading