From d25de137bd7df0e56d56964b5675bef0021d13c3 Mon Sep 17 00:00:00 2001 From: Fabian Zills Date: Wed, 20 Nov 2024 11:06:43 +0100 Subject: [PATCH 1/2] update docs --- docs/source/conf.py | 4 ++-- docs/source/index.rst | 19 +------------------ pyproject.toml | 2 +- zntrack/__init__.py | 3 +++ 4 files changed, 7 insertions(+), 21 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 76b25692..340bf5b3 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -12,8 +12,8 @@ sys.path.insert(0, os.path.abspath("..")) project = "ZnTrack" -copyright = "2023, zincwarecode " -author = "zincwarecode " +copyright = "2024, Fabian Zills" +author = "Fabian Zills" version = importlib.import_module("zntrack").__version__ # -- General configuration --------------------------------------------------- diff --git a/docs/source/index.rst b/docs/source/index.rst index 0be1183e..3ba9b95a 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -71,24 +71,7 @@ Class based Node with zntrack.Project() as project: node = AddNumbers(number1=10, number2=20) - project.run() - - -Function based Node -------------------- - .. code-block:: python - - import zntrack - - @zntrack.nodify(outs="number.txt", params={"number1": 10, "number2": 20}) - def add_numbers(cfg: zntrack.NodeConfig): - with open(cfg.outs) as file: - file.write(str(cfg.params.number1 + cfg.params.number2)) - - with zntrack.Project() as project: - node = add_numbers() - - project.run() + project.repro() .. toctree:: diff --git a/pyproject.toml b/pyproject.toml index c26c684e..f46a617f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "zntrack" -version = "0.8.0a7" +version = "0.8.0a8" description = "Create, Run and Benchmark DVC Pipelines in Python" authors = ["zincwarecode "] license = "Apache-2.0" diff --git a/zntrack/__init__.py b/zntrack/__init__.py index 82495886..835fafdc 100644 --- a/zntrack/__init__.py +++ b/zntrack/__init__.py @@ -1,5 +1,6 @@ import logging import sys +import importlib.metadata from zntrack.add import add from zntrack.apply import apply @@ -52,3 +53,5 @@ channel.setFormatter(formatter) logger.addHandler(channel) + +__version__ = importlib.metadata.version("zntrack") \ No newline at end of file From c37990a4aa41209d22b3565437f0539027c3beca Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 20 Nov 2024 10:07:07 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- zntrack/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zntrack/__init__.py b/zntrack/__init__.py index 835fafdc..e9bbd1b7 100644 --- a/zntrack/__init__.py +++ b/zntrack/__init__.py @@ -1,6 +1,6 @@ +import importlib.metadata import logging import sys -import importlib.metadata from zntrack.add import add from zntrack.apply import apply @@ -54,4 +54,4 @@ logger.addHandler(channel) -__version__ = importlib.metadata.version("zntrack") \ No newline at end of file +__version__ = importlib.metadata.version("zntrack")