Miksus / rocketry

Modern scheduling library for Python
https://rocketry.readthedocs.io
MIT License
3.26k stars 105 forks source link

ENH: Pass arguments to FuncCond #94

Closed Miksus closed 2 years ago

Miksus commented 2 years ago

This enables the following pattern:

@app.cond()
def file_exists(file):
    return Path(file).is_file()

@app.task(file_exists("myfile.csv"))
def do_things():
    ...

One can now pass arguments (positional/keyword).

codecov-commenter commented 2 years ago

Codecov Report

Merging #94 (9a50bd6) into master (e65ce24) will increase coverage by 0.02%. The diff coverage is 88.88%.

@@            Coverage Diff             @@
##           master      #94      +/-   ##
==========================================
+ Coverage   91.64%   91.67%   +0.02%     
==========================================
  Files          89       89              
  Lines        4523     4526       +3     
==========================================
+ Hits         4145     4149       +4     
+ Misses        378      377       -1     
Impacted Files Coverage Δ
rocketry/conditions/func.py 89.58% <88.88%> (+2.91%) :arrow_up:

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