Skip to content

Commit

Permalink
Merge branch 'master' into napolean
Browse files Browse the repository at this point in the history
* master:
  remove duplicate whats new entries from the last release (SciTools#3773)
  whatsnew latest update (SciTools#3771)
  whatsnew overhaul (SciTools#3769)
  Gallery code consistency (SciTools#3766)
  enabled pdf creation (SciTools#3765)
  • Loading branch information
tkknight committed Aug 14, 2020
2 parents 167114a + d16f676 commit 349f596
Show file tree
Hide file tree
Showing 77 changed files with 1,947 additions and 1,460 deletions.
1 change: 1 addition & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ python:

formats:
- htmlzip
- pdf
19 changes: 0 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,25 +122,6 @@ script:
python -m iris.tests.runner --gallery-tests;
fi

# A call to check "whatsnew" contributions are valid, because the Iris test
# for it needs a *developer* install to be able to find the docs.
- >
if [[ "${TEST_TARGET}" == 'doctest' ]]; then
cd ${INSTALL_DIR}/docs/iris/src/whatsnew;
python aggregate_directory.py --checkonly;
fi
# When pushing built docs, attempt to make a preliminary whatsnew by calling
# 'aggregate_directory.py', before the build.
- >
if [[ "${PUSH_BUILT_DOCS}" == 'true' ]]; then
cd ${INSTALL_DIR}/docs/iris/src/whatsnew;
WHATSNEW=$(ls -d contributions_* 2>/dev/null);
if [[ -n "${WHATSNEW}" ]]; then
python aggregate_directory.py --unreleased;
fi;
fi
# Build the docs.
- >
if [[ "${TEST_TARGET}" == 'doctest' ]]; then
Expand Down
16 changes: 4 additions & 12 deletions docs/iris/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,10 @@ html:
echo "make html in $$i..."; \
(cd $$i; $(MAKE) $(MFLAGS) $(MYMAKEFLAGS) html); done

pdf:
@for i in $(SUBDIRS); do\
echo "make latex in $$i.."; \
(cd $$i; $(MAKE) $(MFLAGS) $(MYMAKEFLAGS) latex); done
echo "\def\sphinxdocclass{MO_report}" > build/latex/docs.tex
echo "\documentclass[letterpaper,10pt,english]{MO_report}" >> build/latex/docs.tex
tail -n +4 build/latex/Iris.tex >> build/latex/docs.tex
sed 's/\\tableofcontents/\\tableofcontents\n\\pagenumbering\{arabic\}/' build/latex/docs.tex > build/latex/docs2.tex
sed 's/subsection{/section{/' build/latex/docs2.tex > build/latex/documentation.tex
(cd build/latex; pdflatex -interaction=scrollmode documentation.tex)
# call latex again to get page numbers right...
(cd build/latex; pdflatex -interaction=scrollmode documentation.tex);
html-noplot:
@for i in $(SUBDIRS); do \
echo "make html-noplot in $$i..."; \
(cd $$i; $(MAKE) $(MFLAGS) $(MYMAKEFLAGS) html-noplot); done

all:
@for i in $(SUBDIRS); do \
Expand Down
4 changes: 0 additions & 4 deletions docs/iris/gallery_code/general/__init__.py

This file was deleted.

4 changes: 3 additions & 1 deletion docs/iris/gallery_code/general/plot_SOI_filtering.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@
Monthly Weather Review, Vol 112, pp 326-332
"""
import numpy as np

import matplotlib.pyplot as plt
import numpy as np

import iris
import iris.plot as iplt

Expand Down
6 changes: 4 additions & 2 deletions docs/iris/gallery_code/general/plot_anomaly_log_colouring.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@
See also: http://en.wikipedia.org/wiki/False_color#Pseudocolor.
"""

import cartopy.crs as ccrs
import matplotlib.pyplot as plt
import matplotlib.colors as mcols

import iris
import iris.coord_categorisation
import iris.plot as iplt
import matplotlib.pyplot as plt
import matplotlib.colors as mcols


def main():
Expand Down
6 changes: 4 additions & 2 deletions docs/iris/gallery_code/general/plot_coriolis.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@
"""

import cartopy.crs as ccrs
import matplotlib.pyplot as plt
import numpy as np


import iris
from iris.coord_systems import GeogCS
import iris.plot as iplt
import matplotlib.pyplot as plt
import numpy as np


def main():
Expand Down
1 change: 1 addition & 0 deletions docs/iris/gallery_code/general/plot_custom_aggregation.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
certain temperature over a spell of 5 years or more.
"""

import matplotlib.pyplot as plt
import numpy as np

Expand Down
4 changes: 2 additions & 2 deletions docs/iris/gallery_code/general/plot_custom_file_loading.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@
The cube returned from the load function is then used to produce a plot.
"""

import datetime

from cf_units import Unit, CALENDAR_GREGORIAN
import matplotlib.pyplot as plt
import numpy as np

from cf_units import Unit, CALENDAR_GREGORIAN

import iris
import iris.coords as icoords
import iris.coord_systems as icoord_systems
Expand Down
1 change: 1 addition & 0 deletions docs/iris/gallery_code/general/plot_global_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
title and the labels for the axes are automatically derived from the metadata.
"""

import cartopy.crs as ccrs
import matplotlib.pyplot as plt

Expand Down
3 changes: 2 additions & 1 deletion docs/iris/gallery_code/general/plot_inset.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
"""

import cartopy.crs as ccrs
import matplotlib.pyplot as plt
import numpy as np

import iris
import cartopy.crs as ccrs
import iris.quickplot as qplt
import iris.plot as iplt

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
"""

import matplotlib.pyplot as plt

import iris
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@
We plot these over a specified region, in two different map projections.
"""

import cartopy.crs as ccrs
import matplotlib.pyplot as plt
import numpy as np

import iris
import iris.plot as iplt
import numpy as np
import matplotlib.pyplot as plt


# Define a Cartopy 'ordinary' lat-lon coordinate reference system.
Expand Down
3 changes: 2 additions & 1 deletion docs/iris/gallery_code/general/plot_rotated_pole_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@
* Non native projection and a Natural Earth shaded relief image underlay
"""

import cartopy.crs as ccrs
import matplotlib.pyplot as plt

import iris
import iris.analysis.cartography
import iris.plot as iplt
import iris.quickplot as qplt
import iris.analysis.cartography


def main():
Expand Down
4 changes: 0 additions & 4 deletions docs/iris/gallery_code/meteorology/__init__.py

This file was deleted.

10 changes: 5 additions & 5 deletions docs/iris/gallery_code/meteorology/plot_COP_1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@
can be found in :ref:`cube-statistics`.
"""
import numpy as np

import matplotlib.pyplot as plt
import numpy as np

import iris
import iris.analysis.cartography
import iris.plot as iplt
import iris.quickplot as qplt

import iris.analysis.cartography


def main():
# Load data into three Cubes, one for each set of NetCDF files.
Expand Down Expand Up @@ -93,6 +94,7 @@ def main():
time=lambda cell: 1860 <= cell.point.year <= 1999
)
observed = a1b_mean.extract(constraint)

# Assert that this data set is the same as the e1 scenario:
# they share data up to the 1999 cut off.
assert np.all(np.isclose(observed.data, e1_mean.extract(constraint).data))
Expand All @@ -105,9 +107,7 @@ def main():
plt.title("North American mean air temperature", fontsize=18)

plt.xlabel("Time / year")

plt.grid()

iplt.show()


Expand Down
2 changes: 2 additions & 0 deletions docs/iris/gallery_code/meteorology/plot_COP_maps.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
doi:10.1029/2009EO210001.
"""

import os.path

import matplotlib.pyplot as plt
import numpy as np

Expand Down
1 change: 1 addition & 0 deletions docs/iris/gallery_code/meteorology/plot_TEC.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def main():
plt.ylabel("latitude / degrees")
plt.gca().stock_img()
plt.gca().coastlines()

iplt.show()


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
plot.
"""

import matplotlib.pyplot as plt
import matplotlib.ticker

Expand Down
3 changes: 2 additions & 1 deletion docs/iris/gallery_code/meteorology/plot_hovmoller.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
temperature.
"""
import matplotlib.pyplot as plt

import matplotlib.dates as mdates
import matplotlib.pyplot as plt

import iris
import iris.plot as iplt
Expand Down
1 change: 1 addition & 0 deletions docs/iris/gallery_code/meteorology/plot_lagged_ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
model, from each ensemble member.
"""

import matplotlib.pyplot as plt
import numpy as np

Expand Down
5 changes: 2 additions & 3 deletions docs/iris/gallery_code/meteorology/plot_wind_speed.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,15 @@
"""

import cartopy.crs as ccrs
import cartopy.feature as cfeat
import matplotlib.pyplot as plt
import numpy as np

import iris
import iris.coord_categorisation
import iris.quickplot as qplt

import cartopy.feature as cfeat
import cartopy.crs as ccrs


def main():
# Load the u and v components of wind from a pp file
Expand Down
4 changes: 0 additions & 4 deletions docs/iris/gallery_code/oceanography/__init__.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@
depth values intuitively increase downward on the y-axis.
"""

import matplotlib.pyplot as plt

import iris
import iris.iterate
import iris.plot as iplt
import matplotlib.pyplot as plt


def main():
Expand Down Expand Up @@ -56,6 +58,7 @@ def main():
ax1.set_ylabel("Depth / m")
for ticklabel in ax1.get_xticklabels():
ticklabel.set_color(temperature_color)

# To plot salinity in the same axes we use twiny(). We'll use a different
# color to identify salinity.
salinity_color = (0.6, 0.1, 0.15)
Expand Down
5 changes: 4 additions & 1 deletion docs/iris/gallery_code/oceanography/plot_load_nemo.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
different time dimensions in these files can prevent Iris from concatenating
them without the intervention shown here.
"""

from __future__ import unicode_literals

import matplotlib.pyplot as plt

import iris
import iris.plot as iplt
import iris.quickplot as qplt
import matplotlib.pyplot as plt
from iris.util import promote_aux_coord_to_dim_coord


Expand Down Expand Up @@ -57,6 +59,7 @@ def main():
cube.long_name.capitalize(), lat_string, lon_string
)
)

iplt.show()


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"""

import cartopy.crs as ccrs
import matplotlib.pyplot as plt

import cartopy.crs as ccrs
import iris
import iris.analysis.cartography
import iris.plot as iplt
Expand Down
Loading

0 comments on commit 349f596

Please sign in to comment.