m3dev / gokart

Gokart solves reproducibility, task dependencies, constraints of good code, and ease of use for Machine Learning Pipeline.
https://gokart.readthedocs.io/en/latest/
MIT License
318 stars 57 forks source link

Feature Request: parameter free mock task instance #242

Open vaaaaanquish opened 3 years ago

vaaaaanquish commented 3 years ago

I want a mock task instance generator to make test more convenient.

now

        from_date = datetime.date(2020, 1, 1)
        to_date = datetime.date(2020, 1, 5)
        target = gokart.TaskOnKart()

        task = ExampleTask(from_date=from_date, to_date=to_date, target=target)
        X = task.requires()

feature image

from gokart.testing import mocking
...
    task = mocking(ExampleTask)(from_date=from_date)
    X = task.requires()