This repository has been archived by the owner on Jul 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
Decorator improvements #316
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
b3baefd
Decorators now declare the configuration parameters they need
elijahbenizzy b848a72
Adds `target` parameter to NodeTransformer.
elijahbenizzy 33482dc
Removes the condition in NodeTransformer that decorates nodes with
elijahbenizzy 28e9e68
Adds documentation for decorators
elijahbenizzy f0be6ca
Implements cleaner spec of reuse_functions, moves and renames
elijahbenizzy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# subdag operator | ||
|
||
This README demonstrates the use of the subdag operator. | ||
|
||
The subdag operator allows you to effectively run a driver within a node. | ||
In this case, we are calculating unique website visitors from the following set of parameters: | ||
|
||
1. Region = CA (canada) or US (United States) | ||
2. Granularity of data = (day, week, month) | ||
|
||
You can find the code in [unique_users.py](unique_users.py) and [reusable_subdags.py](reusable_subdags.py) | ||
and look at how we run it in [main.py](main.py). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't sound like there's a difference between (2) & (3)?
Otherwise going between function and nodes is confusing I think -- all the decorators operate on a function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a difference. The decorators in (3) don't operate on functions, they operate on nodes.
The decorators in (2) have access to the function and use it to determine the subdag shape, the decorators in (2) don't.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but does that explanation make sense to an end user? I don't think we've articulated the distinction...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, TBH I think we need to work on making it clearer, and its difficult for me to do when I'm in the nodes headspace. So, let's revisit that and see how users react? Added a note about functions/nodes, but let's see how users react when we're rewriting documentation.