-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
50 changed files
with
658 additions
and
1,483 deletions.
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
30 changes: 30 additions & 0 deletions
30
docs/source/explanations/interfaces_for_dependencies_products.md
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,30 @@ | ||
# Interfaces for dependencies and products | ||
|
||
There are different interfaces for dependencies and products and it might be confusing | ||
when to use what. The tables gives you an overview to decide which interface is most | ||
suitable for you. | ||
|
||
## Legend | ||
|
||
- ✅ = True | ||
- ❌ = False | ||
- ➖ = Does not apply | ||
|
||
## Products | ||
|
||
| | `Annotated[..., PNode, Product]` | `@task(produces=...)` | `produces` | `defd task() -> Annotated[..., PNode]` | `@pytask.mark.produces(...)` | | ||
| --------------------------------------------------------- | :------------------------------: | :-------------------: | :--------: | :------------------------------------: | :--------------------------: | | ||
| Not deprecated | ✅ | ✅ | ✅ | ✅ | ❌ | | ||
| No type annotations required | ❌ | ✅ | ✅ | ❌ | ✅ | | ||
| Flexible choice of argument name | ✅ | ✅ | ❌ | ➖ | ❌ | | ||
| Supports third-party functions as tasks | ❌ | ✅ | ❌ | ❌ | ❌ | | ||
| Allows to pass custom node while preserving type of value | ✅ | ✅ | ✅ | ✅ | ✅ | | ||
|
||
## Dependencies | ||
|
||
| | `Annotated[..., PNode]` | `@task(kwargs=...)` | `@pytask.mark.depends_on(...)` | | ||
| --------------------------------------- | :---------------------: | :-----------------: | :----------------------------: | | ||
| Not deprecated | ✅ | ✅ | ❌ | | ||
| No type annotations required | ❌ | ✅ | ✅ | | ||
| Flexible choice of argument name | ✅ | ✅ | ❌ | | ||
| Supports third-party functions as tasks | ❌ | ✅ | ❌ | |
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
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.