From b6de59d3cdb7b3a5a45daf5d763c1eb9f2a5cb1d Mon Sep 17 00:00:00 2001 From: Fabian Zills <46721498+PythonFZ@users.noreply.github.com> Date: Wed, 20 Nov 2024 11:19:43 +0100 Subject: [PATCH] update docs (#847) * update docs * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- 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..e9bbd1b7 100644 --- a/zntrack/__init__.py +++ b/zntrack/__init__.py @@ -1,3 +1,4 @@ +import importlib.metadata import logging import sys @@ -52,3 +53,5 @@ channel.setFormatter(formatter) logger.addHandler(channel) + +__version__ = importlib.metadata.version("zntrack")