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

colorbar keyword for iris.quickplot routines #6169

Merged
merged 10 commits into from
Oct 16, 2024

Conversation

ukmo-ccbunney
Copy link
Contributor

🚀 Pull Request

Description

New boolean colorbar keywork allows user to control automatic generation of a colorbar in iris.quickplot plotting routines.
Only implemented for pcolormesh, colormesh and coutourf as the other plotting routines do not generate a colorbar.

Fixes: #5970


Consult Iris pull request check list

user to control automatic generation of a colorbar.
@ukmo-ccbunney ukmo-ccbunney self-assigned this Oct 9, 2024
Copy link

codecov bot commented Oct 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.81%. Comparing base (54f430b) to head (3b5b3fe).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6169   +/-   ##
=======================================
  Coverage   89.81%   89.81%           
=======================================
  Files          88       88           
  Lines       23178    23181    +3     
  Branches     4313     4313           
=======================================
+ Hits        20818    20821    +3     
  Misses       1628     1628           
  Partials      732      732           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ukmo-ccbunney
Copy link
Contributor Author

@trexfeathers I've added 3 new tests for this change in test_quickplot.py::TestLabels and generated the new images and imagerepo.json files. If you're happy with the tests I've added, then I'll update raise a PR for the iris-test-data repo.

Copy link
Contributor

@trexfeathers trexfeathers left a comment

Choose a reason for hiding this comment

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

Thanks @ukmo-ccbunney, I agree with your logic, please do put up that iris-test-data pull request - I assume you are following this guidance: Adding or Updating Graphics Tests — Iris 3.10.0 documentation (scitools-iris.readthedocs.io)

lib/iris/quickplot.py Show resolved Hide resolved
lib/iris/quickplot.py Show resolved Hide resolved
@trexfeathers
Copy link
Contributor

Oh and don't forget a What's New entry in latest.rst

@ukmo-ccbunney
Copy link
Contributor Author

Oh and don't forget a What's New entry in latest.rst

Done; 8261d3b

@ukmo-ccbunney
Copy link
Contributor Author

New test data for this change: SciTools/iris-test-data#94

@ukmo-ccbunney ukmo-ccbunney marked this pull request as ready for review October 15, 2024 14:03
* upstream/main:
  Make Iris backwards compatible with Cartopy (SciTools#6172)
  Updated environment lockfiles (SciTools#6173)
  Bump scitools/workflows from 2024.09.9 to 2024.10.0 (SciTools#6170)
  Update lock files, pin Cartopy!=0.23 (SciTools#6171)
trexfeathers pushed a commit to SciTools/iris-test-data that referenced this pull request Oct 16, 2024
@trexfeathers
Copy link
Contributor

Great! Now that iris-test-data is sorted, we need to reference 2.27 in the below places.

While you're there, could you add a comment in ci-tests.yml to remind people that iris-test-data is also referenced in benchmarks_run.yml (they end up mis-aligned a lot!)?

env:
IRIS_TEST_DATA_VERSION: "2.26"
ENV_NAME: "ci-tests"

env:
IRIS_TEST_DATA_LOC_PATH: benchmarks
IRIS_TEST_DATA_PATH: benchmarks/iris-test-data
IRIS_TEST_DATA_VERSION: "2.26"
# Lets us manually bump the cache to rebuild
ENV_CACHE_BUILD: "0"
TEST_DATA_CACHE_BUILD: "2"

@trexfeathers trexfeathers merged commit d11ff3a into SciTools:main Oct 16, 2024
21 checks passed
@ukmo-ccbunney ukmo-ccbunney deleted the feature/qplt_colorbar branch October 16, 2024 13:39
stephenworsley added a commit to stephenworsley/iris that referenced this pull request Oct 22, 2024
* main:
  [pre-commit.ci] pre-commit autoupdate (SciTools#6175)
  Updated environment lockfiles (SciTools#6183)
  Update to `cell_method` parsing (SciTools#6083)
  Bump scitools/workflows from 2024.10.0 to 2024.10.1 (SciTools#6179)
  `colorbar` keyword for iris.quickplot routines (SciTools#6169)
  Make Iris backwards compatible with Cartopy (SciTools#6172)
  Updated environment lockfiles (SciTools#6173)
  Bump scitools/workflows from 2024.09.9 to 2024.10.0 (SciTools#6170)
  Update lock files, pin Cartopy!=0.23 (SciTools#6171)
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.

Configurable colorbar in iris.quickplot
2 participants