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

Add format agent copy and equality methods #6119

Merged
merged 7 commits into from
Sep 11, 2024

Conversation

jrackham-mo
Copy link
Contributor

🚀 Pull Request

Description

Closes #6108.
Adds a copy method to FormatAgent, which creates a new FormatAgent from the format specs. Also adds an equality method which compares the format specs.

The use case for this is to temporarily modify the FORMAT_AGENT in a custom load, and then restore it so that we don't change standard iris.load behaviour outside of the custom load.

@CLAassistant
Copy link

CLAassistant commented Aug 15, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

codecov bot commented Aug 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.82%. Comparing base (b8f554f) to head (0b08f0c).
Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6119      +/-   ##
==========================================
+ Coverage   89.77%   89.82%   +0.04%     
==========================================
  Files          88       88              
  Lines       23026    23150     +124     
  Branches     5036     5043       +7     
==========================================
+ Hits        20672    20794     +122     
- Misses       1623     1624       +1     
- Partials      731      732       +1     

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

…nto add-format-agent-copy

* 'add-format-agent-copy' of github.com:jrackham-mo/iris:
  [pre-commit.ci] auto fixes from pre-commit.com hooks
@jrackham-mo jrackham-mo marked this pull request as ready for review August 15, 2024 09:35
@ESadek-MO ESadek-MO self-requested a review August 21, 2024 09:48
Copy link
Contributor

@ESadek-MO ESadek-MO left a comment

Choose a reason for hiding this comment

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

Thanks @jrackham-mo, code all looks good to me, just a minor change in the whastnew and should be good to go!

docs/src/whatsnew/latest.rst Outdated Show resolved Hide resolved
@ESadek-MO ESadek-MO enabled auto-merge (squash) September 11, 2024 13:14
Copy link
Contributor

@ESadek-MO ESadek-MO left a comment

Choose a reason for hiding this comment

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

lgtm, thanks!

@ESadek-MO ESadek-MO merged commit d76a4d8 into SciTools:main Sep 11, 2024
21 checks passed
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.

Comparisons for FormatAgent()
3 participants