-
Notifications
You must be signed in to change notification settings - Fork 11
Tracking changes in v0.4.0. #400
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #400 +/- ##
==========================================
- Coverage 96.16% 95.62% -0.54%
==========================================
Files 93 94 +1
Lines 7797 8254 +457
==========================================
+ Hits 7498 7893 +395
- Misses 299 361 +62
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Hey @tobiasraabe, I just came here after reading the docs on the API changes at https://pytask-dev--392.org.readthedocs.build/en/392/tutorials/write_a_task.html I'm sorry to say this, I'm sure you don't want to hear this, but I don't think going in the Annotated direction is a good idea. It ties the implementation logic in too closely with the orchestration logic. If there is some 3rd party function that I want to just wrap as a step, or use a simple lambda, I can't do that, because I need to add type hints. I want to be able to do: task_drop_column = pytask.Task(lambda df: df.drop(columns="foo"), ins=DfLoader("in.parquet"), outs=DfSaver("out.parquet"))
from fuzzywuzzy import fuzz
task_calc_ratio = pytask.Task(fuzz.ratio, ins=[..., ...], outs=...) I think moving from separate produces and depends_on decorators into a single decorator/wrapper is a good idea, but I think the "wrapping" idea is essential. What was the pain point of decorators that you were trying to get away from? |
No worries. I appreciate your honest feedback. I have way too much fun redesigning pytask than being disappointed if the first draft does not work out. You are correct that I did not think about lambdas and third-party functions. TBH, I have never heard from someone before that uses pytask like you do and this is why the current v0.4 focuses so far on making the interface better for the (probably silent) majority of users that follows mostly the design in the docs. That being said, I believe your use case is something that pytask should support and strive to improve. To continue supporting your use case, pytask could treat The main pain points were that
Let us continue discussions like that in #361. Otherwise, our messages are everywhere, and nobody can follow them. Please feel free to post a summary/ies there if you'd like. If not, I will do it hopefully soon with a proposal. |
Ahh, #361 looks like a good central place for this discussion, I'll go over there :) |
No description provided.