Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show acceptable image test results in the docs #4392

Merged
merged 5 commits into from
Jan 4, 2022

Conversation

jamesp
Copy link
Member

@jamesp jamesp commented Oct 29, 2021

🚀 Pull Request

Description

There are times when I am running the tests on awkward remote platforms and I get failures due to hamming distance of graphical tests failing. It would be helpful in these circumstances to see the contents of scitools/test-iris-imagehash ordered by test, rather than hash.

This PR adds autogenerated pages to the iris docs that show, by test, the acceptable image results.

The pages added:

  1. An index page of all graphical tests listed in imagerepo.json:
    image
  2. A page per test with all acceptable images linked inline:
    image

The images are linked and loaded directly from the scitools/test-iris-imagehash repository.


Consult Iris pull request check list

Copy link
Member

@bjlittle bjlittle left a comment

Choose a reason for hiding this comment

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

@jamesp This is really awesome! Thanks 👍

My only comment is that Python files under docs/src/sphinxext are explicitly not checked by black, flake8 or isort... happy to live with that if you are?

The alternative is either:

  1. we add exceptions to the rule for the linters et al configurations
  2. manually lint (I'm assuming that this code will be pretty stable and not subject to much change)
  3. we move docs/src/sphinxext/image_test_output.py to live somewhere else and somehow hook it in

@jamesp
Copy link
Member Author

jamesp commented Jan 4, 2022

I'm happy to do a manual run of those tools over this code 👍

@jamesp jamesp requested a review from bjlittle January 4, 2022 17:52
@bjlittle
Copy link
Member

bjlittle commented Jan 4, 2022

@jamesp Works for me dude, nice one 🤟

@bjlittle bjlittle merged commit 3b96ec2 into SciTools:main Jan 4, 2022
tkknight added a commit to tkknight/iris that referenced this pull request Jan 5, 2022
* main:
  rtd with latest mambaforge image for faster building (SciTools#4476)
  Show acceptable image test results in the docs (SciTools#4392)
  Nc load latlon fix (SciTools#4470)
  update matplotlib links (SciTools#4474)
  Whatsnew for PR 4462 (SciTools#4475)
  Clarify the return type of iris.load (AVD-1899) (SciTools#4462)
  [pre-commit.ci] pre-commit autoupdate (SciTools#4472)
  Updated environment lockfiles (SciTools#4467)
tkknight added a commit to tkknight/iris that referenced this pull request Jan 6, 2022
* main:
  Use partial to make cube pickleable (SciTools#4377)
  Add edit via github method to Iris docs (SciTools#4461)
  Broken cartopy links in docs (SciTools#4464)
  rtd with latest mambaforge image for faster building (SciTools#4476)
  Show acceptable image test results in the docs (SciTools#4392)
  Nc load latlon fix (SciTools#4470)
  update matplotlib links (SciTools#4474)
  Whatsnew for PR 4462 (SciTools#4475)
  Clarify the return type of iris.load (AVD-1899) (SciTools#4462)
  [pre-commit.ci] pre-commit autoupdate (SciTools#4472)
  Updated environment lockfiles (SciTools#4467)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants