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

ENH: as_iterable for improved plugin argument handling + radius_by_lead_time using it #2088

Merged
merged 6 commits into from
Feb 3, 2025

Conversation

cpelley
Copy link
Contributor

@cpelley cpelley commented Jan 27, 2025

Addresses: N/A

Description:

  1. Added new as_terable to improver utilities, with a similar mindset to the previously added as_cube and as_cubes functions there. This intends to improve the robustness of the plugin UI so that it does not unnecessarily require an iterable of an object when technically it should accommodate 1 of that object.
  2. Made use of this as_iterable in the radius_by_lead_time.

Testing:

  • Ran tests and they passed OK
  • Added new tests for the new feature(s)

CLA

  • If a new developer, signed up to CLA

@cpelley cpelley self-assigned this Jan 27, 2025
@cpelley
Copy link
Contributor Author

cpelley commented Jan 27, 2025

Let me know if this helps you out @mo-philrelton
I can add unittests and get this ready for review with just a little more time.

@mo-philrelton
Copy link
Contributor

Let me know if this helps you out @mo-philrelton I can add unittests and get this ready for review with just a little more time.

This did help @cpelley. I have created a PR which expands this to let the EPP workflow run. Could you merge this into your branch as I don't have the permissions to do so. I haven't added any tests for this, I can do so if you don't have the time.

cpelley and others added 2 commits January 30, 2025 09:34
* MOBT-797: Coordinate retention in percentile generation (#2087)

* Enable retention of scalar coordinates that are produced during percentile generation from coordinate collapse. This change also ensures that any scalar time coordinates that are created in this way adhere to the improver metadata standards.

* style fixes.

* Setting percentiles with as_iterable

---------

Co-authored-by: bayliffe <benjamin.ayliffe@metoffice.gov.uk>
@cpelley cpelley changed the title radius_by_lead_time improved input handling ENH: as_iterable for improved plugin argument handling + radius_by_lead_time first usecase of its use Jan 30, 2025
@cpelley cpelley changed the title ENH: as_iterable for improved plugin argument handling + radius_by_lead_time first usecase of its use ENH: as_iterable for improved plugin argument handling + radius_by_lead_time using it Jan 30, 2025
@cpelley cpelley marked this pull request as ready for review January 30, 2025 09:53
@MoseleyS
Copy link
Contributor

Looks like the changes from #2090 have been lost - probably in the rebase.

mo-philrelton
mo-philrelton previously approved these changes Jan 30, 2025
Copy link
Contributor

@mo-philrelton mo-philrelton left a comment

Choose a reason for hiding this comment

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

Works for me and all the tests pass properly.

Co-authored-by: Stephen Moseley <stephen.moseley@metoffice.gov.uk>
Copy link
Contributor

@MoseleyS MoseleyS left a comment

Choose a reason for hiding this comment

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

After digging around, I've come to the conclusion that #2090 included some changes that have separately been merged to master, probably by #2087. Those changes therefore do not show up here because they've already happened.

Tests pass.

@MoseleyS MoseleyS merged commit 1e7d6c0 into master Feb 3, 2025
8 checks passed
@MoseleyS MoseleyS deleted the is_iterable branch February 3, 2025 11:54
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.

3 participants