Skip to content

Commit

Permalink
Merge pull request #2 from corinnebosley/remove_gitter
Browse files Browse the repository at this point in the history
removed gitter from contact list
  • Loading branch information
tv3141 authored Oct 15, 2018
2 parents 3c4086b + 3493066 commit 006bf90
Show file tree
Hide file tree
Showing 70 changed files with 4,202 additions and 495 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
*.py[co]

# Environment file which should be autogenerated
*conda_requirements.txt*

# Packages
*.egg?
*.egg-info
Expand Down
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ install:
export IRIS_TEST_DATA_REF="2f3a6bcf25f81bd152b3d66223394074c9069a96";
export IRIS_TEST_DATA_SUFFIX=$(echo "${IRIS_TEST_DATA_REF}" | sed "s/^v//");
# Cut short doctest phase under Python 2 : now only supports Python 3
# SEE : https://github.com/SciTools/iris/pull/3134
# ------------
- >
if [[ $TEST_TARGET == 'doctest' && ${TRAVIS_PYTHON_VERSION} != 3* ]]; then
echo "DOCTEST phase only valid in Python 3 : ABORTING during 'install'."
exit 0
fi
# Install miniconda
# -----------------
- >
Expand Down
24 changes: 20 additions & 4 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ Installing from source
The latest Iris source release is available from
https://github.com/SciTools/iris.

Iris makes use of a range of other libraries and python modules. These
dependencies must be in place before you can successfully install
Iris makes use of a range of other libraries and python modules. These
dependencies must be in place before you can successfully install
Iris. Once you have satisfied the requirements detailed in the
``requirements`` directory, go to the root of Iris' and run::

Expand All @@ -42,8 +42,8 @@ Iris. Once you have satisfied the requirements detailed in the

In-place build - an alternative for developers
==============================================
We are very keen to encourage contributions to Iris. For this type of
development activity an in-place build can be useful. Once you've cloned
We are very keen to encourage contributions to Iris. For this type of
development activity an in-place build can be useful. Once you've cloned
the Iris git repository you can perform an in-place build with::

pip install -e .
Expand All @@ -66,6 +66,22 @@ Alternatively, a full requirements file that includes all optional dependencies
python requirements/gen_conda_requirements.py --groups all > conda_requirements.txt


Running the tests
'''''''''''''''''

In order to run the tests, you will need to use the `test` and `docs` groups (we include the `docs` group so that you can run the pull request tests locally).
Hence the commands change to::

python requirements/gen_conda_requirements.py --groups test docs > conda_requirements.txt
conda create -n my_iris_env --file conda_requirements.txt
conda activate my_iris_env # or whatever other name you gave it
pip install -e .

The tests can then be run with

python setup.py test


Custom site configuration
=========================
The default site configuration values can be overridden by creating the file
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
+ [Installation](#installation)
+ [Copyright and licence](#copyright-and-licence)
+ [Get in touch](#get-in-touch)
+ [Contributing](#contributing)

[](TOC)

Expand Down Expand Up @@ -96,15 +97,16 @@ are available in [INSTALL](INSTALL).
# Get in touch

* Report bugs, or suggest new features using an Issue or Pull Request on [Github](https://github.com/SciTools/iris). You can also comment on existing Issues and Pull Requests.
* For discussions from a user perspective you could join our [SciTools User's Google Group](https://groups.google.com/forum/#!forum/scitools-iris).
* For those involved in developing Iris we also have a [Google Group](https://groups.google.com/forum/#!forum/scitools-iris-dev).
* [Gitter](https://gitter.im/SciTools/iris) ???
* For discussions from a user perspective you could join our [SciTools Users Google Group](https://groups.google.com/forum/#!forum/scitools-iris).
* For those involved in developing Iris we also have an [Iris Developers Google Group](https://groups.google.com/forum/#!forum/scitools-iris-dev).
* [StackOverflow](https://stackoverflow.com/questions/tagged/python-iris) For "How do I?".

# Copyright and licence

Iris may be freely distributed, modified and used commercially under the terms
of its [GNU LGPLv3 license](COPYING.LESSER).

# Contributing
Information on how to contribute can be found in the [Iris developer guide](https://scitools.org.uk/iris/docs/latest/developers_guide/index.html).

(C) British Crown Copyright 2010 - 2018, Met Office
2 changes: 1 addition & 1 deletion docs/iris/src/_templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
<span class="linkdescr">extra information on specific technical issues</span></p>
</li>
<li>
<p class="biglink"><a class="biglink" href="whatsnew/2.1.html">What's new in Iris 2.1?</a><br/>
<p class="biglink"><a class="biglink" href="whatsnew/2.2.html">What's new in Iris 2.2?</a><br/>
<span class="linkdescr">recent changes in Iris's capabilities</span></p>
</li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion docs/iris/src/_templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</a>
<div class="strapline">
<h1>
Iris <span class="version">v2.1</span>
Iris <span class="version">v2.2</span>
</h1>
<p>
A powerful, format-agnostic, community-driven Python library for analysing and
Expand Down
2 changes: 1 addition & 1 deletion docs/iris/src/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# (C) British Crown Copyright 2010 - 2017, Met Office
# (C) British Crown Copyright 2010 - 2018, Met Office
#
# This file is part of Iris.
#
Expand Down
3 changes: 3 additions & 0 deletions docs/iris/src/developers_guide/tests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
Testing
*******

The Iris tests may be run with ``python setup.py test`` which has a
command line utility included.

There are three categories of tests within Iris:
- Unit tests
- Integration tests
Expand Down
14 changes: 7 additions & 7 deletions docs/iris/src/userguide/interpolation_and_regridding.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

import numpy as np
import iris
import warnings
warnings.simplefilter('ignore')

=================================
Cube interpolation and regridding
Expand Down Expand Up @@ -137,10 +139,9 @@ This cube has a "hybrid-height" vertical coordinate system, meaning that the ver
coordinate is unevenly spaced in altitude:

>>> print(column.coord('altitude').points)
[418.6983642578125 434.57049560546875 456.79278564453125 485.3664855957031
520.2932739257812 561.5751953125 609.2144775390625 663.214111328125
723.5769653320312 790.306640625 863.4072265625 942.88232421875
1028.737060546875 1120.9764404296875 1219.6051025390625]
[ 418.69836 434.5705 456.7928 485.3665 520.2933 561.5752
609.2145 663.2141 723.57697 790.30664 863.4072 942.8823
1028.737 1120.9764 1219.6051 ]

We could regularise the vertical coordinate by defining 10 equally spaced altitude
sample points between 400 and 1250 and interpolating our vertical coordinate onto
Expand Down Expand Up @@ -184,9 +185,8 @@ For example, to mask values that lie beyond the range of the original data:
>>> scheme = iris.analysis.Linear(extrapolation_mode='mask')
>>> new_column = column.interpolate(sample_points, scheme)
>>> print(new_column.coord('altitude').points)
[nan 494.44451904296875 588.888916015625 683.333251953125 777.77783203125
872.2222290039062 966.666748046875 1061.111083984375 1155.555419921875
nan]
[ nan 494.44452 588.8889 683.33325 777.77783 872.2222
966.66675 1061.1111 1155.5554 nan]


.. _caching_an_interpolator:
Expand Down
35 changes: 35 additions & 0 deletions docs/iris/src/whatsnew/2.2.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
What's New in Iris 2.2.0
************************

:Release: 2.2.0a0
:Date:


This document explains the new/changed features of Iris in the alpha release
of version 2.2.0
(:doc:`View all changes <index>`).


Iris 2.2.0 Features
===================
.. _showcase:

.. admonition:: 2-Dimensional Coordinate Plotting

The iris plot functions :func:`~iris.plot.pcolor` and
:func:`~iris.plot.pcolormesh` now accommodate the plotting of 2-dimensional
coordinates as well as 1-dimensional coordinates.

To enable this feature, each coordinate passed in for plotting will be
automatically checked for contiguity. Coordinate bounds must either be
contiguous, or the cube's data must be masked at the discontiguities in
order to avoid plotting errors.

The iris plot functions :func:`iris.plot.quiver` has been added, and this
also works with 2-dimensional plot coordinates.

.. admonition:: 2-Dimensional Grid Vectors

The iris functions :func:`iris.analysis.cartography.gridcell_angles` and
:func:`iris.analysis.cartography.rotate_grid_vectors` have been added,
allowing you to convert gridcell-oriented vectors to true-North/East ones.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* Fixed a bug that prevented printing time coordinates with bounds when the time
coordinate was measured on a long interval (that is, ``months`` or ``years``).
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* "Gracefully filling..." warnings are only issued when the co-ordinate or bound data is actually masked.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* NetCDF data variable chunk sizes are utilised at load time for significant performance improvements.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* :func:`iris.util.reverse` can now be used to reverse a cube by specifying one or more coordinates.
1 change: 1 addition & 0 deletions docs/iris/src/whatsnew/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Iris versions.
.. toctree::
:maxdepth: 2

2.2.rst
2.1.rst
2.0.rst
1.13.rst
Expand Down
2 changes: 1 addition & 1 deletion lib/iris/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def callback(cube, field, filename):


# Iris revision.
__version__ = '2.2.0dev0'
__version__ = '2.2.0a0'

# Restrict the names imported when using "from iris import *"
__all__ = ['load', 'load_cube', 'load_cubes', 'load_raw',
Expand Down
15 changes: 15 additions & 0 deletions lib/iris/_lazy_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
from __future__ import (absolute_import, division, print_function)
from six.moves import (filter, input, map, range, zip) # noqa

from functools import wraps

import dask
import dask.array as da
import dask.context
Expand All @@ -31,6 +33,19 @@
import numpy.ma as ma


def non_lazy(func):
"""
Turn a lazy function into a function that returns a result immediately.
"""
@wraps(func)
def inner(*args, **kwargs):
"""Immediately return the results of a lazy function."""
result = func(*args, **kwargs)
return dask.compute(result)[0]
return inner


def is_lazy_data(data):
"""
Return whether the argument is an Iris 'lazy' data array.
Expand Down
Loading

0 comments on commit 006bf90

Please sign in to comment.