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

Fixes in support of configuration execution which call plugins directly (i.e. not via CLI) #2036

Merged
merged 5 commits into from
Nov 12, 2024

Conversation

cpelley
Copy link
Contributor

@cpelley cpelley commented Oct 3, 2024

Motivation

  • Support EPP execution with dagrunner.
  • Supporting IMPROVER execution with dagrunner.

Summary of changes

  1. Enforce python int type for powers.
File "/path/to/cylc-run/epp_demo/lib/python3.9/site-packages/improver/utilities/cube_extraction.py", line 416, in fill_invalid    v_increment = sign * 10 ** (-cube.attributes.get("least_significant_digit", 2))
...
ValueError: Integers to negative integer powers are not allowed
  1. CopyAttributes bad arguments passing (template cube).

Issues

@cpelley cpelley self-assigned this Oct 3, 2024
@@ -26,25 +26,24 @@ def __init__(self, attributes: List):
self.attributes = attributes

def process(
self, *cubes: Union[Cube, CubeList], template_cube: Union[Cube, CubeList]
) -> Union[Tuple[Union[Cube, CubeList]], Cube, CubeList]:
self, *cubes: Union[Cube, CubeList]) -> Union[Cube, CubeList]:
Copy link
Contributor Author

@cpelley cpelley Oct 3, 2024

Choose a reason for hiding this comment

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

Ideally I would define this as:
(template_cube, *cubes)

However, this would mean requiring people to swap the order of edges defined in their configurations - a cause of frustration for people migrating away from the CLI I'm sure.

@cpelley cpelley force-pushed the lsd_failure branch 2 times, most recently from 4fb713e to be0031a Compare October 14, 2024 13:37
@cpelley cpelley marked this pull request as ready for review October 15, 2024 15:01
@cpelley cpelley requested a review from JoshuaWiggs October 15, 2024 15:02
@cpelley cpelley changed the title Changes to support EPP execution with dagrunner Fixes in support of configuration execution which call plugins directly (i.e. not via CLI) Oct 31, 2024
@bayliffe bayliffe self-assigned this Nov 8, 2024
Copy link
Contributor

@bayliffe bayliffe left a comment

Choose a reason for hiding this comment

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

I agree the template cube might be better placed first in the args, but if that is harder for people to adopt, fair enough.

@bayliffe bayliffe removed their assignment Nov 8, 2024
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.

Change looks good. Tests pass.

@cpelley cpelley merged commit 67c9fc4 into master Nov 12, 2024
16 checks passed
@cpelley cpelley deleted the lsd_failure branch November 12, 2024 10:51
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