Skip to content

Unstructured scheme iris source#33

Merged
stephenworsley merged 4 commits intoSciTools:unstructured_schemefrom
bjlittle:unstructured-scheme-iris-source
Mar 8, 2021
Merged

Unstructured scheme iris source#33
stephenworsley merged 4 commits intoSciTools:unstructured_schemefrom
bjlittle:unstructured-scheme-iris-source

Conversation

@bjlittle
Copy link
Member

@bjlittle bjlittle commented Mar 3, 2021

This PR provides iris source GitHub artifact support, to allow testing against a specific iris GitHub repo branch name, tag name or commit sha.

It also contains conditional task execution, better caching, and controls for conda environment verbosity.

The flake8 and black linting tasks have been combined, and the long/variable running osx task as been retired.

@codecov
Copy link

codecov bot commented Mar 3, 2021

Codecov Report

Merging #33 (3d338e8) into unstructured_scheme (bddb48e) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@                 Coverage Diff                  @@
##           unstructured_scheme      #33   +/-   ##
====================================================
  Coverage                88.43%   88.43%           
====================================================
  Files                       10       10           
  Lines                      346      346           
====================================================
  Hits                       306      306           
  Misses                      40       40           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bddb48e...3d338e8. Read the comment docs.

@bjlittle
Copy link
Member Author

bjlittle commented Mar 3, 2021

Left "as is" the esmf-regrid repo stated requirements are honoured, with no iris source customisation.

The way in which the iris source is controlled is achievable via one of 3 ways.

  1. Setting the IRIS_SOURCE environment variable at the CLI or within a repo commit to .cirrus.yml or noxfile.py.
    The expected format of IRIS_SOURCE is github:<artifact>, where <artifact> can be any valid SciTools/iris repo reference, such as a branch name, tag name, or commit sha. Setting the IRIS_SOURCE in an esmf-regrid commit binds this configuration to that branch until it is backed out of change, but it may be overridden in two different ways, as shown later. The following examples highlight the different IRIS_SOURCE formats,
github:mesh-data-model  # the HEAD commit of the mesh-data-model feature branch
github:master           # the HEAD commit of the master branch
github:v3.0.1           # the v3.0.1 tag
github:c34662c2a252c154f45f361d34ae8f1b4397b326  # a specific commit sha
  1. Using the cirrus-ci.com configuration option for the esmf-regrid project via the cirrus-ci API through the browser. This allows you to create and override existing cirrus-ci environment variables dynamically without making a repo commit - and it is stateful. If used, this can be done on the developer owned cirrus-ci project, and/or the SciTools-incubator/iris-esmf-regrid project. The fuller details of how to perform this are provided separately below.
  2. Providing the IRIS_SOURCE equivalent via the nox CLI. This option will override all above existing IRIS_SOURCE configuration options e.g.,
nox -s tests-3.8 -- --iris=github:<artifact>

@bjlittle
Copy link
Member Author

bjlittle commented Mar 3, 2021

The intent is to extend the format of IRIS_SOURCE to support similar fine grained control of the iris conda-forge package with the <channel>:<spec> format e.g., conda-forge:<3 or conda-forge/label/rc_iris:3.0.0rc0, or even simply specifying the channel but no spec e.g., conda-forge, and let conda resolve the package version.

PATH: ${HOME}/miniconda/bin:${PATH}
CODECOV_TOKEN: "ENCRYPTED\
[1ed538b97a8d005bdd5ab729de009ac38a2b53389edb0912\
d2e76f5ce1e71c5f7bdea80a79492b57af54691c8936bdc7]"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CODECOV_TOKEN is now configured via the cirrus-ci SciTools-incubator/iris-esmf-regrid project configurations accessible from the browser

@trexfeathers
Copy link
Contributor

Tres cool 💐

@bjlittle
Copy link
Member Author

bjlittle commented Mar 3, 2021

iris-source-mag

@bjlittle
Copy link
Member Author

bjlittle commented Mar 3, 2021

@stephenworsley Just to confirm this PR "as is" makes no change in behaviour for iris-esmf-regrid testing i.e., it will always install iris from conda-forge as specified in the iris-esmf-regrid requirements file e.g., requirements/py38.yml.

To start using the capability of this PR in your unstructured_scheme feature branch, I'd recommend making the following change to the .cirrus.yml file:

iris-souce-starter

This will result in your unstructured_scheme feature branch always using the mesh-data-model feature branch from iris. Note that, once this is cached, updates to the HEAD of mesh-data-model won't be automatically pulled in. You'll have to manually invalidate the nox_cache by bumping the NOX_CACHE_BUILD environment variable in the .cirrus.yml file.

HTH

Copy link
Contributor

@stephenworsley stephenworsley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, just a couple odd documentation adjustments and we should be good to merge.

@bjlittle bjlittle force-pushed the unstructured-scheme-iris-source branch from 9868141 to 123aa9b Compare March 5, 2021 16:49
@bjlittle bjlittle force-pushed the unstructured-scheme-iris-source branch from 123aa9b to 3d338e8 Compare March 8, 2021 11:51
@stephenworsley stephenworsley merged commit be03823 into SciTools:unstructured_scheme Mar 8, 2021
@bjlittle bjlittle deleted the unstructured-scheme-iris-source branch March 9, 2021 17:52
bjlittle added a commit to bjlittle/iris-esmf-regrid that referenced this pull request Mar 9, 2021
* refresh cirrus-ci and nox

* add iris artifact support

* deal with special-case cirrus-ci quoting

* review actions
stephenworsley pushed a commit that referenced this pull request Mar 26, 2021
* refresh cirrus-ci and nox

* add iris artifact support

* deal with special-case cirrus-ci quoting

* review actions
jamesp pushed a commit that referenced this pull request Apr 8, 2021
* Unstructured scheme skeleton (#31)

* create skeleton of unstructured regridding code
This code is primarily based on Iris's current Area weighted regridding scheme, with the required adaptions for accepting unstructred UGRID data.

* Unstructured Scheme - Basic GridInfo Handling (#32)

Add basic `GridInfo` function and associated tests.  It returns an ESMF regridding object for gridded data.

* Unstructured scheme iris source (#33)

* refresh cirrus-ci and nox

* add iris artifact support

* deal with special-case cirrus-ci quoting

* review actions

* Unstructured Scheme - Basic MeshInfo Handling (#36)

* provide iris Mesh to MeshInfo conversion

* test against iris feature branch

* lint fixes and documentation

* fix typo

* address review comments.

* change tests to better reflect UGRID orientation

* address review comments.

* address review comments

* ASCII art fix

* Unstructured Scheme - Cube Creation 2D (#39)

* support creation of 2D cubes

* lint fixes

* rewrite test

* remove mesh from _create_cube arguments

* add TODO

* add TODO

* Unstructured Scheme - Mesh Fetching (#46)

* support mesh fetching

* fix docstring

* lint fix

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add docstrings

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add and restructure tests

* fix test

* fix test

* address review comments

* address review comments

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Co-authored-by: Bill Little <bill.little@metoffice.gov.uk>
Co-authored-by: Anna Booton <anna.booton@metoffice.gov.uk>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
stephenworsley added a commit to stephenworsley/iris-esmf-regrid that referenced this pull request Jun 2, 2021
* Unstructured scheme skeleton (SciTools#31)

* create skeleton of unstructured regridding code
This code is primarily based on Iris's current Area weighted regridding scheme, with the required adaptions for accepting unstructred UGRID data.

* Unstructured Scheme - Basic GridInfo Handling (SciTools#32)

Add basic `GridInfo` function and associated tests.  It returns an ESMF regridding object for gridded data.

* Unstructured scheme iris source (SciTools#33)

* refresh cirrus-ci and nox

* add iris artifact support

* deal with special-case cirrus-ci quoting

* review actions

* Unstructured Scheme - Basic MeshInfo Handling (SciTools#36)

* provide iris Mesh to MeshInfo conversion

* test against iris feature branch

* lint fixes and documentation

* fix typo

* address review comments.

* change tests to better reflect UGRID orientation

* address review comments.

* address review comments

* ASCII art fix

* Unstructured Scheme - Cube Creation 2D (SciTools#39)

* support creation of 2D cubes

* lint fixes

* rewrite test

* remove mesh from _create_cube arguments

* add TODO

* add TODO

* Unstructured Scheme - Mesh Fetching (SciTools#46)

* support mesh fetching

* fix docstring

* lint fix

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add docstrings

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add and restructure tests

* fix test

* fix test

* address review comments

* address review comments

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Co-authored-by: Bill Little <bill.little@metoffice.gov.uk>
Co-authored-by: Anna Booton <anna.booton@metoffice.gov.uk>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants