v0.4.0rc1
Pre-release
Pre-release
This is the first release candidate for the v0.4.* release series.
The final release still requires some changes. For example, the documentation needs to be extended. But, the essential parts are already there, and it is time to collect some final feedback! Let me know what you think and what needs to be improved. You can comment in the discussion for this release #422.
To install the pre-release, use
$ pip install pytask --pre
$ conda install -c "conda-forge/label/pytask_rc" pytask
Now, let's take a look at the changes.
What's Changed
New
- Dependencies and products of tasks have new interfaces that are explained in this tutorial.
- You can also now declare products by allowing task functions to return. Follow this guide.
- If you have inputs to task functions that should be hashed to detect any changes, follow this guide.
- Before, only
pathlib.Path
s received special treatment as dependencies or products to task functions. Now, it is possible to define your own nodes that simplify, for example, loading pickle files as this guide explains. But many more extensions are possible, like defining data in an S3 bucket as a dependency or product. - The functional interface has been reworked and now accepts tasks directly, allowing you to execute pytask on the command line or in Jupyter notebooks. The documentation must still be written, but here is your starting point.
Removals
- Python 3.7 is no longer supported.
@pytask.mark.parametrize
is removed. Follow this tutorial instead.
Deprecations
@pytask.mark.depends_on
,@pytask.mark.produces
are deprecated and will be removed in v0.5.0.@pytask.mark.task
is deprecated. Use@pytask.task
instead.- Paths defined as strings are deprecated and should be replaced with proper
pathlib.Path
objects.
Full list of changes
- Remove Python 3.7 support and add a new action for mamba. by @tobiasraabe in #323
- Replace pony with sqlalchemy>=1.4.36. by @tobiasraabe in #387
- Remove
@pytask.mark.parametrize
. by @tobiasraabe in #391 - Parse dependencies from all args if
depends_on
is not used. by @tobiasraabe in #384 - Add products with
typing.Annotation
. by @tobiasraabe in #394 - Refactor pybaum to
_pytask.tree_util
. by @tobiasraabe in #395 - Replace pybaum with optree and add paths to PythonNode names. by @tobiasraabe in #396
- Add support for
NamedTuple
and attrs classes in@pytask.mark.task(kwargs=...)
. by @tobiasraabe in #397 - Deprecate decorators for
depends_on
andproduces
. by @tobiasraabe in #398 - Use protocols instead of ABCs. by @tobiasraabe in #402
- Allow tasks to return products. by @tobiasraabe in #404
- Tracking changes in v0.4.0. by @tobiasraabe in #400
- Bump peter-evans/create-pull-request from 5.0.1 to 5.0.2 by @dependabot in #390
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #388
- Allow to use prefix trees as nodes to parse function returns. by @tobiasraabe in #406
- Remove
.value
fromNode
protocol. by @tobiasraabe in #408 - Make
.from_annot
an optional feature of nodes. by @tobiasraabe in #409 - Allow to pass functions to
PythonNode(hash=...)
. by @tobiasraabe in #410 - Add protocols for tasks. by @tobiasraabe in #412
- Remove scripts to generate
.svg
s. by @tobiasraabe in #413 - Allow more ruff rules. by @tobiasraabe in #414
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #407
- A new functional interface. by @tobiasraabe in #411
- Deprecate
@pytask.mark.task
in favor of@pytask.task
. by @tobiasraabe in #417 - Simplify and fix code in
dag.py
. by @tobiasraabe in #418 - Convert
DeprecationWarning
toFutureWarning
for deprecated decorators. by @tobiasraabe in #420 - Remove deprecation warning for
produces
. by @tobiasraabe in #421 - Document new interface. by @tobiasraabe in #392
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #415
Full Changelog: v0.3.2...v0.4.0rc1