Skip to content

Commit

Permalink
ZnTrack v0.8 (#812)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix module and class

* somewhat fix names

* add some logging statements

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* basic node tests

* prepare more testing

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* improve on  testing

* remove and update files

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update order

* fix converter test

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix hardcoded

* use shared obj

* add `outs_path_no_cache`

* cache / no-cache testing: a

* refactor

* further refactoring

* fix

* test cache/no-cache

* ruff proj change

* small cleanup

* bugfix and add new test

* basic deps testing

* first draft for loading Nodes

* lazy loading start

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* remove main tests (to be introduced one by one later)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* save functions

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add cli, make workflow somewhat working

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* bring back integration tests

* add dev deps

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* test state

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* lazy evaluation testing

* add legacy tests

* add more tests, some still failing

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add `state.get_stage()` and `stage.get_stage_lock()`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add `get_stage_hash()`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add `ZnTrackOptionEnum`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* make it a DVCPlugin (part 1)

* small code cleanup

* move `save` to `plugins`

* move `save` functions to `plugins`

* add ABC for plugins

* use sentinel objects

* handle and test loading a node

* test node `repr`

* ruff

* mock `dataclass_transform` in older Python versions

* enable more tests

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update `NodeStatus` initalization

* test groups

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* use `typing_extensions`

* cleanup, using nested functions

* test metrics

* ruff

* support plugins via environmental variable

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add aim plugin

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* remove aim - issue in CI

* add log messages

* save name and module

* bugfix, test combinedconnections

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* bugfix

* move config file writing to the plugin as well

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix convert tests

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add `ZNTRACK_UNIQUE_OUTPUT_TYPE` info

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* bugfix: rename

* activate more tests

* add `test_dvc_params`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add `AIMPlugin.finalize()`

* handle repos without a remote

* add `path_to_aim`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* test outs and use `znjson`, fix aim test

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* set run experiment

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add `MLFlowPlugin`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* load env vars for finalize

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix logging metrics

* log run name and run id

* load env vars in post init

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update mlflow plugin

* first draft of plotting

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* strangest of issues

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix `run_cache` commit

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* test and raise errors for extend plots

* prepare for colab

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix `with project.group` (#816)

* fix groups

* ruff

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* integration testing

* test `getitem`, `iter`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* freeze group

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* rename file

* fix `state.name`

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* V08m example1 (#818)

* add project.repro

* make node subclasses kw only

* fix test using positionsl args

* adapt examples from main integration tests

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* removed old comment

* added build option to repro

* updated example tests

* [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>

* fix issue with group nwd (#819)

* fix files test

* fix group nwd

* it does not have to be pretty - it has to work

* add `config.NWD_PATH`

* fix `_extract_group_from_nwd`

* Cli test (#820)

* add project.repro

* make node subclasses kw only

* fix test using positionsl args

* adapt examples from main integration tests

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* removed old comment

* added build option to repro

* updated example tests

* sketch of add clit utils

* readded cli test

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* activate test

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Fabian Zills <fzills@icp.uni-stuttgart.de>

* Specify the outputs for each Node (#824)

* improve `node_to_output_paths`

* tests for all types of dependencies

* carry over remaining tests from main (#821)

* carry over remaining tests from main

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fixed test_node_node_getitem (#823)

* fixed test

* activate actual test

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: Fabian Zills <fzills@icp.uni-stuttgart.de>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* xfail mark

* mark all pending implementation tests

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix tests

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Fabian Zills <fzills@icp.uni-stuttgart.de>

* improve mlflow / aim experience (#826)

* improve mlflow / aim experience

* [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>

* bugfix `stage.name` attribute error

* test `NodeWithProperty` and nodes without outputs

* bugfix and better error messages

* use DVCFileSystem only if required and fix extend issue (#829)

* use DVCFileSystem only if required and fix extend issue

* fix tests?

* fix filesystem check test

* use cls default values where possible

* run_count fix (tests needed)

* support plot kwargs for `zntrack.plots` (#828)

* support nodes outside the graph context (#825)

* carry over remaining tests from main

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fixed test_node_node_getitem (#823)

* fixed test

* activate actual test

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: Fabian Zills <fzills@icp.uni-stuttgart.de>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* xfail mark

* mark all pending implementation tests

* add files test for nodes outside the graph

* add some TODOs

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add comment to describe feature on the main

* support `dataclass` for `zntrack.deps`

* update tests

* fix previous tests

* address comments

* update tests / fix iterables

* fix part

* do not use `part_x` key in params but rely on order

* add docs

* more docs

---------

Co-authored-by: Moritz R. Schäfer <schaefer@theochem.uni-stuttgart.de>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Moritz R Schäfer <moritz.schaefer@protonmail.com>

* merge `zntrack.apply` features from main (#831)

* merge `zntrack.apply` features from main

* files tests for apply

* remove invalid `name` key

* remove `name` to fix tests

* fix dataclass module changing in `deps` (#833)

* add `zntrack.json` path as parameter to `dvc.yaml`

* write to params instead using zntrack.json

* address comments

* fix DVC plotting (#834)

* fix DVC plotting

* fix missing `y` default and update file tests

* fix legacy tests (#835)

* restrict and test init

* remove tests for removed features (node outside graph)

* fix another test

* fix unsupported deps types (needs tests)

* test generic deps types

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* deprecate nodenotavail error

* fix remaining tests

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* self review

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix more tests

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix more tests

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix some more tests

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix restart tests

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* more tests

* [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>

* MLFlow and AIM support via plugins (#827)

* support for tags

* cache plugins (#830)

* bugfix and better error messages

* use DVCFileSystem only if required and fix extend issue (#829)

* use DVCFileSystem only if required and fix extend issue

* fix tests?

* fix filesystem check test

* use cls default values where possible

* run_count fix (tests needed)

* cache plugins

* cleanup

* rename to `increment_run_count`

* rename to `get_plugins_from_env`

* show plugins in `__repr__`

* save `run` in state

* don't use `repr` (this should not cause issues)

* fix load env vars and move improve mlflow finalize part

* move `tags` to run creation

* post commit

* run tests with mlflow

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* test mlflow in CI

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update lock

* try with options

* use custom docker image

* test with custom mlflow release package

* mlflow testing

* allow for context manager

* test / fix extend_plots with mlflow

* add todos for testing

* another TODO

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix URI

* test aim in CI

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add aim

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update test

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add description

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* more mlflow testing

* `test_project_tags`

* aim run fix

* test aim tags

* test plotting

* aim plugin with dataclasses deps

* support dataclass params for mlflow

* make a commit with `proj.finalize()`

* use prefix in mlflow from commit msg

* set some description fields (WIP)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add `always_changed`

* draft `MLFLOW_GIT_COMMIT`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* hide `always_changed` from `repr`

* fix xpassed

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* set pre-release version

* Pass `node.name` to another node in graph (#832)

* Pass `node.name` to another node in graph

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix name

* review

* add impossible test

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix try..finally block

* [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>

* add skipped tests (#836)

* add skipped tests

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* rename file to fix pytest collection

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* add mlflow description

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* allow using state rev `__mlflow_run_note__`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add `skip_cached` to mlflow plugin

* add `update_run_names` to mlflow plugin

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add `zntrack mlflow-sync`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix multiple plots

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* remove `print`

* plots autosave and pandas as main dependency

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* poetry update and new pre-release

* update first notebooks

* remove remote package import

* support python 3.13

* test python 3.13

* support empty y plots

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* disable temp path without rev or remote

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update autosave to use setter

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update rev tests, use submodule to make them available

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update mlflow-sync

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* nested and docs support

* prepare new pre-release

* use `envvar`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* remove xfail

* change order

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update znflow

* test post_init explicitly

* remove `_post_load_`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* manually install aim (because of restricted dependencies)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* retry aim install

* auto-skip aim tests

* fix tests

* remove extend_plots

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix aim/mlflow logging

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix aim test

* test custom module

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* better tmp_file test

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* remove varnames

* bit of external node testing

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add TODO

* use fs repo object

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* more remote tests

* add `zntrack.add`

* fix rerun issue (not tested!)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix hash including params

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update tests

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* rm os.chdir

* bump pre-release

* better tests for `zntrack.add`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* test dataclasses without parameters

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* test tuple outs

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* rename `options` to `fields`

* start refactoring plugin saving

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* move deps_path

* move `deps`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* transfer params

* account for outs and metrics

* move everything into fields module

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* move dump function to fields module

* do not use znjson for metrics

* rename to `ZNTRACK_FIELD_LOAD`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* include `ZNTRACK_FIELD_SUFFIX`

* use `ZNTRACK_FIELD_SUFFIX`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix `node_to_output_paths` for custom suffix

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* use `with_suffix`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix local remote path, insert sys path

* add test, add info to the docs

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* save h5 file instead of txt

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update field definition, expose and test (#846)

* update field definition, expose and test

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix tests

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* lock

* fix repr test

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* test custom fields

* review

* [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>

* do not run python 3.13 tests yet

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Moritz R Schäfer <moritz.schaefer@protonmail.com>
Co-authored-by: Moritz R. Schäfer <schaefer@theochem.uni-stuttgart.de>
  • Loading branch information
4 people authored Nov 20, 2024
1 parent d602167 commit 80019ce
Show file tree
Hide file tree
Showing 180 changed files with 11,825 additions and 8,456 deletions.
118 changes: 71 additions & 47 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,29 @@ jobs:
os:
- ubuntu-latest

services:
# Label used to access the service container
mlflow:
# Docker Hub image
image: pythonf/mlflow:v2.16.0
options: >-
--health-cmd="curl --fail http://localhost:5000/health || exit 1"
--health-interval=10s
--health-timeout=5s
--health-retries=5
ports:
- 5000:5000
aim:
# Docker Hub image
image: pythonf/aim:v3.24.0
options: >-
--health-cmd="curl --fail http://localhost:43800/status || exit 1"
--health-interval=10s
--health-timeout=5s
--health-retries=5
ports:
- 43800:43800

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -37,6 +60,7 @@ jobs:
virtualenvs-in-project: true
- name: Install package
run: |
poetry run pip install aim
poetry install --no-interaction
- name: Setup git user
run: |
Expand All @@ -60,51 +84,51 @@ jobs:
flags: fulltest
verbose: true

nbtest:
runs-on: ubuntu-latest
needs: [ pytest ]
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Install package
run: |
poetry install
- name: Setup git user
run: |
git config --global user.name "John Doe"
git config --global user.email johndoe@example.com
git config --global init.defaultBranch "main"
- name: Pytest
run: |
poetry run pytest --nbmake ./examples
# nbtest:
# runs-on: ubuntu-latest
# needs: [ pytest ]
# steps:
# - uses: actions/checkout@v2
# - name: Set up Python 3.11
# uses: actions/setup-python@v4
# with:
# python-version: "3.11"
# - name: Install Poetry
# uses: snok/install-poetry@v1
# with:
# virtualenvs-create: true
# virtualenvs-in-project: true
# - name: Install package
# run: |
# poetry install
# - name: Setup git user
# run: |
# git config --global user.name "John Doe"
# git config --global user.email johndoe@example.com
# git config --global init.defaultBranch "main"
# - name: Pytest
# run: |
# poetry run pytest --nbmake ./examples

doctest:
runs-on: ubuntu-latest
needs: [ pytest, nbtest ]
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Install package
run: |
sudo apt install pandoc
poetry install --with=docs
- name: Build documentation
run: |
cd ./docs
poetry run make html
# doctest:
# runs-on: ubuntu-latest
# needs: [ pytest, nbtest ]
# steps:
# - uses: actions/checkout@v2
# - name: Set up Python 3.11
# uses: actions/setup-python@v4
# with:
# python-version: "3.11"
# - name: Install Poetry
# uses: snok/install-poetry@v1
# with:
# virtualenvs-create: true
# virtualenvs-in-project: true
# - name: Install package
# run: |
# sudo apt install pandoc
# poetry install --with=docs
# - name: Build documentation
# run: |
# cd ./docs
# poetry run make html
183 changes: 168 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,170 @@
.vscode/
tmp/
/tests/basic/.git
/docs/build
.idea
PyTrack.egg-info
htmlcov
.coverage
venv
/build/
/dist/
/py_track.egg-info/
# Byte-compiled / optimized / DLL files
__pycache__/
.pymon
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints
_examples/
prof/

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
.pdm.toml
.pdm-python
.pdm-build/

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

tmp/
params.yaml
zntrack.json
dvc.yaml
.dvc
nodes/
.vscode/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "zntrack-examples"]
path = zntrack-examples
url = https://github.com/PythonFZ/zntrack-examples.git
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,20 +78,20 @@ print(hello_world.random_number)

> ## Tip
>
> You can easily load this Node directly from a repository.
> You can easily load a Node directly from a repository.
>
> ```python
> import zntrack
>
> node = zntrack.from_rev(
> "HelloWorld",
> remote="https://github.com/PythonFZ/ZnTrackExamples.git",
> rev="890c714",
> "ParamsToMetrics",
> remote="https://github.com/PythonFZ/zntrack-examples",
> rev="8d0c992"
> )
> ```
>
> Try accessing the `max_number` parameter and `random_number` output. All Nodes
> from this and many other repositories can be loaded like this.
> Try accessing the `params` parameter and `metrics` output. All Nodes from this
> and many other repositories can be loaded like this.
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/).
Expand Down
5 changes: 5 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ Welcome to ZnTrack, the first developer package from zincware <https://github.co
We're excited to have you on board!
ZnTrack is designed to simplify code sharing and reproducibility.

.. note::

This documentation has not been updated to the newest version of ZnTrack.
Features and changes in :code:`v0.8.0` and newer are not included in this documentation.

- :ref:`userdoc-get-started`
- :ref:`userdoc-examples`
- :ref:`userdoc-theory`
Expand Down
Loading

0 comments on commit 80019ce

Please sign in to comment.