Skip to content
This repository has been archived by the owner on Mar 15, 2019. It is now read-only.

Commit

Permalink
Merge pull request #11 from andersy005/master
Browse files Browse the repository at this point in the history
Add conda packaging
  • Loading branch information
andersy005 authored Dec 27, 2018
2 parents a3b8d53 + 7dcb2a0 commit 9eefd7a
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 2 deletions.
25 changes: 23 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ workflows:
default:
jobs:
- "python-3.6"
- "deploy-conda":
requires:
- "python-3.6"
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/


jobs:

Expand Down Expand Up @@ -70,5 +79,17 @@ jobs:
path: docs/_build/html
destination: html




"deploy-conda":
docker:
- image: continuumio/miniconda:latest

steps:
# Get our data and merge with upstream
- checkout

- run:
name: Deploy package release to Anaconda.org
command: |
conda install conda-build anaconda-client --yes --quiet
./ci/upload-anaconda.sh
17 changes: 17 additions & 0 deletions ci/upload-anaconda.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

set -e
set -eo pipefail
if [ -z "$CONDA_UPLOAD_TOKEN" ]; then
echo "No upload key"
exit 1
fi

export UPLOADFILE=`conda build conda/ --output`
echo "UPLOADFILE = ${UPLOADFILE}"

echo "[Uploading intake-cmip]"
anaconda -t ${CONDA_UPLOAD_TOKEN} upload -u cisl-iowa --force ${UPLOADFILE}
echo "Successfully deployed to Anaconda.org."

exit 0
52 changes: 52 additions & 0 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{% set name = "intake-cmip" %}
{% set version = "0.0.1" %}

package:
name: {{ name }}
version: {{ version }}

source:
fn: {{ name }}-{{ version }}.tar.gz
url: https://github.com/NCAR/intake-cmip/archive/v{{ version }}.tar.gz


build:
script: python setup.py install --single-version-externally-managed --record=record.txt
noarch: python
number: 0

requirements:

build:
- python

run:
- python
- xarray
- intake-xarray
- dask

test:
source_files:
- tests
requires:
- pytest
imports:
- intake_cmip
commands:
- pytest --verbose

about:

home: https://github.com/NCAR/intake-cmip
license: Apache-2.0
license_file: LICENSE
summary: |
Intake-cmip provides a plugin for reading CMIP5, and CMIP6 data using intake.
dev_url: https://github.com/NCAR/intake-cmip
doc_url: https://intake-cmip.readthedocs.io/en/latest/

extra:
recipe-maintainers:
- andersy005
- kmpaul

0 comments on commit 9eefd7a

Please sign in to comment.