Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into iris_xarray
Browse files Browse the repository at this point in the history
  • Loading branch information
trexfeathers committed Jan 19, 2023
2 parents c2aa94d + a3b3560 commit ed15b7e
Show file tree
Hide file tree
Showing 26 changed files with 228 additions and 579 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
if: "github.repository == 'SciTools/iris'"
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v6
- uses: actions/stale@v7
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

Expand Down
5 changes: 2 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,17 @@ repos:
args: [--config=./setup.cfg]

- repo: https://github.com/pycqa/isort
rev: 5.10.1
rev: 5.11.4
hooks:
- id: isort
types: [file, python]
args: [--filter-files]

- repo: https://github.com/asottile/blacken-docs
rev: v1.12.1
rev: 1.13.0
hooks:
- id: blacken-docs
types: [file, rst]
additional_dependencies: [black==21.6b0]

- repo: https://github.com/aio-libs/sort-all
rev: v1.2.0
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/benchmarks/experimental/ugrid/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def time_create(self, *params):

class Connectivity(UGridCommon):
def setup(self, n_faces):
self.array = np.zeros([n_faces, 3], dtype=np.int)
self.array = np.zeros([n_faces, 3], dtype=int)
super().setup(n_faces)

def create(self):
Expand Down
5 changes: 0 additions & 5 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ html-quick:
echo "make html-quick in $$i..."; \
(cd $$i; $(MAKE) $(MFLAGS) $(MYMAKEFLAGS) html-quick); done

spelling:
@for i in $(SUBDIRS); do \
echo "make spelling in $$i..."; \
(cd $$i; $(MAKE) $(MFLAGS) $(MYMAKEFLAGS) spelling); done

all:
@for i in $(SUBDIRS); do \
echo "make all in $$i..."; \
Expand Down
8 changes: 2 additions & 6 deletions docs/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,6 @@ html-quick:
@echo
@echo "Build finished. The HTML (no gallery or api docs) pages are in $(BUILDDIR)/html"

spelling:
$(SPHINXBUILD) -b spelling $(SRCDIR) $(BUILDDIR)
@echo
@echo "Build finished. The HTML (no gallery) pages are in $(BUILDDIR)/html"

dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
Expand Down Expand Up @@ -156,4 +151,5 @@ doctest:
"results in $(BUILDDIR)/doctest/output.txt."

show:
@python -c "import webbrowser; webbrowser.open_new_tab('file://$(shell pwd)/$(BUILDDIR)/html/index.html')"
@python -c "import webbrowser; webbrowser.open_new_tab('file://$(shell pwd)/$(BUILDDIR)/html/index.html')"

2 changes: 1 addition & 1 deletion docs/src/_templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<div id="slim-red-box-banner">
You are viewing the <b>latest</b> unreleased documentation
<b>v{{ version }}</b>. You can switch to a <b>stable</b> version
via the flyout menu in the bottom-right of the screen.
via the flyout menu in the bottom corner of the screen.
</div>
<p></p>
{%- endif %}
Expand Down
20 changes: 6 additions & 14 deletions docs/src/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,6 @@ def _dotv(version):
"sphinx_copybutton",
"sphinx.ext.napoleon",
"sphinx_panels",
# TODO: Spelling extension disabled until the dependencies can be included
# "sphinxcontrib.spelling",
"sphinx_gallery.gen_gallery",
"matplotlib.sphinxext.mathmpl",
"matplotlib.sphinxext.plot_directive",
Expand Down Expand Up @@ -193,16 +191,6 @@ def _dotv(version):
napoleon_use_keyword = True
napoleon_custom_sections = None

# -- spellingextension --------------------------------------------------------
# See https://sphinxcontrib-spelling.readthedocs.io/en/latest/customize.html
spelling_lang = "en_GB"
# The lines in this file must only use line feeds (no carriage returns).
spelling_word_list_filename = ["spelling_allow.txt"]
spelling_show_suggestions = False
spelling_show_whole_line = False
spelling_ignore_importable_modules = True
spelling_ignore_python_builtins = True

# -- copybutton extension -----------------------------------------------------
# See https://sphinx-copybutton.readthedocs.io/en/latest/
copybutton_prompt_text = r">>> |\.\.\. "
Expand Down Expand Up @@ -311,6 +299,9 @@ def _dotv(version):
],
"use_edit_page_button": True,
"show_toc_level": 1,
# Omitted `theme-switcher` below to disable it
# Info: https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/light-dark.html#configure-default-theme-mode
"navbar_end": ["navbar-icon-links"],
}

rev_parse = run(["git", "rev-parse", "--short", "HEAD"], capture_output=True)
Expand All @@ -322,6 +313,9 @@ def _dotv(version):
"github_user": "scitools",
"github_version": "main",
"doc_path": "docs/src",
# default theme. Also disabled the button in the html_theme_options.
# Info: https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/light-dark.html#configure-default-theme-mode
"default_mode": "light",
# custom
"on_rtd": on_rtd,
"rtd_version": rtd_version,
Expand Down Expand Up @@ -365,8 +359,6 @@ def _dotv(version):
"http://www.esrl.noaa.gov/psd/data/gridded/conventions/cdc_netcdf_standard.shtml",
"http://www.nationalarchives.gov.uk/doc/open-government-licence",
"https://www.metoffice.gov.uk/",
# TODO: try removing this again in future - was raising an SSLError.
"http://www.ecmwf.int/",
]

# list of sources to exclude from the build.
Expand Down
12 changes: 0 additions & 12 deletions docs/src/developers_guide/contributing_documentation_full.rst
Original file line number Diff line number Diff line change
Expand Up @@ -113,18 +113,6 @@ adding it to the ``linkcheck_ignore`` array that is defined in the
If this fails check the output for the text **broken** and then correct
or ignore the url.

.. comment
Finally, the spelling in the documentation can be checked automatically via the
command::
make spelling
The spelling check may pull up many technical abbreviations and acronyms. This
can be managed by using an **allow** list in the form of a file. This file,
or list of files is set in the `conf.py`_ using the string list
``spelling_word_list_filename``.
.. note:: In addition to the automated `Iris GitHub Actions`_ build of all the
documentation build options above, the
https://readthedocs.org/ service is also used. The configuration
Expand Down
5 changes: 5 additions & 0 deletions docs/src/developers_guide/release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,11 @@ Post Release Steps
#. On main, make a new ``latest.rst`` from ``latest.rst.template`` and update
the include statement and the toctree in ``index.rst`` to point at the new
``latest.rst``.
#. Consider updating ``docs/src/userguide/citation.rst`` on ``main`` to include
the version number, date and `Zenodo DOI <https://doi.org/10.5281/zenodo.595182>`_
of the new release. Ideally this would be updated before the release, but
the DOI for the new version is only available once the release has been
created in GitHub.


.. _SciTools/iris: https://github.com/SciTools/iris
Expand Down
6 changes: 3 additions & 3 deletions docs/src/further_topics/metadata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -389,10 +389,10 @@ instances. Normally, this would cause issues. For example,

.. doctest:: richer-metadata

>>> simply = {"one": np.int(1), "two": np.array([1.0, 2.0])}
>>> simply = {"one": np.int32(1), "two": np.array([1.0, 2.0])}
>>> simply
{'one': 1, 'two': array([1., 2.])}
>>> fruity = {"one": np.int(1), "two": np.array([1.0, 2.0])}
>>> fruity = {"one": np.int32(1), "two": np.array([1.0, 2.0])}
>>> fruity
{'one': 1, 'two': array([1., 2.])}
>>> simply == fruity
Expand All @@ -419,7 +419,7 @@ However, metadata class equality is rich enough to handle this eventuality,

>>> metadata1
CubeMetadata(standard_name='air_temperature', long_name=None, var_name='air_temperature', units=Unit('K'), attributes={'one': 1, 'two': array([1., 2.])}, cell_methods=(CellMethod(method='mean', coord_names=('time',), intervals=('6 hour',), comments=()),))
>>> metadata2 = cube.metadata._replace(attributes={"one": np.int(1), "two": np.array([1000.0, 2000.0])})
>>> metadata2 = cube.metadata._replace(attributes={"one": np.int32(1), "two": np.array([1000.0, 2000.0])})
>>> metadata2
CubeMetadata(standard_name='air_temperature', long_name=None, var_name='air_temperature', units=Unit('K'), attributes={'one': 1, 'two': array([1000., 2000.])}, cell_methods=(CellMethod(method='mean', coord_names=('time',), intervals=('6 hour',), comments=()),))
>>> metadata1 == metadata2
Expand Down
2 changes: 1 addition & 1 deletion docs/src/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Subsystem for Linux). This is a great option to get started with Iris
for users and developers. Be aware that we do not currently test against
any WSL_ distributions.

.. _WSL: https://docs.microsoft.com/en-us/windows/wsl/install-win10
.. _WSL: https://learn.microsoft.com/en-us/windows/wsl/install

.. note:: Iris is currently supported and tested against |python_support|
running on Linux. We do not currently actively test on other
Expand Down

0 comments on commit ed15b7e

Please sign in to comment.