Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Dzelge 855 simplify and update recipies #3

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open
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
40 changes: 23 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# version 2.0.0, b1

language: generic
language: shell

env:
global:
Expand All @@ -9,31 +9,37 @@ env:
os:
- linux
- osx
- windows

install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh;
bash miniconda.sh -b -p $HOME/miniconda;
export PATH="$HOME/miniconda/bin:$PATH";
elif [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
choco install -y openssl;
choco install -y miniconda3;
export PATH="/c/tools/miniconda3/Scripts:$PATH";
source activate base;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
bash miniconda.sh -b -p $HOME/miniconda;
export PATH="$HOME/miniconda/bin:$PATH";
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 config --set always_yes yes --set changeps1 no --set channel_priority strict
- conda update conda
- conda info -a
# conda-build=3.16.3 was broken and failed with error message
# "Couldn't extract raw recipe text for cate-cli output"
# with, conda-build=3.16.2 cate does not seem to be installed during the build
# - conda install conda-build=3.16.2 constructor anaconda-client
- conda install conda-verify conda-build=3.17.8 anaconda-client
- conda install conda-verify conda-build anaconda-client

script:
#- conda build --old-build-string -c conda-forge -c defaults recipes/cate
#- ./upload_to_anaconda_cloud.sh cate
#
- conda build --old-build-string -c conda-forge recipes/cate-cli
- ./upload_to_anaconda_cloud.sh cate-cli
#
#- conda build --old-build-string -c conda-forge -c defaults recipes/cate-util
#- ./upload_to_anaconda_cloud.sh cate-util
- conda build -c conda-forge recipe


deploy:
# Deploy to Anaconda.org
- provider: script
script: bash deploy_to_anaconda.sh production
on:
tags: true
skip_cleanup: true
9 changes: 9 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## Changes for version 2.0.0

- Removed recipes cate-cli and cate-util
- Updated conda packages in meta.yaml
- Simplified the build section in meta.yaml
- Changed meta.yaml to use tar gzipped release file
- Travis: Moved deployment into deploy section. Only deploys on linux
- Added windows to the travis OS matrix
- Removed some unnecessary packages from dependencies
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ which is used to build a stand-alone installer for Cate.
## Available Cate Conda packages

* `cate` - the default, complete Cate distribution for Python
* `cate-cli` - same as `cate` but creates start menu / desktop shortcuts for the Cate command-line interface (CLI)
during installation using `conda install`
* `cate-util` - just the `cate.util` Python package with optional dependencies

## Building Cate Conda packages

Expand All @@ -31,10 +28,10 @@ Clone this repo:

$ git clone https://github.com/CCI-Tools/cate-conda.git

Build a Conda package `cate-<recipe>` (see `recipes/<recipe>/meta.yaml`):
Build a Conda package `cate` (see `recipe/meta.yaml`):

$ cd cate-conda
$ conda build -c conda-forge -c defaults recipes/<recipe>
$ conda build -c conda-forge recipe

The `-c` (or `--channel`) option adds extra Anaconda *channels* to search for package
dependencies. We must add `defaults` to search for Anaconda default packagers first, then
Expand All @@ -54,4 +51,4 @@ To test the new Conda package `cate` in a test environment `cate-test`, type

Just run the package build step with `--user <channel>`:

$ conda build --user ccitools -c conda-forge -c defaults recipes/<recipe>
$ conda build --user ccitools -c conda-forge -c defaults recipe
36 changes: 5 additions & 31 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,38 +7,12 @@ environment:

install:
- call %PYTHON_LOC%\Scripts\activate.bat
- conda config --set always_yes yes --set changeps1 no
# conda-build=3.16.3 was broken and failed with error message
# "Couldn't extract raw recipe text for cate-cli output"
# with, conda-build=3.16.2 cate does not seem to be installed during the build
# - conda install -y conda-build=3.16.2 constructor anaconda-client
- conda install -y conda-build=3.17.8 anaconda-client
- conda config --set always_yes yes --set changeps1 no --set channel_priority strict
- conda install -y conda-verify conda-build anaconda-client

build_script:
# Test are disabled (--no-test): matplotlib fails, because no writable HOME directory
# AppVeyor has no HOME directory set.
- set MPLCONFIGDIR="."
#- conda build --old-build-string --no-test -c conda-forge -c defaults recipes\cate
- conda build --old-build-string --no-test -c conda-forge recipes\cate-cli
#- conda build --old-build-string --no-test -c conda-forge -c defaults recipes\cate-util
# conda build does not work on appveyor
- conda build --old-build-string --no-test -c conda-forge recipe


deploy_script:
# only publish artifacts on master branch when pushed (not from cron or PRs)
- ps: |
if ( $env:APPVEYOR_SCHEDULED_BUILD -eq "True" ) {
write-output "CRON build, won't deploy to anaconda"
} else {
$env:conda_upload = 'true'
}
- ps: |
if ([bool]$env:APPVEYOR_PULL_REQUEST_NUMBER) {
write-output "PULL REQUEST build, won't deploy to anaconda"
} else {
$env:conda_upload = 'true'
}
- ps: |
if ($env:APPVEYOR_REPO_BRANCH -eq 'master') {
$env:conda_upload = 'true'
}
- cmd: IF "%conda_upload%"=="true" anaconda -v -t %ANACONDA_TOKEN% upload %PYTHON_LOC%\conda-bld\win-64\cate*.tar.bz2 -u ccitools --force
- echo "Finished Artifact Deployment"
22 changes: 22 additions & 0 deletions deploy_to_anaconda.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash

set -e

echo "mode: $1"
echo

if [[ "${TRAVIS_OS_NAME}" = "linux" ]]
then
CONDA_PACKAGE=$(conda build -c conda-forge recipe --output);
echo "conda package ${CONDA_PACKAGE}. OS: ${TRAVIS_OS_NAME}";

if [[ "$1" = "production" ]]
then
echo anaconda -v -t ${ANACONDA_TOKEN} upload "${CONDA_PACKAGE}" -u ccitools --force;
else
echo "Deployment would looke like:"
echo anaconda -v -t ${ANACONDA_TOKEN} upload "${CONDA_PACKAGE}" -u ccitools --force;
fi
else
echo "Anaconda upload is only executed when running on linux"
fi
111 changes: 111 additions & 0 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# See https://conda.io/docs/building/meta-yaml.html
# for more information about this file.

{% set version = "2.0.0" %}

package:
name: cate
version: "{{ version }}"

build:
number: 1
noarch: python
script: "{{ PYTHON }} -m pip install . -vv"
entry_points:
# Put any entry points (scripts to be generated automatically) here.
- cate = cate.cli.main:main
- cate-webapi-start = cate.webapi.start:main
- cate-webapi-stop = cate.webapi.stop:main

source:
url: "https://github.com/CCI-Tools/cate/archive/v{{ version }}.tar.gz"
sha256: 046bb37c24a694678ecf8221c057817511f488073aea6f5394a604e86f5dd166

requirements:
build:
- python >=3.6
- pip
run:
- python >=3.6
# Runtime libs
- bokeh>=1.0.2
- boto3>=1.9.65
- botocore>=1.12.66
- cartopy>=0.17.0
- cython>=0.29.2
- dask>=1.0.0
- fiona>=1.8.4
- geopandas>=0.4.0
- geos>=3.7.1
- geotiff>=1.4.2
- h5netcdf>=0.6.2
- h5py>=2.8.0
- hdf4>=4.2.13
- hdf5>=1.10.4
- jdcal>=1.4
- matplotlib>=3.0.2
- numba>=0.41.0
- numpy>=1.15.4
- netcdf4>=1.4.2
- owslib>=0.17.0
- pandas>=0.23.4
- pillow>=5.3.0
- pip>=18.1
- psutil>=5.4.8
- pyepsg>=0.4.0
- pyproj>=1.9.5
- pyshp>=2.0.0
- python-dateutil>=2.7.5
- s3transfer>=0.1.13
- scipy>=1.1.0
- setuptools>=40.6.3
- shapely>=1.6.4
- tornado>=5.1.1
- xarray>=0.12
- yaml>=0.1.7

test:
# Python imports
imports:
- cate
- cate.core
- cate.core.ds
- cate.core.op
- cate.core.workflow
- cate.core.objectio
- cate.core.workspace
- cate.util
- cate.ds
- cate.ops
- cate.cli
- cate.webapi
- cate.util.cache
- cate.util.cli
- cate.util.extend
- cate.util.im
- cate.util.misc
- cate.util.monitor
- cate.util.namespace
- cate.util.opmetainf
- cate.util.process
- cate.util.safe
- cate.util.tmpfile
- cate.util.undefined
- cate.util.web

commands:
# You can put test commands to be run here. Use this to test that the
# entry points work.
- cate --help


about:
summary: "ESA CCI Toolbox (Cate) with CLI"
description: "The CCI Toolbox (Cate) is a software environment for ingesting, operating on and visualising all ESA
Climate Change Initiative data."
home: https://climatetoolbox.io
license: MIT
license_file: LICENSE
license_family: MIT
doc_url: https://cate.readthedocs.io
dev_url: https://github.com/CCI-Tools/cate
17 changes: 0 additions & 17 deletions recipes/cate-cli/bld.bat

This file was deleted.

17 changes: 0 additions & 17 deletions recipes/cate-cli/build.sh

This file was deleted.

19 changes: 0 additions & 19 deletions recipes/cate-cli/cate-cli

This file was deleted.

34 changes: 0 additions & 34 deletions recipes/cate-cli/cate-cli.app/Contents/Info.plist

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion recipes/cate-cli/cate-cli.app/Contents/PkgInfo

This file was deleted.

Binary file not shown.
Loading