diff --git a/README.md b/README.md index 695909d1..a4bd8421 100644 --- a/README.md +++ b/README.md @@ -96,34 +96,6 @@ print(hello_world.random_number) An overview of all the ZnTrack features as well as more detailed examples can be found in the [ZnTrack Documentation](https://zntrack.readthedocs.io/en/latest/). -## Wrap Python Functions - -ZnTrack also provides tools to convert a Python function into a DVC Node. This -approach is much more lightweight compared to the class-based approach with only -a reduced set of functionality. Therefore, it is recommended for smaller nodes -that do not need the additional toolset that the class-based approach provides. - -```python -from zntrack import nodify, NodeConfig -import pathlib - -@nodify(outs=pathlib.Path("text.txt"), params={"text": "Lorem Ipsum"}) -def write_text(cfg: NodeConfig): - cfg.outs.write_text( - cfg.params.text - ) -# build the DVC graph -with zntrack.Project() as project: - write_text() -project.run() -``` - -The `cfg` dataclass passed to the function provides access to all configured -files and parameters via [dot4dict](https://github.com/zincware/dot4dict). The -function body will be executed by the `dvc repro` command or if ran via -`write_text(run=True)`. All parameters are loaded from or stored in -`params.yaml`. - # Technical Details ## ZnTrack as an Object-Relational Mapping for DVC