Skip to content

feat: add strftimedelta pattern #606

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

Merged
merged 4 commits into from
Feb 12, 2025
Merged

Conversation

chebertpinard
Copy link
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

FussyDuck commented Feb 6, 2025

CLA assistant check
All committers have signed the CLA.

@sandorkertesz
Copy link
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

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
110 of 111 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