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

removed redundant timeattr check and added tests to ensure datetime/c… #5396

Merged
merged 7 commits into from
Jul 31, 2023

Conversation

acchamber
Copy link
Contributor

🚀 Pull Request

Description

Solving #5175, this removes the restriction against comparing datetime objects, as the only ones Iris should deal with are datetime.datetime, cftime.datetime, and PartialDateTime. Adds various new tests for checking combinations of those act as they should.

…ftime.datetime/partialdatetime play nicely.
@acchamber acchamber requested a review from pp-mo July 27, 2023 14:18
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 for looking into this @acchamber.

Some comments below, plus this needs a What's New entry.

lib/iris/coords.py Show resolved Hide resolved
lib/iris/tests/unit/coords/test_Cell.py Show resolved Hide resolved
lib/iris/tests/unit/coords/test_Cell.py Outdated Show resolved Hide resolved
lib/iris/tests/unit/coords/test_Cell.py Show resolved Hide resolved
lib/iris/tests/unit/coords/test_Cell.py Show resolved Hide resolved
alex.chamberlain-clay added 2 commits July 31, 2023 11:29
@trexfeathers trexfeathers removed the request for review from pp-mo July 31, 2023 10:58
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.

lib/iris/coords.py Outdated Show resolved Hide resolved
lib/iris/tests/unit/coords/test_Cell.py Show resolved Hide resolved
alex.chamberlain-clay and others added 2 commits July 31, 2023 14:09
@codecov
Copy link

codecov bot commented Jul 31, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.01% ⚠️

Comparison is base (e66a0c8) 89.39% compared to head (8b88e2a) 89.39%.

❗ Current head 8b88e2a differs from pull request most recent head 8dd6abc. Consider uploading reports for the commit 8dd6abc to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5396      +/-   ##
==========================================
- Coverage   89.39%   89.39%   -0.01%     
==========================================
  Files          89       89              
  Lines       22440    22436       -4     
  Branches     5382     5380       -2     
==========================================
- Hits        20060    20056       -4     
  Misses       1635     1635              
  Partials      745      745              
Files Changed Coverage Δ
lib/iris/coords.py 93.24% <ø> (-0.03%) ⬇️

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

@trexfeathers trexfeathers merged commit 1efa4bf into SciTools:main Jul 31, 2023
14 checks passed
@trexfeathers trexfeathers linked an issue Jul 31, 2023 that may be closed by this pull request
@acchamber acchamber deleted the fix_for_#5175 branch August 2, 2023 15:13
acchamber added a commit to acchamber/iris that referenced this pull request Aug 7, 2023
…o fix_for_#5372

* 'fix_for_#5372' of https://github.com/acchamber/iris:
  [pre-commit.ci] pre-commit autoupdate (SciTools#5406)
  Avoid using deprecated ContourSet attributes (SciTools#5405)
  removed redundant timeattr check and added tests to ensure datetime/c… (SciTools#5396)
  Include location coordinates in the data variable coordinates attribute (SciTools#5389)
  Added link to UDUNITS-2 database to convert_units docstrings (SciTools#5388)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏁 Done
Development

Successfully merging this pull request may close these issues.

Allow extraction with bounded time-coordinates.
3 participants