Coder Social home page Coder Social logo

cate's Introduction

Cate: ESA CCI Toolbox

Build Status Build status codecov.io Documentation Status

cate

ESA CCI Toolbox (Cate) Python package, API and CLI.

Contents

  • setup.py - main build script to be run with Python 3.5
  • cate/ - main package and production code
  • test/ - test package and test code
  • doc/ - documentation in Sphinx/RST format

Installation from Sources

We recommend installing Cate into an isolated Python 3 environment, because this approach avoids clashes with existing versions of Cate's 3rd-party Python package requirements. For example, using (Miniconda or Anaconda) which will usually also avoid platform-specific issues caused by module native binaries.

The first step is to clone latest Cate code and step into the check out directory:

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

Using Conda

Conda is the package manager used by the Miniconda or Anaconda Python distributions.

Creating a new Python environment for Cate will require around 2.2 GB disk space on Linux/Darwin and and 1.2 GB on Windows. To create a new Conda environment cate-env in your Anaconda/Miniconda installation directory, type:

$ conda env create

If you want the environment to be installed in another location, e.g. due to disk space limitations, type:

$ conda env create --prefix some/other/location/for/cate

Next step is to activate the new environment. On Linux/Darwin type:

$ source activate cate-env

In case you used another location use it instead of the name cate. Windows users can omit the source command and just type

> activate cate-env

You can now safely install Cate sources into the new cate-env environment.

(cate) $ python setup.py install

Using Standard Python

If you run it with the standard CPython installation, make sure you use a 64-bit version. Cate relies on new Python language features and therefore requires Python 3.5+.

Cate can be run from sources directly, once the following module requirements are resolved:

  • cartopy
  • dask
  • jdcal
  • matplotlib
  • netcdf4
  • numba
  • numpy
  • pillow
  • pyqt
  • scipy
  • tornado
  • xarray

The most up-to-date list of module requirements is found in the project's environment.yml file.

To install Cate into an existing Python 3.5+ environment just for the current user, use

$ python3 setup.py install --user

To install Cate for development and for the current user, use

$ python3 setup.py develop --user

There is a known issue on Windows when installing into an existing Python environment. Installation may fail due to an unresolved dependency to the h5py package, which expects pre-installed HDF-5 C-libraries to be present on your computer. You may get around this by pre-installing the Cate dependencies (which you'll find in setup.py) on your own, for example by using Christoph Gohlke's Unofficial Windows Binaries for Python Extension Packages.

Getting started

To test the installation, first run the Cate command-line interface. Type

$ cate -h

IPython notebooks for various Cate use cases are on the way, they will appear in the project's notebooks folder.

To use them interactively, you'll need to install Jupyter and run its Notebook app:

$ conda install jupyter
$ jupyter notebook

Open the notebooks folder and select a use case.

Conda Deployment

There is a dedicated repository cate-conda which provides scripts and configuration files to build Cate's Conda packages and a stand-alone installer.

Development

Contributors

Contributors are asked to read and adhere to our Developer Guide.

Unit-testing

For unit testing we use pytest and its coverage plugin pytest-cov.

To run the unit-tests with coverage, type

$ export NUMBA_DISABLE_JIT=1
$ py.test --cov=cate test

We need to set environment variable NUMBA_DISABLE_JIT to disable JIT compilation by numba, so that coverage reaches the actual Python code. We use Numba's JIT compilation to speed up numeric Python number crunching code.

Generating the Documentation

We use the wonderful Sphinx tool to generate Cate's documentation on ReadTheDocs. If there is a need to build the docs locally, some additional software packages are required:

$ conda install sphinx sphinx_rtd_theme mock
$ conda install -c conda-forge sphinx-argparse
$ pip install sphinx_autodoc_annotation

To regenerate the HTML docs, type

$ cd doc
$ make html

License

The CCI Toolbox is distributed under terms and conditions of the MIT license.

cate's People

Contributors

forman avatar herzogstephan avatar janisgailis avatar kbernat avatar mzuehlke avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.