ecmwf / pyflow

A high level Python interface to ecFlow allowing the creation of ecFlow suites in a modular and "pythonic" way
https://pyflow-workflow-generator.readthedocs.io/en/latest/
Apache License 2.0
7 stars 7 forks source link

Add support for RepeatDateTime #44

Closed gmertes closed 2 months ago

gmertes commented 3 months ago

Support for RepeatDateTime (#43)

I chose timedelta as the default increment format, to keep a consistent interface with datetime objects. But string formats are also supported just like in RepeatDate.

Supported argument formats:

We can think about also supporting int increments to represent hours, but in RepeatDate the int increment is translated to days. This could cause some confusion, so I left it out for now.

I subclassed from RepeatDate because I think the arithmetic functions are the same.

Includes input tests for a variety of format combinations.

FussyDuck commented 3 months ago

CLA assistant check
All committers have signed the CLA.

gmertes commented 3 months ago

I subclassed from RepeatDate because I think the arithmetic functions are the same.

I just saw in the cpp docs that the arithmetic is in fact not the same as in RepeatDate (the python api docs are incomplete).

So I removed the RepeatDate inheritance. I'm not sure how to implement day/hour/minute etc properties for RepeatDateTime using the ecflow expressions, so I left them out for now.