py-modelrunner 0.20.2__tar.gz → 0.20.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/.github/workflows/build.yml +8 -3
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/.github/workflows/check_docs.yml +1 -1
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/.github/workflows/coverage_report.yml +12 -4
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/.github/workflows/release_pip.yml +2 -2
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/PKG-INFO +3 -3
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/_version.py +3 -3
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/storage/backend/_zarr2.py +26 -1
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/storage/backend/text_base.py +6 -2
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/storage/base.py +0 -23
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/storage/trajectory.py +0 -1
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/py_modelrunner.egg-info/PKG-INFO +3 -3
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/py_modelrunner.egg-info/SOURCES.txt +1 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/py_modelrunner.egg-info/requires.txt +0 -1
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/py_modelrunner.egg-info/scm_file_list.json +1 -0
- py_modelrunner-0.20.4/py_modelrunner.egg-info/scm_version.json +8 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/pyproject.toml +2 -2
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/requirements.txt +1 -2
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/test_compatibility.py +4 -2
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/helpers/storage.py +1 -5
- py_modelrunner-0.20.4/tests/requirements.txt +4 -0
- py_modelrunner-0.20.4/tests/run/test_integration.py +48 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/storage/test_storage_generic.py +14 -11
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/test_examples.py +1 -2
- py_modelrunner-0.20.2/py_modelrunner.egg-info/scm_version.json +0 -8
- py_modelrunner-0.20.2/tests/requirements.txt +0 -4
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/.gitignore +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/.readthedocs.yaml +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/LICENSE +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/README.md +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/docs/Makefile +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/docs/build_all.sh +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/docs/requirements.txt +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/docs/source/.gitignore +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/docs/source/conf.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/docs/source/examples.rst +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/docs/source/index.rst +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/docs/source/installation.rst +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/docs/source/parse_examples.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/docs/source/run_autodoc.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/docs/source/sphinx_simplify_typehints.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/docs/source/user_manual.rst +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/examples/io_hdf.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/examples/io_json.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/examples/io_yaml.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/examples/model_class.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/examples/model_decorator.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/examples/model_function.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/examples/model_storage_output.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/examples/read_many.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/examples/script_custom_func.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/examples/script_function.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/examples/script_many_classes.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/examples/script_minimal.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/examples/script_model_class.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/examples/submit_function.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/examples/submit_many_func.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/examples/submit_many_iter.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/examples/submit_shebang.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/.gitignore +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/__init__.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/__main__.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/config.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/model/__init__.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/model/base.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/model/factory.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/model/parameters.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/py.typed +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/run/__init__.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/run/__main__.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/run/compatibility/__init__.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/run/compatibility/triage.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/run/compatibility/version0.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/run/compatibility/version1.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/run/compatibility/version2.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/run/job.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/run/launch.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/run/results.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/run/templates/background.jinja +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/run/templates/foreground.jinja +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/run/templates/qsub.jinja +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/run/templates/sbatch.jinja +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/run/templates/srun.jinja +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/storage/__init__.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/storage/access_modes.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/storage/attributes.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/storage/backend/__init__.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/storage/backend/_zarr3.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/storage/backend/hdf.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/storage/backend/json.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/storage/backend/memory.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/storage/backend/utils.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/storage/backend/yaml.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/storage/backend/zarr.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/storage/group.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/storage/tools.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/storage/utils.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/modelrunner/utils.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/py_modelrunner.egg-info/dependency_links.txt +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/py_modelrunner.egg-info/not-zip-safe +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/py_modelrunner.egg-info/top_level.txt +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/requirements_full.txt +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/scripts/create_compatibility_files.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/scripts/format_code.sh +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/scripts/performance_hdf5_zarr.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/scripts/requirements.txt +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/scripts/run_tests.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/scripts/tests_all.sh +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/scripts/tests_codestyle.sh +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/scripts/tests_coverage.sh +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/scripts/tests_debug.sh +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/scripts/tests_parallel.sh +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/scripts/tests_run.sh +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/scripts/tests_types.sh +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/setup.cfg +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/0/result.hdf +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/0/result.json +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/0/result.pkl +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/0/result.yaml +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/1/_dict.zarr +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/1/_object.zarr +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/1/array.json +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/1/array.pkl +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/1/array.yaml +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/1/array.zarr +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/1/array_col.json +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/1/array_col.pkl +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/1/array_col.yaml +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/1/array_col.zarr +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/1/dict.json +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/1/dict.pkl +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/1/dict.yaml +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/1/object.json +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/1/object.pkl +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/1/object.yaml +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/2/array.hdf +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/2/array.json +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/2/array.pkl +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/2/array.yaml +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/2/array.zip +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/2/array_col.hdf +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/2/array_col.json +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/2/array_col.pkl +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/2/array_col.yaml +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/2/array_col.zip +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/2/dict.hdf +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/2/dict.json +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/2/dict.pkl +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/2/dict.yaml +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/2/dict.zip +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/2/nested.hdf +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/2/nested.json +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/2/nested.pkl +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/2/nested.yaml +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/2/nested.zip +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/array.hdf +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/array.json +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/array.pkl +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/array.yaml +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/array.zip +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/array_col.hdf +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/array_col.json +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/array_col.pkl +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/array_col.yaml +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/array_col.zip +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/dict.hdf +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/dict.json +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/dict.pkl +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/dict.yaml +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/dict.zip +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/model_array.hdf +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/model_array.json +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/model_array.pkl +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/model_array.yaml +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/model_array.zip +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/model_array_col.hdf +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/model_array_col.json +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/model_array_col.pkl +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/model_array_col.yaml +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/model_array_col.zip +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/model_dict.hdf +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/model_dict.json +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/model_dict.pkl +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/model_dict.yaml +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/model_dict.zip +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/model_nested.hdf +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/model_nested.json +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/model_nested.pkl +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/model_nested.yaml +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/model_nested.zip +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/nested.hdf +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/nested.json +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/nested.pkl +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/nested.yaml +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/compatibility/3/nested.zip +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/conftest.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/helpers/__init__.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/helpers/asserts.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/model/scripts/empty.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/model/scripts/function.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/model/scripts/function_main.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/model/scripts/function_marked.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/model/scripts/make_model.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/model/scripts/make_model_class.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/model/scripts/make_model_marked.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/model/test_model.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/model/test_parameters.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/run/scripts/custom.jinja +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/run/scripts/fail.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/run/scripts/function.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/run/scripts/print.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/run/scripts/script.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/run/test_job.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/run/test_results.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/run/test_run_main.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/storage/test_group.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/storage/test_register_action.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/storage/test_storage_special.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/storage/test_trajectory.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/storage/test_utils.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/test_config.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/test_main.py +0 -0
- {py_modelrunner-0.20.2 → py_modelrunner-0.20.4}/tests/test_version.py +0 -0
|
@@ -9,20 +9,25 @@ jobs:
|
|
|
9
9
|
strategy:
|
|
10
10
|
matrix:
|
|
11
11
|
os: [macos-latest, ubuntu-latest, windows-latest]
|
|
12
|
-
python-version: ['3.12', '3.
|
|
12
|
+
python-version: ['3.12', '3.15']
|
|
13
13
|
|
|
14
14
|
steps:
|
|
15
|
-
- uses: actions/checkout@
|
|
15
|
+
- uses: actions/checkout@v7
|
|
16
16
|
|
|
17
17
|
- name: Set up Python ${{ matrix.python-version }}
|
|
18
|
-
uses: actions/setup-python@
|
|
18
|
+
uses: actions/setup-python@v7
|
|
19
19
|
with:
|
|
20
20
|
python-version: ${{ matrix.python-version }}
|
|
21
21
|
|
|
22
22
|
- name: Install dependencies
|
|
23
|
+
# install all requirements. Note that the full requirements are installed separately
|
|
24
|
+
# so the job does not fail if one of the packages cannot be installed. This allows
|
|
25
|
+
# testing the package for newer python version even when some of the optional
|
|
26
|
+
# packages are not yet available.
|
|
23
27
|
run: |
|
|
24
28
|
python -m pip install --upgrade pip
|
|
25
29
|
pip install -r requirements.txt
|
|
30
|
+
cat requirements_full.txt | sed -e '/^\s*#.*$/d' -e '/^\s*$/d' | xargs -I % sh -c "pip install % || true"
|
|
26
31
|
pip install -r tests/requirements.txt
|
|
27
32
|
|
|
28
33
|
- name: Install optional dependencies
|
|
@@ -11,25 +11,33 @@ jobs:
|
|
|
11
11
|
python-version: [3.12]
|
|
12
12
|
|
|
13
13
|
steps:
|
|
14
|
-
- uses: actions/checkout@
|
|
14
|
+
- uses: actions/checkout@v7
|
|
15
|
+
|
|
15
16
|
- name: Set up Python ${{ matrix.python-version }}
|
|
16
|
-
uses: actions/setup-python@
|
|
17
|
+
uses: actions/setup-python@v7
|
|
17
18
|
with:
|
|
18
19
|
python-version: ${{ matrix.python-version }}
|
|
20
|
+
|
|
19
21
|
- name: Install dependencies
|
|
22
|
+
# install all requirements. Note that the full requirements are installed separately
|
|
23
|
+
# so the job does not fail if one of the packages cannot be installed. This allows
|
|
24
|
+
# testing the package for newer python version even when some of the optional
|
|
25
|
+
# packages are not yet available.
|
|
20
26
|
run: |
|
|
21
27
|
python -m pip install --upgrade pip
|
|
22
28
|
pip install -r requirements.txt
|
|
29
|
+
cat requirements_full.txt | sed -e '/^\s*#.*$/d' -e '/^\s*$/d' | xargs -I % sh -c "pip install % || true"
|
|
23
30
|
pip install -r tests/requirements.txt
|
|
24
31
|
|
|
25
32
|
- name: Generate coverage report
|
|
33
|
+
env:
|
|
34
|
+
MPLBACKEND: agg
|
|
26
35
|
run: |
|
|
27
|
-
export MPLBACKEND="agg"
|
|
28
36
|
export PYTHONPATH="${PYTHONPATH}:`pwd`"
|
|
29
37
|
pytest --cov-config=pyproject.toml --cov-report xml:report_coverage.xml --cov=modelrunner tests/
|
|
30
38
|
|
|
31
39
|
- name: Upload coverage to Codecov
|
|
32
|
-
uses: codecov/codecov-action@
|
|
40
|
+
uses: codecov/codecov-action@v7
|
|
33
41
|
with:
|
|
34
42
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
35
43
|
file: ./report_coverage.xml
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: py-modelrunner
|
|
3
|
-
Version: 0.20.
|
|
3
|
+
Version: 0.20.4
|
|
4
4
|
Summary: Python classes for organizing (HPC) simulations
|
|
5
5
|
Author-email: David Zwicker <david.zwicker@ds.mpg.de>
|
|
6
6
|
License: MIT
|
|
@@ -18,13 +18,13 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.12
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.13
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.14
|
|
21
|
-
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
22
|
+
Requires-Python: <3.16,>=3.11
|
|
22
23
|
Description-Content-Type: text/markdown
|
|
23
24
|
License-File: LICENSE
|
|
24
25
|
Requires-Dist: jinja2>=3
|
|
25
26
|
Requires-Dist: numpy>=1.18.0
|
|
26
27
|
Requires-Dist: tqdm>=4.45
|
|
27
|
-
Requires-Dist: numcodecs>=0.16
|
|
28
28
|
Provides-Extra: all
|
|
29
29
|
Requires-Dist: h5py>=3.5; extra == "all"
|
|
30
30
|
Requires-Dist: pandas>=1.3; extra == "all"
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '0.20.
|
|
22
|
-
__version_tuple__ = version_tuple = (0, 20,
|
|
21
|
+
__version__ = version = '0.20.4'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 20, 4)
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'gb63a756d6'
|
|
@@ -10,8 +10,9 @@ from __future__ import annotations
|
|
|
10
10
|
import shutil
|
|
11
11
|
from collections.abc import Collection, Sequence
|
|
12
12
|
from pathlib import Path
|
|
13
|
-
from typing import Any
|
|
13
|
+
from typing import Any
|
|
14
14
|
|
|
15
|
+
import numcodecs
|
|
15
16
|
import numpy as np
|
|
16
17
|
import zarr
|
|
17
18
|
from numpy.typing import ArrayLike, DTypeLike
|
|
@@ -25,6 +26,10 @@ from ..access_modes import ModeType
|
|
|
25
26
|
from ..attributes import AttrsLike
|
|
26
27
|
from ..base import StorageBase
|
|
27
28
|
|
|
29
|
+
# we allow unpickling since we otherwise cannot store arbitrary Python objects
|
|
30
|
+
numcodecs.pickles.ALLOW_UNSAFE_PICKLE_DECODE = True
|
|
31
|
+
|
|
32
|
+
|
|
28
33
|
zarrElement = zarr.Group | zarr.Array
|
|
29
34
|
|
|
30
35
|
|
|
@@ -33,6 +38,11 @@ class ZarrStorage(StorageBase):
|
|
|
33
38
|
|
|
34
39
|
extensions = ["zarr", "zip", "sqldb", "lmdb"]
|
|
35
40
|
|
|
41
|
+
default_codec = numcodecs.Pickle()
|
|
42
|
+
""":class:`numcodecs.Codec`: the default codec used for encoding binary data."""
|
|
43
|
+
_codec: numcodecs.abc.Codec
|
|
44
|
+
""":class:`numcodecs.Codec`: the specific codec used for encoding binary data."""
|
|
45
|
+
|
|
36
46
|
def __init__(self, store_or_path: str | Path | Store, *, mode: ModeType = "read"):
|
|
37
47
|
"""
|
|
38
48
|
Args:
|
|
@@ -93,6 +103,21 @@ class ZarrStorage(StorageBase):
|
|
|
93
103
|
|
|
94
104
|
self._root = zarr.group(store=self._store, overwrite=False)
|
|
95
105
|
|
|
106
|
+
@property
|
|
107
|
+
def codec(self) -> numcodecs.abc.Codec:
|
|
108
|
+
""":class:`~numcodecs.abc.Codec`: A codec used to encode binary data."""
|
|
109
|
+
try:
|
|
110
|
+
return self._codec
|
|
111
|
+
except AttributeError:
|
|
112
|
+
attrs = self._read_attrs([])
|
|
113
|
+
if "__codec__" in attrs:
|
|
114
|
+
self._codec = numcodecs.get_codec(attrs["__codec__"])
|
|
115
|
+
else:
|
|
116
|
+
self._codec = self.default_codec
|
|
117
|
+
if self.mode.set_attrs:
|
|
118
|
+
self._write_attr([], "__codec__", self._codec.get_config())
|
|
119
|
+
return self._codec
|
|
120
|
+
|
|
96
121
|
@property
|
|
97
122
|
def can_update(self) -> bool:
|
|
98
123
|
"""bool: indicates whether the storage supports updating items"""
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
7
|
+
import base64
|
|
7
8
|
import io
|
|
9
|
+
import pickle
|
|
8
10
|
from abc import ABCMeta, abstractmethod
|
|
9
11
|
from collections.abc import Sequence
|
|
10
12
|
from io import StringIO
|
|
@@ -210,9 +212,11 @@ class TextStorageBase(MemoryStorage, metaclass=ABCMeta):
|
|
|
210
212
|
self._modified = True
|
|
211
213
|
|
|
212
214
|
def _read_object(self, loc: Sequence[str]) -> Any:
|
|
213
|
-
|
|
215
|
+
data = self[loc]["data"]
|
|
216
|
+
return pickle.loads(data)
|
|
214
217
|
|
|
215
218
|
def _write_object(self, loc: Sequence[str], obj: Any) -> None:
|
|
216
219
|
parent, name = self._get_parent(loc, check_write=True)
|
|
217
|
-
|
|
220
|
+
data = pickle.dumps(obj, protocol=pickle.HIGHEST_PROTOCOL)
|
|
221
|
+
parent[name] = {"data": data}
|
|
218
222
|
self._modified = True
|
|
@@ -27,7 +27,6 @@ from abc import ABCMeta, abstractmethod
|
|
|
27
27
|
from collections.abc import Collection, Sequence
|
|
28
28
|
from typing import TYPE_CHECKING, Any, Literal
|
|
29
29
|
|
|
30
|
-
import numcodecs
|
|
31
30
|
import numpy as np
|
|
32
31
|
from numpy.typing import ArrayLike, DTypeLike
|
|
33
32
|
|
|
@@ -39,9 +38,6 @@ if TYPE_CHECKING:
|
|
|
39
38
|
from .group import StorageGroup
|
|
40
39
|
|
|
41
40
|
|
|
42
|
-
# we allow unpickling since we otherwise cannot store arbitrary Python objects
|
|
43
|
-
numcodecs.pickles.ALLOW_UNSAFE_PICKLE_DECODE = True
|
|
44
|
-
|
|
45
41
|
_base_logger = logging.getLogger(__name__.rsplit(".", 1)[0])
|
|
46
42
|
""":class:`logging.Logger`: Base logger for fields."""
|
|
47
43
|
|
|
@@ -51,13 +47,9 @@ class StorageBase(metaclass=ABCMeta):
|
|
|
51
47
|
|
|
52
48
|
extensions: list[str] = []
|
|
53
49
|
"""list of str: all file extensions supported by this storage"""
|
|
54
|
-
default_codec = numcodecs.Pickle()
|
|
55
|
-
""":class:`numcodecs.Codec`: the default codec used for encoding binary data."""
|
|
56
50
|
mode: AccessMode
|
|
57
51
|
""":class:`~modelrunner.storage.access_modes.AccessMode`: access mode."""
|
|
58
52
|
|
|
59
|
-
_codec: numcodecs.abc.Codec
|
|
60
|
-
""":class:`numcodecs.Codec`: the specific codec used for encoding binary data."""
|
|
61
53
|
_logger: logging.Logger # logger instance to output information
|
|
62
54
|
|
|
63
55
|
def __init__(self, *, mode: ModeType = "read"):
|
|
@@ -93,21 +85,6 @@ class StorageBase(metaclass=ABCMeta):
|
|
|
93
85
|
def flush(self) -> None:
|
|
94
86
|
"""Write (cached) data to storage."""
|
|
95
87
|
|
|
96
|
-
@property
|
|
97
|
-
def codec(self) -> numcodecs.abc.Codec:
|
|
98
|
-
""":class:`~numcodecs.abc.Codec`: A codec used to encode binary data."""
|
|
99
|
-
try:
|
|
100
|
-
return self._codec
|
|
101
|
-
except AttributeError:
|
|
102
|
-
attrs = self._read_attrs([])
|
|
103
|
-
if "__codec__" in attrs:
|
|
104
|
-
self._codec = numcodecs.get_codec(attrs["__codec__"])
|
|
105
|
-
else:
|
|
106
|
-
self._codec = self.default_codec
|
|
107
|
-
if self.mode.set_attrs:
|
|
108
|
-
self._write_attr([], "__codec__", self._codec.get_config())
|
|
109
|
-
return self._codec
|
|
110
|
-
|
|
111
88
|
@abstractmethod
|
|
112
89
|
def keys(self, loc: Sequence[str]) -> Collection[str]:
|
|
113
90
|
"""Return all sub-items defined at a given location.
|
|
@@ -18,7 +18,6 @@ from typing import Any, Literal
|
|
|
18
18
|
import numpy as np
|
|
19
19
|
|
|
20
20
|
from .access_modes import AccessError, ModeType
|
|
21
|
-
from .base import StorageBase
|
|
22
21
|
from .group import StorageGroup
|
|
23
22
|
from .tools import StorageID, open_storage
|
|
24
23
|
from .utils import Location, storage_actions
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: py-modelrunner
|
|
3
|
-
Version: 0.20.
|
|
3
|
+
Version: 0.20.4
|
|
4
4
|
Summary: Python classes for organizing (HPC) simulations
|
|
5
5
|
Author-email: David Zwicker <david.zwicker@ds.mpg.de>
|
|
6
6
|
License: MIT
|
|
@@ -18,13 +18,13 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.12
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.13
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.14
|
|
21
|
-
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
22
|
+
Requires-Python: <3.16,>=3.11
|
|
22
23
|
Description-Content-Type: text/markdown
|
|
23
24
|
License-File: LICENSE
|
|
24
25
|
Requires-Dist: jinja2>=3
|
|
25
26
|
Requires-Dist: numpy>=1.18.0
|
|
26
27
|
Requires-Dist: tqdm>=4.45
|
|
27
|
-
Requires-Dist: numcodecs>=0.16
|
|
28
28
|
Provides-Extra: all
|
|
29
29
|
Requires-Dist: h5py>=3.5; extra == "all"
|
|
30
30
|
Requires-Dist: pandas>=1.3; extra == "all"
|
|
@@ -201,6 +201,7 @@ tests/model/scripts/function_marked.py
|
|
|
201
201
|
tests/model/scripts/make_model.py
|
|
202
202
|
tests/model/scripts/make_model_class.py
|
|
203
203
|
tests/model/scripts/make_model_marked.py
|
|
204
|
+
tests/run/test_integration.py
|
|
204
205
|
tests/run/test_job.py
|
|
205
206
|
tests/run/test_results.py
|
|
206
207
|
tests/run/test_run_main.py
|
|
@@ -6,7 +6,7 @@ authors = [
|
|
|
6
6
|
]
|
|
7
7
|
license = {text = "MIT"}
|
|
8
8
|
readme = "README.md"
|
|
9
|
-
requires-python = ">=3.11,<3.
|
|
9
|
+
requires-python = ">=3.11,<3.16"
|
|
10
10
|
dynamic = ["version"]
|
|
11
11
|
|
|
12
12
|
classifiers = [
|
|
@@ -21,6 +21,7 @@ classifiers = [
|
|
|
21
21
|
"Programming Language :: Python :: 3.12",
|
|
22
22
|
"Programming Language :: Python :: 3.13",
|
|
23
23
|
"Programming Language :: Python :: 3.14",
|
|
24
|
+
"Programming Language :: Python :: 3.15",
|
|
24
25
|
]
|
|
25
26
|
|
|
26
27
|
# Requirements for setuptools
|
|
@@ -28,7 +29,6 @@ dependencies = [
|
|
|
28
29
|
"jinja2>=3",
|
|
29
30
|
"numpy>=1.18.0",
|
|
30
31
|
"tqdm>=4.45",
|
|
31
|
-
"numcodecs>=0.16",
|
|
32
32
|
]
|
|
33
33
|
|
|
34
34
|
[project.optional-dependencies]
|
|
@@ -7,7 +7,7 @@ from pathlib import Path
|
|
|
7
7
|
|
|
8
8
|
import pytest
|
|
9
9
|
|
|
10
|
-
from helpers import assert_data_equals
|
|
10
|
+
from helpers import assert_data_equals, module_available
|
|
11
11
|
from modelrunner import Result
|
|
12
12
|
|
|
13
13
|
CWD = Path(__file__).parent.resolve()
|
|
@@ -26,11 +26,13 @@ def get_compatibility_files(version=None):
|
|
|
26
26
|
yield path
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
@pytest.mark.parametrize("path", get_compatibility_files())
|
|
29
|
+
@pytest.mark.parametrize("path", list(get_compatibility_files()))
|
|
30
30
|
def test_reading_compatibility(path):
|
|
31
31
|
"""Test reading old files."""
|
|
32
32
|
if path.suffix == ".zip":
|
|
33
33
|
pytest.skip("Zip files are not properly supported anymore")
|
|
34
|
+
if not module_available("zarr") and path.suffix == ".zarr":
|
|
35
|
+
pytest.skip("zarr is not available, so we skip the test")
|
|
34
36
|
result = Result.from_file(path)
|
|
35
37
|
|
|
36
38
|
with path.with_suffix(".pkl").open("rb") as fp:
|
|
@@ -7,11 +7,7 @@ from __future__ import annotations
|
|
|
7
7
|
|
|
8
8
|
import importlib
|
|
9
9
|
from collections.abc import Callable
|
|
10
|
-
from typing import Any,
|
|
11
|
-
|
|
12
|
-
import numpy as np
|
|
13
|
-
|
|
14
|
-
from modelrunner.storage.backend.zarr import zarr_version
|
|
10
|
+
from typing import Any, TypeVar
|
|
15
11
|
|
|
16
12
|
TFunc = TypeVar("TFunc", bound=Callable[..., Any])
|
|
17
13
|
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"""
|
|
2
|
+
.. codeauthor:: David Zwicker <david.zwicker@ds.mpg.de>
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
import platform
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
|
|
8
|
+
import pytest
|
|
9
|
+
|
|
10
|
+
import modelrunner as mr
|
|
11
|
+
|
|
12
|
+
SCRIPT_PATH = Path(__file__).parent / "scripts"
|
|
13
|
+
assert SCRIPT_PATH.is_dir()
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@pytest.mark.skipif(
|
|
17
|
+
platform.system() == "Windows", reason="submit_jobs has issues on windows"
|
|
18
|
+
)
|
|
19
|
+
def test_modelrunner_storage_many(tmp_path):
|
|
20
|
+
"""Test how modelrunner storage can be used."""
|
|
21
|
+
num_jobs = mr.submit_jobs(
|
|
22
|
+
SCRIPT_PATH / "function.py",
|
|
23
|
+
output_folder=tmp_path,
|
|
24
|
+
parameters={"a": 3.0, "b": [1.5, 2.5]},
|
|
25
|
+
log_folder=tmp_path,
|
|
26
|
+
method="foreground",
|
|
27
|
+
overwrite_strategy="error",
|
|
28
|
+
)
|
|
29
|
+
assert num_jobs == 2
|
|
30
|
+
|
|
31
|
+
# read storage manually
|
|
32
|
+
for path in tmp_path.iterdir():
|
|
33
|
+
if path.is_file() and not path.name.endswith("txt"):
|
|
34
|
+
with mr.open_storage(path, mode="read") as storage:
|
|
35
|
+
assert "result" in storage
|
|
36
|
+
assert storage["result"]["a"] == 3.0
|
|
37
|
+
assert storage["result"]["b"] in [1.5, 2.5]
|
|
38
|
+
|
|
39
|
+
# read result using ResultCollection
|
|
40
|
+
results = mr.ResultCollection.from_folder(tmp_path)
|
|
41
|
+
assert len(results) == num_jobs
|
|
42
|
+
for result in results:
|
|
43
|
+
assert result.result["a"] == 3.0
|
|
44
|
+
assert result.result["b"] in [1.5, 2.5]
|
|
45
|
+
|
|
46
|
+
# delete temporary files
|
|
47
|
+
for path in tmp_path.iterdir():
|
|
48
|
+
path.unlink()
|
|
@@ -7,7 +7,6 @@ import pytest
|
|
|
7
7
|
|
|
8
8
|
from helpers import STORAGE_EXT, STORAGE_OBJECTS, assert_data_equals
|
|
9
9
|
from modelrunner.storage import AccessError, open_storage
|
|
10
|
-
from modelrunner.storage.backend.zarr import zarr_version
|
|
11
10
|
|
|
12
11
|
OBJ = {"a": 1, "b": [1, 2, 3]}
|
|
13
12
|
ARRAY_EXAMPLES = [
|
|
@@ -16,16 +15,20 @@ ARRAY_EXAMPLES = [
|
|
|
16
15
|
]
|
|
17
16
|
|
|
18
17
|
|
|
19
|
-
STORAGE_CLASSES = {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
18
|
+
STORAGE_CLASSES = {"json": "JSONStorage", "yaml": "YAMLStorage", "hdf": "HDFStorage"}
|
|
19
|
+
|
|
20
|
+
try:
|
|
21
|
+
import zarr
|
|
22
|
+
except ImportError:
|
|
23
|
+
pass # zarr is not available
|
|
24
|
+
else:
|
|
25
|
+
# add the zarr storage classes
|
|
26
|
+
from modelrunner.storage.backend.zarr import zarr_version
|
|
27
|
+
|
|
28
|
+
STORAGE_CLASSES |= {"zarr": "ZarrStorage", "zip": "ZarrStorage", "": "ZarrStorage"}
|
|
29
|
+
|
|
30
|
+
if zarr_version == 2:
|
|
31
|
+
STORAGE_CLASSES["sqldb"] = "ZarrStorage"
|
|
29
32
|
|
|
30
33
|
|
|
31
34
|
@pytest.mark.parametrize("ext", STORAGE_EXT)
|
|
@@ -14,9 +14,8 @@ EXAMPLE_PATH = PACKAGEPATH / "examples"
|
|
|
14
14
|
assert EXAMPLE_PATH.is_dir()
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
@pytest.mark.no_cover
|
|
18
17
|
@pytest.mark.skipif(sys.platform == "win32", reason="Assumes unix setup")
|
|
19
|
-
@pytest.mark.parametrize("path", EXAMPLE_PATH.glob("*.py"))
|
|
18
|
+
@pytest.mark.parametrize("path", list(EXAMPLE_PATH.glob("*.py")))
|
|
20
19
|
def test_examples(path, tmp_path):
|
|
21
20
|
"""Runs an example script given by path."""
|
|
22
21
|
# prepare environment
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|