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

Allowing exemption to axis guessing on coords #5551

Merged
merged 32 commits into from
Nov 17, 2023

Conversation

HGWright
Copy link
Contributor

🚀 Pull Request

Description

This PR adds a coordinate property guess_coord that forces guess_coord_axis to return None.

Tests for guess_coord and guess_coord_axis added.

Closes #5003


lib/iris/coords.py Outdated Show resolved Hide resolved
lib/iris/util.py Outdated Show resolved Hide resolved
@bjlittle bjlittle self-assigned this Nov 8, 2023
@bjlittle bjlittle self-requested a review November 8, 2023 14:16
@bjlittle bjlittle changed the title Allowing excemption to axis guessing on coords Allowing exemption to axis guessing on coords Nov 8, 2023
HGWright and others added 5 commits November 9, 2023 12:38
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.

@HGWright It's taking shape, so thanks for persevering 💯

Here's some initial suggestions 👍

lib/iris/coords.py Outdated Show resolved Hide resolved
lib/iris/coords.py Outdated Show resolved Hide resolved
lib/iris/coords.py Outdated Show resolved Hide resolved
lib/iris/util.py Outdated Show resolved Hide resolved
lib/iris/coords.py Outdated Show resolved Hide resolved
Copy link

codecov bot commented Nov 9, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (80c1792) 89.44% compared to head (b01f3f8) 89.45%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5551   +/-   ##
=======================================
  Coverage   89.44%   89.45%           
=======================================
  Files          89       89           
  Lines       22587    22603   +16     
  Branches     5385     5389    +4     
=======================================
+ Hits        20203    20219   +16     
  Misses       1638     1638           
  Partials      746      746           

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

HGWright and others added 5 commits November 9, 2023 15:34
@HGWright HGWright marked this pull request as ready for review November 10, 2023 10:04
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.

@HGWright This is looking really good.

Just a few minor actions to service, then we can bank this 👍

lib/iris/tests/unit/util/test_guess_coord_axis.py Outdated Show resolved Hide resolved
lib/iris/tests/unit/coords/test_Coord.py Outdated Show resolved Hide resolved
lib/iris/tests/unit/coords/test_Coord.py Outdated Show resolved Hide resolved
lib/iris/tests/unit/coords/test_Coord.py Outdated Show resolved Hide resolved
lib/iris/tests/unit/coords/test_Coord.py Outdated Show resolved Hide resolved
lib/iris/tests/unit/util/test_guess_coord_axis.py Outdated Show resolved Hide resolved
lib/iris/tests/unit/util/test_guess_coord_axis.py Outdated Show resolved Hide resolved
lib/iris/tests/unit/util/test_guess_coord_axis.py Outdated Show resolved Hide resolved
lib/iris/tests/unit/util/test_guess_coord_axis.py Outdated Show resolved Hide resolved
lib/iris/util.py Outdated Show resolved Hide resolved
@bjlittle
Copy link
Member

bjlittle commented Nov 17, 2023

@HGWright You also need to add a whatsnew entry, thanks 👍

@bjlittle
Copy link
Member

@HGWright Could you also raise an issue to capture the need to document these changes.

We can action that separately, rather than bloat the scope of this pull-request.

HGWright and others added 5 commits November 17, 2023 11:45
HGWright and others added 8 commits November 17, 2023 14:40
* 'guess_coord' of github.com:HGWright/iris: (82 commits)
  [pre-commit.ci] auto fixes from pre-commit.com hooks
  [pre-commit.ci] pre-commit autoupdate (SciTools#5579)
  Relicense to from LGPL-3 to BSD-3 (SciTools#5577)
  Allow `add_season_year()` to optionally send spans backwards (SciTools#5573)
  Added xarray phrasebook doc page (SciTools#5564)
  fixed spacing (SciTools#5572)
  DOCS: Removed broken git links. (SciTools#5569)
  More sensible time axis and tick labels for 2D plots (SciTools#5561)
  removed now incorrect statement. (SciTools#5555)
  [pre-commit.ci] pre-commit autoupdate (SciTools#5558)
  Exempt major release label from stalebot (SciTools#5559)
  updated link (SciTools#5556)
  Added whatsnew. (SciTools#5552)
  moved latest warning banner logic to conf.py (SciTools#5508)
  updated layout of top navbar (SciTools#5505)
  Oblique and Rotated Mercator (SciTools#5548)
  [pre-commit.ci] pre-commit autoupdate (SciTools#5549)
  [pre-commit.ci] pre-commit autoupdate (SciTools#5527)
  Bump scitools/workflows from 2023.09.1 to 2023.10.0 (SciTools#5540)
  nep29 drop table schedule numpy>1.21 (SciTools#5525)
  ...
@bjlittle bjlittle merged commit 7770518 into SciTools:main Nov 17, 2023
17 checks passed
tkknight added a commit to tkknight/iris that referenced this pull request Nov 27, 2023
* upstream/main:
  Mergeback of `FEATURE_chunk_control` branch (SciTools#5588)
  [CI Bot] environment lockfiles auto-update (SciTools#5547)
  Mergeback of "Feature _split_attrs" branch (SciTools#5152)
  add whatsnew (SciTools#5596)
  Refactor area weighted regridding, improve performance (SciTools#5543)
  Allowing exemption to axis guessing on coords (SciTools#5551)
tkknight added a commit to tkknight/iris that referenced this pull request Dec 6, 2023
* main:
  DOCS: Numpydocs1 (SciTools#5578)
  add links to scitools-classroom repo. (SciTools#5609)
  Feedstock rc branch management in do-nothing script (SciTools#5515)
  Relocated the Technical Papers documentation to Further Topics.  (SciTools#5602)
  Fix pp save of realization coordinate (SciTools#5568)
  Bump actions/checkout from 3 to 4 (SciTools#5460)
  Bump actions/github-script from 6 to 7 (SciTools#5580)
  Bump conda-incubator/setup-miniconda from 2 to 3 (SciTools#5607)
  CI: specify matplotlib-base (SciTools#5606)
  Mergeback of `FEATURE_chunk_control` branch (SciTools#5588)
  [CI Bot] environment lockfiles auto-update (SciTools#5547)
  Mergeback of "Feature _split_attrs" branch (SciTools#5152)
  add whatsnew (SciTools#5596)
  Refactor area weighted regridding, improve performance (SciTools#5543)
  Allowing exemption to axis guessing on coords (SciTools#5551)
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.

Allow exemptions to coordinate axis guessing on save
3 participants