Certain input parameters produce a negative CONCATENATION_FIRST_CYCLE_OFFSET value
- Dominant language
- Python
- Stars
- 8
- Forks
- 7
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 23
Description
The conversion workflow/CalculateISODatetimes class does not handle a particular case of input parameter combinations and produces negative offset values which cylc rightly fails to validate.
```
WorkflowConfigError: Cannot process recurrence R/19470101T0000Z+-P720D/P100Y (initial cycle point=19470101T0000Z) (final cycle point=22470101T0000Z) '19470101T0000Z+': not a valid cylc-shorthand or full ISO 8601 date representation
```
This happens because concatenation tasks are offset by the cycling frequency, but the negative offset produced will try and run the tasks at a cycling point of 1945 which is before the starting cycle point of 1947.
```python
isodatetimes = CalculateISODatetimes(
TimePointParser().parse("1947-01-01T00:00:00Z"),
TimePointParser().parse("2248-01-01T00:00:00Z"),
DurationParser().parse("P5Y"),
DurationParser().parse("P100Y"),
TimePointParser().parse("1850-01-01T00:00:00Z"),
)
````
Some solutions worth looking at.
- Automatically reducing the cycling frequency to avoid e.g. P5Y -> P1Y would solve this particular examples.
- Skip adding the first concatenation task and let the 2045 task handle the full 1947 - 2050 range rather than just 1950 -2050.
- See if the task can just be added to the first cycle point i.e 1947.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the conversion workflow's CalculateISODatetimes class and reproduce the issue using the Python inputs shown. Trace how concatenation tasks are offset by the cycling frequency and determine how the 1947 start point should be handled. Done means the example no longer produces a negative offset or an invalid cycle-point value that Cylc rejects.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100