Ensure Repeat variables _DD/_MM always have 2 digits#298
Draft
marcosbento wants to merge 1 commit intodevelopfrom
Draft
Ensure Repeat variables _DD/_MM always have 2 digits#298marcosbento wants to merge 1 commit intodevelopfrom
marcosbento wants to merge 1 commit intodevelopfrom
Conversation
Collaborator
Author
|
@claude[agent] review this PR. Create a list of findings with potential improvements. |
|
@marcosbento I've opened a new pull request, #299, to work on those changes. Once the pull request is ready, I'll request review from you. |
There was a problem hiding this comment.
Pull request overview
This PR standardizes the formatting of generated repeat variables so that month/day components (_MM, _DD) are always zero-padded to 2 digits for time-based repeats (RepeatDate, RepeatDateTime, RepeatDateList), addressing the inconsistency reported in #296.
Changes:
- Add internal helpers to format generated variable components with fixed digit widths (notably 2-digit month/day, and 2-digit time components).
- Update RepeatDate / RepeatDateTime / RepeatDateList generated-variable computation to use zero-padded formatting.
- Extend and adjust unit tests to assert the new formatting and validate generated variables across increments/expiry.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| libs/attribute/src/ecflow/attribute/RepeatAttr.cpp | Introduces digit-format helpers and applies 2-digit formatting for generated repeat variables (date/time components). |
| libs/attribute/test/TestRepeat.cpp | Adds/updates Boost tests to verify generated variables, including 2-digit _MM/_DD expectations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9a28a68 to
0c41180
Compare
This change applies to all Repeats that loop over time, including RepeatDate, RepeatDateTime and RepeatDateList. Re #296
0c41180 to
f3e4f4e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Ensure Repeat variables _DD/_MM always have 2 digits
This change applies to all Repeats that loop over time, including RepeatDate, RepeatDateTime and RepeatDateList -- related to #296.
Contributor Declaration
By opening this pull request, I affirm the following:
🌦️ >> Documentation << 🌦️
https://sites.ecmwf.int/docs/dev-section/ecflow/pull-requests/PR-298