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

maflib.util.rule の必須パラメータが抜けている場合に警告を出す #109

Open
hiroshinoji opened this issue Mar 24, 2015 · 0 comments

Comments

@hiroshinoji
Copy link
Contributor

maflib.rules.downloadurl 引数など、タスクに必須なタスクパラメータが抜けているとき、コマンドが実行される前に警告を出して欲しい。

これまでは、これらのルールは外側でパラメータを与えてラップしていたが、このパラメータをタスクパラメータで指定するようにすると、それが必須でも実行時までチェックが行われないため、エラーが実験途中まで関知されない。

download

@maflib.util.rule
def download(task):
    url = task.parameter['url']

となっているが、この url が必須であることを関数定義の際に知らせる必要がある。 rule デコレータを拡張し、

@maflib.util.rule(required='url')

と書くようにすると、 url がセットされていない場合に警告を出す、など?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant