Skip to content
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

ENH: Add AT to hourly, daily, weekly etc. #81

Merged
merged 3 commits into from
Aug 21, 2022
Merged

Conversation

Miksus
Copy link
Owner

@Miksus Miksus commented Aug 18, 2022

This PR adds .at(span) to the cond API's time-related conditions:

from rocketry.conds import daily

@app.task(daily.at("11:00"))
def do_things():
    ...

Note that the above is same as daily.between("11:00", "12:00") as the definition is that at is a span of one subunit of the time period. weekly.at("Monday") is not proper English but It's the responsibility of the user to learn English.

@Miksus Miksus added the built-in Relates to the built-in tasks, conditions etc. label Aug 18, 2022
@codecov-commenter
Copy link

codecov-commenter commented Aug 19, 2022

Codecov Report

Merging #81 (c72d8d2) into master (8fa4aea) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master      #81   +/-   ##
=======================================
  Coverage   91.13%   91.14%           
=======================================
  Files          88       88           
  Lines        4366     4368    +2     
=======================================
+ Hits         3979     3981    +2     
  Misses        387      387           
Impacted Files Coverage Δ
rocketry/conditions/api.py 96.92% <100.00%> (+0.04%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@Miksus Miksus merged commit 7584cb1 into master Aug 21, 2022
@Miksus Miksus deleted the dev/add_at_to_cond_api branch August 21, 2022 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
built-in Relates to the built-in tasks, conditions etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants