Skip to content

feat: add strftimedelta pattern#606

Merged
sandorkertesz merged 4 commits intoecmwf:developfrom
chebertpinard:develop
Feb 12, 2025
Merged

feat: add strftimedelta pattern#606
sandorkertesz merged 4 commits intoecmwf:developfrom
chebertpinard:develop

Conversation

@chebertpinard
Copy link
Copy Markdown
Contributor

Suggestion for a new pattern type to support passing a date with a timedelta. The syntax would look as the following.

Pattern("/path/to/data/{date:strftimedelta(-6h;%Y%m%d)}{date:strftimedelta(-6h;%H)}_006")

Would allow an easier selection of data at validity time in forecast files.

@FussyDuck
Copy link
Copy Markdown

FussyDuck commented Feb 6, 2025

CLA assistant check
All committers have signed the CLA.

@sandorkertesz
Copy link
Copy Markdown
Collaborator

sandorkertesz commented Feb 7, 2025

@chebertpinard, I added a test for Pattern:

tests/utils/test_patterns.py

Can I ask you to merge the latests develop into your PR and add at least one test to it for your new feature?

@sandorkertesz sandorkertesz added the approved-for-ci Approved to run CI on ECMWF machines label Feb 11, 2025
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.29%. Comparing base (ea24172) to head (2ceac47).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #606   +/-   ##
========================================
  Coverage    90.29%   90.29%           
========================================
  Files          154      154           
  Lines        11572    11572           
  Branches       546      546           
========================================
  Hits         10449    10449           
  Misses         953      953           
  Partials       170      170           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sandorkertesz sandorkertesz merged commit 809d112 into ecmwf:develop Feb 12, 2025
108 of 109 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved-for-ci Approved to run CI on ECMWF machines contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants