h5rdmtoolbox 2.8.2__tar.gz → 2.8.3__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.
- h5rdmtoolbox-2.8.3/MANIFEST.in +3 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/PKG-INFO +146 -12
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/README.md +139 -11
- h5rdmtoolbox-2.8.3/_build.py +16 -0
- h5rdmtoolbox-2.8.3/codemeta.json +60 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/__init__.py +18 -15
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/_cfg.py +14 -7
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/_repr.py +4 -2
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/convention/core.py +22 -5
- h5rdmtoolbox-2.8.3/h5rdmtoolbox/convention/html/template.html +17 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/ld/__init__.py +1 -16
- h5rdmtoolbox-2.8.3/h5rdmtoolbox/ld/_rdf_storage.py +65 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/ld/rdf.py +78 -152
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/ld/shacl.py +2 -1
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/ld/utils.py +10 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/utils/download.py +12 -10
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/utils/file_io.py +3 -2
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/utils/hdf5.py +3 -2
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/wrapper/core.py +3 -19
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/wrapper/ds_decoder.py +7 -4
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/wrapper/h5attr.py +10 -5
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox.egg-info/PKG-INFO +146 -12
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox.egg-info/SOURCES.txt +10 -13
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox.egg-info/requires.txt +7 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/pyproject.toml +14 -2
- h5rdmtoolbox-2.8.3/tests/test_ci_policy.py +80 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/tests/test_config.py +58 -0
- h5rdmtoolbox-2.8.3/tests/test_distribution.py +70 -0
- h5rdmtoolbox-2.8.3/tests/test_integration_policy.py +38 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/tests/test_server.py +11 -91
- h5rdmtoolbox-2.8.3/tests/test_server_policy.py +64 -0
- h5rdmtoolbox-2.8.3/tests/test_startup.py +58 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/tests/test_version.py +81 -78
- h5rdmtoolbox-2.8.2/h5rdmtoolbox/llm/__init__.py +0 -15
- h5rdmtoolbox-2.8.2/h5rdmtoolbox/llm/chat.py +0 -340
- h5rdmtoolbox-2.8.2/h5rdmtoolbox/llm/errors.py +0 -22
- h5rdmtoolbox-2.8.2/h5rdmtoolbox/llm/executor.py +0 -56
- h5rdmtoolbox-2.8.2/h5rdmtoolbox/llm/interfaces.py +0 -17
- h5rdmtoolbox-2.8.2/h5rdmtoolbox/llm/models.py +0 -85
- h5rdmtoolbox-2.8.2/h5rdmtoolbox/llm/ontology.py +0 -171
- h5rdmtoolbox-2.8.2/h5rdmtoolbox/llm/prompting.py +0 -157
- h5rdmtoolbox-2.8.2/h5rdmtoolbox/llm/providers/__init__.py +0 -6
- h5rdmtoolbox-2.8.2/h5rdmtoolbox/llm/providers/openai_adapter.py +0 -61
- h5rdmtoolbox-2.8.2/h5rdmtoolbox/llm/sparql_guard.py +0 -124
- h5rdmtoolbox-2.8.2/h5rdmtoolbox/llm/summary.py +0 -77
- h5rdmtoolbox-2.8.2/tests/test_tutorial.py +0 -18
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/LICENSE +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/_version.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/catalog/__init__.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/catalog/_initialization.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/catalog/abstracts.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/catalog/core.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/catalog/profiles.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/catalog/query_templates.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/catalog/stores/__init__.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/catalog/stores/hdf5.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/catalog/utils.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/cli.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/consts.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/convention/__init__.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/convention/cfg.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/convention/consts.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/convention/errors.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/convention/generate.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/convention/ontology/__init__.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/convention/ontology/h5ontocls.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/convention/ontology/hdf_datatypes.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/convention/references.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/convention/standard_attributes.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/convention/toolbox_validators.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/convention/utils.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/data/def_icon.png +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/data/fluid-v1.yml +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/data/h5tbx.yaml +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/data/id_icon.png +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/data/iri_icon.png +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/data/ld_icon.png +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/data/piv-v1.yml +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/data/style.css +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/data/tutorial_convention.yaml +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/data/tutorial_convention_vfuncs.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/data/tutorial_standard_name_table.yaml +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/data/type_icon.png +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/database/__init__.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/database/hdfdb/__init__.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/database/hdfdb/filedb.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/database/hdfdb/objdb.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/database/hdfdb/query.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/database/hdfdb/utils.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/database/interface.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/database/lazy.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/database/mongo.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/errors.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/extensions/__init__.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/extensions/magnitude.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/extensions/normalize.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/extensions/onto.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/extensions/units.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/extensions/vector.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/gui/__init__.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/gui/fairify.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/gui/src/__init__.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/gui/src/main.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/identifiers.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/layout/__init__.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/layout/core.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/ld/_types.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/ld/globals.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/ld/hdf/__init__.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/ld/hdf/attributes.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/ld/hdf/datasets.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/ld/hdf/file.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/ld/hdf/groups.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/ld/metrics.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/ld/sparql.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/ld/user/__init__.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/ld/user/attributes.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/ld/user/datasets.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/ld/user/file.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/ld/user/groups.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/ld/user/utils.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/plotting.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/protected_attributes.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/protocols.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/repository/__init__.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/repository/default_metamapper.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/repository/interface.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/repository/utils.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/repository/zenodo/__init__.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/repository/zenodo/core.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/repository/zenodo/metadata.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/repository/zenodo/tokens.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/repository/zenodo/utils.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/server/static/graph.css +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/server/static/graph.js +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/server/static/style.css +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/server/templates/file.html +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/server/templates/graph.html +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/server/templates/index.html +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/server/templates/resource.html +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/server.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/tutorial.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/user.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/utils/__init__.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/utils/docstring.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/utils/string.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/utils.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/wrapper/__init__.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/wrapper/accessor.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/wrapper/accessors/__init__.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/wrapper/accessors/provenance.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/wrapper/h5ext.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/wrapper/h5utils.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/wrapper/h5yaml.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/wrapper/jsonld.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox/wrapper/xr2hdf.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox.egg-info/dependency_links.txt +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox.egg-info/entry_points.txt +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox.egg-info/top_level.txt +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/h5rdmtoolbox_cli.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/setup.cfg +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/tests/test_cli.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/tests/test_extensions.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/tests/test_identifiers.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/tests/test_plotting.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/tests/test_readme.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/tests/test_repr.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/tests/test_user.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/tests/test_utils.py +0 -0
- {h5rdmtoolbox-2.8.2 → h5rdmtoolbox-2.8.3}/tests/test_xarray_export.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: h5rdmtoolbox
|
|
3
|
-
Version: 2.8.
|
|
3
|
+
Version: 2.8.3
|
|
4
4
|
Summary: Supporting a FAIR Research Data lifecycle using Python and HDF5.
|
|
5
5
|
Author-email: Matthias Probst <matth.probst@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -56,6 +56,9 @@ Requires-Dist: SPARQLWrapper>=2.0.0; extra == "catalog"
|
|
|
56
56
|
Provides-Extra: gui
|
|
57
57
|
Requires-Dist: PyQt5==5.15.10; extra == "gui"
|
|
58
58
|
Provides-Extra: test-core
|
|
59
|
+
Requires-Dist: build>=1.2; extra == "test-core"
|
|
60
|
+
Requires-Dist: setuptools>=78.1.1; extra == "test-core"
|
|
61
|
+
Requires-Dist: wheel; extra == "test-core"
|
|
59
62
|
Requires-Dist: toml>0.10.0; extra == "test-core"
|
|
60
63
|
Requires-Dist: pytest>=8.3.3; extra == "test-core"
|
|
61
64
|
Requires-Dist: pytest-cov>=5.0.0; extra == "test-core"
|
|
@@ -67,6 +70,9 @@ Requires-Dist: scikit-image>=0.21.0; extra == "test-core"
|
|
|
67
70
|
Requires-Dist: scikit-learn; extra == "test-core"
|
|
68
71
|
Provides-Extra: test
|
|
69
72
|
Requires-Dist: h5rdmtoolbox[catalog,csv,database,snt,test-core]; extra == "test"
|
|
73
|
+
Provides-Extra: test-server
|
|
74
|
+
Requires-Dist: h5rdmtoolbox[server,test]; extra == "test-server"
|
|
75
|
+
Requires-Dist: httpx; extra == "test-server"
|
|
70
76
|
Provides-Extra: docs
|
|
71
77
|
Requires-Dist: Sphinx==8.0.0; extra == "docs"
|
|
72
78
|
Requires-Dist: sphinx_book_theme==1.1.3; extra == "docs"
|
|
@@ -436,14 +442,16 @@ Install optional dependencies by specifying them in square brackets after the pa
|
|
|
436
442
|
- `python-gitlab`: Access to gitlab repositories
|
|
437
443
|
- `pypandoc`: Conversion of markdown files to html
|
|
438
444
|
|
|
439
|
-
Other supported extras are `layout_validation`, `catalog`, `gui`, `server`, `test`, `docs`, `complete`, and
|
|
445
|
+
Other supported extras are `layout_validation`, `catalog`, `gui`, `server`, `test`, `test-server`, `docs`, `complete`, and
|
|
440
446
|
`complete-with-docs`. See the [installation guide](https://h5rdmtoolbox.readthedocs.io/en/latest/gettingstarted/installation.html)
|
|
441
447
|
for their purpose. The authoritative dependency lists and version constraints are in [`pyproject.toml`](./pyproject.toml).
|
|
442
448
|
|
|
443
449
|
## Citing the package
|
|
444
450
|
|
|
445
|
-
If you
|
|
446
|
-
[Zenodo
|
|
451
|
+
If you use the package in your work, cite the software using its version-specific
|
|
452
|
+
[Zenodo DOI for version 2.8.3](https://doi.org/10.5281/zenodo.23854129).
|
|
453
|
+
This DOI is reserved for the release and will resolve once the Zenodo record is published.
|
|
454
|
+
A related paper is published in the
|
|
447
455
|
journal [inggrid](https://www.inggrid.org/article/id/4028/). Thank you!
|
|
448
456
|
|
|
449
457
|
Alternatively or additionally, you can consult the `CITATION.cff` file.
|
|
@@ -467,18 +475,144 @@ Here is the BibTeX entry:
|
|
|
467
475
|
}
|
|
468
476
|
```
|
|
469
477
|
|
|
478
|
+
## Attribute quantities
|
|
479
|
+
|
|
480
|
+
Quantity-valued attribute strings keep their original HDF5 text.
|
|
481
|
+
`attribute.to_pint()` accepts plain, parenthesized, and square-bracket unit
|
|
482
|
+
annotations such as `1.2 m`, `1.2 (m)`, and `1.2 [m]`, including newer Pint parsers.
|
|
483
|
+
|
|
484
|
+
## Decoded calibration data
|
|
485
|
+
|
|
486
|
+
When a convention enables scale/offset decoding, returned xarray data omits the
|
|
487
|
+
storage attributes `DATA_SCALE`, `DATA_OFFSET`, `IS_DATA_SCALE`, and
|
|
488
|
+
`IS_DATA_OFFSET`. Calibration links, role flags, and raw values remain available
|
|
489
|
+
on the HDF5 datasets.
|
|
490
|
+
|
|
491
|
+
## Convention contexts
|
|
492
|
+
|
|
493
|
+
`with convention:` restores the preceding convention on exit, including when
|
|
494
|
+
the same Convention object is nested repeatedly or the body raises an exception.
|
|
495
|
+
`h5tbx.use(...)` activates immediately when constructed; create a fresh `use`
|
|
496
|
+
manager for each context.
|
|
497
|
+
|
|
498
|
+
Convention-name lookup is context-local, but activation changes shared wrapper
|
|
499
|
+
method signatures and decoder selection. Convention-dependent operations should
|
|
500
|
+
run sequentially: different conventions are not isolated across concurrent
|
|
501
|
+
threads or asynchronous tasks, and an open file is not an isolated decoding
|
|
502
|
+
environment merely because it remembers its opening convention.
|
|
503
|
+
|
|
504
|
+
## Configuration
|
|
505
|
+
|
|
506
|
+
Use `h5tbx.set_config(...)` for persistent settings, or as a context manager for
|
|
507
|
+
temporary overrides. Nested contexts restore both configuration and the shared
|
|
508
|
+
Pint display format on exit, including when an exception is raised. Invalid
|
|
509
|
+
keys or values are rejected before settings change.
|
|
510
|
+
|
|
511
|
+
```python
|
|
512
|
+
with h5tbx.set_config(hdf_compression=None, hdf_compression_opts=None):
|
|
513
|
+
# Create datasets without the configured default compression.
|
|
514
|
+
...
|
|
515
|
+
```
|
|
516
|
+
|
|
517
|
+
`plotting_name_order` accepts a nonempty list or tuple of `plot_name`,
|
|
518
|
+
`long_name`, and/or `standard_name` in the desired priority order.
|
|
519
|
+
|
|
470
520
|
## Contribution
|
|
471
521
|
|
|
472
|
-
|
|
473
|
-
|
|
522
|
+
Releases follow a **DOI-first** workflow: supply the reserved, version-specific
|
|
523
|
+
Zenodo DOI before bumping the version, then update package and citation metadata
|
|
524
|
+
together. See the [release checklist](./docs/development.md#doi-first-release-checklist)
|
|
525
|
+
and [agent instructions](./AGENTS.md#fair-versioning-and-release-metadata).
|
|
526
|
+
Release preparation and publication are separate steps.
|
|
527
|
+
|
|
528
|
+
RDF storage refactoring preserves the existing HDF5 attribute representation.
|
|
529
|
+
RDF validation and object preparation stay separate from shared mapping updates;
|
|
530
|
+
the existing wrapper continues to encode attributes for HDF5.
|
|
531
|
+
The compatibility checks in `tests/ld/test_rdf_storage.py` inspect raw h5py
|
|
532
|
+
values, string types, shapes, and reopened files. See the
|
|
533
|
+
[storage contract](./docs/development.md#rdf-metadata-storage-contract).
|
|
534
|
+
|
|
535
|
+
Start with the [developer overview](./docs/development.md) for module responsibilities,
|
|
536
|
+
initialization behavior, startup measurements, and maintenance priorities. The
|
|
537
|
+
[repository guidelines](./AGENTS.md) map code areas to focused tests and describe
|
|
538
|
+
the Git workflow. Work on a dedicated branch and keep changes in coherent commits.
|
|
539
|
+
For the current modernization, Git operations are authorized without repeated
|
|
540
|
+
confirmation, with `git merge` excluded and commits confined to the working branch.
|
|
541
|
+
|
|
542
|
+
Subagent investigations require explicit approval before agents are started.
|
|
543
|
+
Approved architecture, quality, feature, or difficult-problem discussions are
|
|
544
|
+
documented under `.work/<topic>/`, with evidence, alternatives, and a final
|
|
545
|
+
recommendation. See the repository guidelines for the delegation workflow.
|
|
546
|
+
|
|
547
|
+
The [architecture and quality review](./.work/architecture-quality/README.md)
|
|
548
|
+
records independently reviewed CI, installed-wheel, test-coverage, and convention
|
|
549
|
+
state findings, with reproductions and prioritized follow-up checks.
|
|
550
|
+
|
|
551
|
+
The toolbox loads the SHACL validation engine and notebook HTML display support
|
|
552
|
+
when those features are first used. A normal package import avoids loading them;
|
|
553
|
+
both remain included in the required dependencies. See the developer overview
|
|
554
|
+
for the startup measurement protocol and local before/after results.
|
|
555
|
+
|
|
556
|
+
Internally, wrappers and shared utilities access configuration through its
|
|
557
|
+
defining module; public configuration helpers remain available on `h5tbx`.
|
|
558
|
+
Utility logging continues to use the shared `h5rdmtoolbox` logger and handlers.
|
|
559
|
+
|
|
560
|
+
Distribution builds copy the canonical root `codemeta.json` into package data,
|
|
561
|
+
so `h5tbx.get_package_meta()` also works outside an editable checkout. The test
|
|
562
|
+
extra includes the build frontend and backend needed to verify an sdist-built
|
|
563
|
+
wheel without downloading build dependencies during the test:
|
|
564
|
+
|
|
565
|
+
```bash
|
|
566
|
+
python -m pytest tests/test_distribution.py -q
|
|
567
|
+
```
|
|
568
|
+
|
|
569
|
+
This check builds from a fresh source copy, verifies metadata and runtime assets,
|
|
570
|
+
and imports the resulting package outside the checkout. Use clean source trees
|
|
571
|
+
for release builds so stale local build files cannot enter a distribution.
|
|
474
572
|
|
|
475
|
-
|
|
476
|
-
tests folder for more information.
|
|
573
|
+
From the repository root, install the test dependencies and run the local smoke checks:
|
|
477
574
|
|
|
478
|
-
|
|
479
|
-
|
|
575
|
+
```bash
|
|
576
|
+
python -m pip install -e ".[test]"
|
|
577
|
+
python -m pytest tests/test_version.py tests/test_config.py tests/test_cli.py -q
|
|
578
|
+
```
|
|
579
|
+
|
|
580
|
+
Add regression tests in `tests/` for changed behavior and run the relevant test
|
|
581
|
+
modules. The full suite includes downloads and external integrations; the developer
|
|
582
|
+
overview explains test isolation and service requirements. Use existing code style
|
|
583
|
+
and **NumPy-style docstrings** for public APIs.
|
|
584
|
+
|
|
585
|
+
Live Zenodo uploads are opt-in: tests marked `zenodo_upload` require both
|
|
586
|
+
`H5RDMTOOLBOX_RUN_ZENODO_UPLOAD_TESTS=1` and `ZENODO_SANDBOX_API_TOKEN`.
|
|
587
|
+
Ordinary test runs skip these remote writes, even if a token is available.
|
|
588
|
+
See the [testing guide](./tests/README.md) for commands and skip reasons.
|
|
589
|
+
|
|
590
|
+
CI runs on pushes, pull requests, and manual dispatch with read-only repository
|
|
591
|
+
permissions and without Zenodo write credentials or automatic account cleanup.
|
|
592
|
+
Manual Sandbox cleanup requires an explicit list of deposition IDs; it never
|
|
593
|
+
enumerates or deletes all drafts in an account.
|
|
594
|
+
|
|
595
|
+
Server validation has its own CI job using `.[test-server]`, which includes HTTPX
|
|
596
|
+
for FastAPI's TestClient. Missing optional dependencies are reported as a module
|
|
597
|
+
skip in ordinary test runs, but fail when `H5RDMTOOLBOX_REQUIRE_SERVER_TESTS=1`.
|
|
598
|
+
Broken installed dependencies always fail visibly. CI checks the JUnit report
|
|
599
|
+
for actual passing test cases and rejects skips or an empty run. Workflow actions
|
|
600
|
+
use Node 24-compatible versions; self-hosted runners need version 2.327.1 or newer.
|
|
601
|
+
|
|
602
|
+
Catalog tests generate their HDF5 files and local indexes in per-test temporary
|
|
603
|
+
directories, keeping checked-in sample data read-only and avoiding shared state
|
|
604
|
+
between test cases.
|
|
605
|
+
|
|
606
|
+
Keep this README, API documentation, affected guides, and developer instructions
|
|
607
|
+
up to date in the same commit as the change. Add or update notebooks when they help
|
|
608
|
+
explain user-facing behavior. See the [documentation guide](./docs/README.md) for
|
|
609
|
+
build requirements. For prose-only changes, a build without notebook execution is:
|
|
610
|
+
|
|
611
|
+
```bash
|
|
612
|
+
python -m sphinx -W -b html -D nb_execution_mode=off docs docs/_build/html
|
|
613
|
+
```
|
|
480
614
|
|
|
481
|
-
|
|
482
|
-
|
|
615
|
+
For notebook behavior changes, omit `-D nb_execution_mode=off` to use the configured
|
|
616
|
+
execution policy.
|
|
483
617
|
|
|
484
618
|
|
|
@@ -350,14 +350,16 @@ Install optional dependencies by specifying them in square brackets after the pa
|
|
|
350
350
|
- `python-gitlab`: Access to gitlab repositories
|
|
351
351
|
- `pypandoc`: Conversion of markdown files to html
|
|
352
352
|
|
|
353
|
-
Other supported extras are `layout_validation`, `catalog`, `gui`, `server`, `test`, `docs`, `complete`, and
|
|
353
|
+
Other supported extras are `layout_validation`, `catalog`, `gui`, `server`, `test`, `test-server`, `docs`, `complete`, and
|
|
354
354
|
`complete-with-docs`. See the [installation guide](https://h5rdmtoolbox.readthedocs.io/en/latest/gettingstarted/installation.html)
|
|
355
355
|
for their purpose. The authoritative dependency lists and version constraints are in [`pyproject.toml`](./pyproject.toml).
|
|
356
356
|
|
|
357
357
|
## Citing the package
|
|
358
358
|
|
|
359
|
-
If you
|
|
360
|
-
[Zenodo
|
|
359
|
+
If you use the package in your work, cite the software using its version-specific
|
|
360
|
+
[Zenodo DOI for version 2.8.3](https://doi.org/10.5281/zenodo.23854129).
|
|
361
|
+
This DOI is reserved for the release and will resolve once the Zenodo record is published.
|
|
362
|
+
A related paper is published in the
|
|
361
363
|
journal [inggrid](https://www.inggrid.org/article/id/4028/). Thank you!
|
|
362
364
|
|
|
363
365
|
Alternatively or additionally, you can consult the `CITATION.cff` file.
|
|
@@ -381,18 +383,144 @@ Here is the BibTeX entry:
|
|
|
381
383
|
}
|
|
382
384
|
```
|
|
383
385
|
|
|
386
|
+
## Attribute quantities
|
|
387
|
+
|
|
388
|
+
Quantity-valued attribute strings keep their original HDF5 text.
|
|
389
|
+
`attribute.to_pint()` accepts plain, parenthesized, and square-bracket unit
|
|
390
|
+
annotations such as `1.2 m`, `1.2 (m)`, and `1.2 [m]`, including newer Pint parsers.
|
|
391
|
+
|
|
392
|
+
## Decoded calibration data
|
|
393
|
+
|
|
394
|
+
When a convention enables scale/offset decoding, returned xarray data omits the
|
|
395
|
+
storage attributes `DATA_SCALE`, `DATA_OFFSET`, `IS_DATA_SCALE`, and
|
|
396
|
+
`IS_DATA_OFFSET`. Calibration links, role flags, and raw values remain available
|
|
397
|
+
on the HDF5 datasets.
|
|
398
|
+
|
|
399
|
+
## Convention contexts
|
|
400
|
+
|
|
401
|
+
`with convention:` restores the preceding convention on exit, including when
|
|
402
|
+
the same Convention object is nested repeatedly or the body raises an exception.
|
|
403
|
+
`h5tbx.use(...)` activates immediately when constructed; create a fresh `use`
|
|
404
|
+
manager for each context.
|
|
405
|
+
|
|
406
|
+
Convention-name lookup is context-local, but activation changes shared wrapper
|
|
407
|
+
method signatures and decoder selection. Convention-dependent operations should
|
|
408
|
+
run sequentially: different conventions are not isolated across concurrent
|
|
409
|
+
threads or asynchronous tasks, and an open file is not an isolated decoding
|
|
410
|
+
environment merely because it remembers its opening convention.
|
|
411
|
+
|
|
412
|
+
## Configuration
|
|
413
|
+
|
|
414
|
+
Use `h5tbx.set_config(...)` for persistent settings, or as a context manager for
|
|
415
|
+
temporary overrides. Nested contexts restore both configuration and the shared
|
|
416
|
+
Pint display format on exit, including when an exception is raised. Invalid
|
|
417
|
+
keys or values are rejected before settings change.
|
|
418
|
+
|
|
419
|
+
```python
|
|
420
|
+
with h5tbx.set_config(hdf_compression=None, hdf_compression_opts=None):
|
|
421
|
+
# Create datasets without the configured default compression.
|
|
422
|
+
...
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
`plotting_name_order` accepts a nonempty list or tuple of `plot_name`,
|
|
426
|
+
`long_name`, and/or `standard_name` in the desired priority order.
|
|
427
|
+
|
|
384
428
|
## Contribution
|
|
385
429
|
|
|
386
|
-
|
|
387
|
-
|
|
430
|
+
Releases follow a **DOI-first** workflow: supply the reserved, version-specific
|
|
431
|
+
Zenodo DOI before bumping the version, then update package and citation metadata
|
|
432
|
+
together. See the [release checklist](./docs/development.md#doi-first-release-checklist)
|
|
433
|
+
and [agent instructions](./AGENTS.md#fair-versioning-and-release-metadata).
|
|
434
|
+
Release preparation and publication are separate steps.
|
|
435
|
+
|
|
436
|
+
RDF storage refactoring preserves the existing HDF5 attribute representation.
|
|
437
|
+
RDF validation and object preparation stay separate from shared mapping updates;
|
|
438
|
+
the existing wrapper continues to encode attributes for HDF5.
|
|
439
|
+
The compatibility checks in `tests/ld/test_rdf_storage.py` inspect raw h5py
|
|
440
|
+
values, string types, shapes, and reopened files. See the
|
|
441
|
+
[storage contract](./docs/development.md#rdf-metadata-storage-contract).
|
|
442
|
+
|
|
443
|
+
Start with the [developer overview](./docs/development.md) for module responsibilities,
|
|
444
|
+
initialization behavior, startup measurements, and maintenance priorities. The
|
|
445
|
+
[repository guidelines](./AGENTS.md) map code areas to focused tests and describe
|
|
446
|
+
the Git workflow. Work on a dedicated branch and keep changes in coherent commits.
|
|
447
|
+
For the current modernization, Git operations are authorized without repeated
|
|
448
|
+
confirmation, with `git merge` excluded and commits confined to the working branch.
|
|
449
|
+
|
|
450
|
+
Subagent investigations require explicit approval before agents are started.
|
|
451
|
+
Approved architecture, quality, feature, or difficult-problem discussions are
|
|
452
|
+
documented under `.work/<topic>/`, with evidence, alternatives, and a final
|
|
453
|
+
recommendation. See the repository guidelines for the delegation workflow.
|
|
454
|
+
|
|
455
|
+
The [architecture and quality review](./.work/architecture-quality/README.md)
|
|
456
|
+
records independently reviewed CI, installed-wheel, test-coverage, and convention
|
|
457
|
+
state findings, with reproductions and prioritized follow-up checks.
|
|
458
|
+
|
|
459
|
+
The toolbox loads the SHACL validation engine and notebook HTML display support
|
|
460
|
+
when those features are first used. A normal package import avoids loading them;
|
|
461
|
+
both remain included in the required dependencies. See the developer overview
|
|
462
|
+
for the startup measurement protocol and local before/after results.
|
|
463
|
+
|
|
464
|
+
Internally, wrappers and shared utilities access configuration through its
|
|
465
|
+
defining module; public configuration helpers remain available on `h5tbx`.
|
|
466
|
+
Utility logging continues to use the shared `h5rdmtoolbox` logger and handlers.
|
|
467
|
+
|
|
468
|
+
Distribution builds copy the canonical root `codemeta.json` into package data,
|
|
469
|
+
so `h5tbx.get_package_meta()` also works outside an editable checkout. The test
|
|
470
|
+
extra includes the build frontend and backend needed to verify an sdist-built
|
|
471
|
+
wheel without downloading build dependencies during the test:
|
|
472
|
+
|
|
473
|
+
```bash
|
|
474
|
+
python -m pytest tests/test_distribution.py -q
|
|
475
|
+
```
|
|
476
|
+
|
|
477
|
+
This check builds from a fresh source copy, verifies metadata and runtime assets,
|
|
478
|
+
and imports the resulting package outside the checkout. Use clean source trees
|
|
479
|
+
for release builds so stale local build files cannot enter a distribution.
|
|
388
480
|
|
|
389
|
-
|
|
390
|
-
tests folder for more information.
|
|
481
|
+
From the repository root, install the test dependencies and run the local smoke checks:
|
|
391
482
|
|
|
392
|
-
|
|
393
|
-
|
|
483
|
+
```bash
|
|
484
|
+
python -m pip install -e ".[test]"
|
|
485
|
+
python -m pytest tests/test_version.py tests/test_config.py tests/test_cli.py -q
|
|
486
|
+
```
|
|
487
|
+
|
|
488
|
+
Add regression tests in `tests/` for changed behavior and run the relevant test
|
|
489
|
+
modules. The full suite includes downloads and external integrations; the developer
|
|
490
|
+
overview explains test isolation and service requirements. Use existing code style
|
|
491
|
+
and **NumPy-style docstrings** for public APIs.
|
|
492
|
+
|
|
493
|
+
Live Zenodo uploads are opt-in: tests marked `zenodo_upload` require both
|
|
494
|
+
`H5RDMTOOLBOX_RUN_ZENODO_UPLOAD_TESTS=1` and `ZENODO_SANDBOX_API_TOKEN`.
|
|
495
|
+
Ordinary test runs skip these remote writes, even if a token is available.
|
|
496
|
+
See the [testing guide](./tests/README.md) for commands and skip reasons.
|
|
497
|
+
|
|
498
|
+
CI runs on pushes, pull requests, and manual dispatch with read-only repository
|
|
499
|
+
permissions and without Zenodo write credentials or automatic account cleanup.
|
|
500
|
+
Manual Sandbox cleanup requires an explicit list of deposition IDs; it never
|
|
501
|
+
enumerates or deletes all drafts in an account.
|
|
502
|
+
|
|
503
|
+
Server validation has its own CI job using `.[test-server]`, which includes HTTPX
|
|
504
|
+
for FastAPI's TestClient. Missing optional dependencies are reported as a module
|
|
505
|
+
skip in ordinary test runs, but fail when `H5RDMTOOLBOX_REQUIRE_SERVER_TESTS=1`.
|
|
506
|
+
Broken installed dependencies always fail visibly. CI checks the JUnit report
|
|
507
|
+
for actual passing test cases and rejects skips or an empty run. Workflow actions
|
|
508
|
+
use Node 24-compatible versions; self-hosted runners need version 2.327.1 or newer.
|
|
509
|
+
|
|
510
|
+
Catalog tests generate their HDF5 files and local indexes in per-test temporary
|
|
511
|
+
directories, keeping checked-in sample data read-only and avoiding shared state
|
|
512
|
+
between test cases.
|
|
513
|
+
|
|
514
|
+
Keep this README, API documentation, affected guides, and developer instructions
|
|
515
|
+
up to date in the same commit as the change. Add or update notebooks when they help
|
|
516
|
+
explain user-facing behavior. See the [documentation guide](./docs/README.md) for
|
|
517
|
+
build requirements. For prose-only changes, a build without notebook execution is:
|
|
518
|
+
|
|
519
|
+
```bash
|
|
520
|
+
python -m sphinx -W -b html -D nb_execution_mode=off docs docs/_build/html
|
|
521
|
+
```
|
|
394
522
|
|
|
395
|
-
|
|
396
|
-
|
|
523
|
+
For notebook behavior changes, omit `-D nb_execution_mode=off` to use the configured
|
|
524
|
+
execution policy.
|
|
397
525
|
|
|
398
526
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""Setuptools commands for generated package resources."""
|
|
2
|
+
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
|
|
5
|
+
from setuptools.command.build_py import build_py
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class BuildPy(build_py):
|
|
9
|
+
"""Copy canonical repository metadata into the built package."""
|
|
10
|
+
|
|
11
|
+
def run(self):
|
|
12
|
+
super().run()
|
|
13
|
+
source = Path(__file__).parent / 'codemeta.json'
|
|
14
|
+
destination = Path(self.build_lib) / 'h5rdmtoolbox' / 'data' / 'codemeta.json'
|
|
15
|
+
self.mkpath(str(destination.parent))
|
|
16
|
+
self.copy_file(str(source), str(destination))
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@id": "https://doi.org/10.5281/zenodo.23854129",
|
|
3
|
+
"@context": "https://doi.org/10.5063/schema/codemeta-2.0",
|
|
4
|
+
"@type": "SoftwareSourceCode",
|
|
5
|
+
"license": "https://spdx.org/licenses/MIT",
|
|
6
|
+
"codeRepository": "git+https://github.com/matthiasprobst/h5RDMtoolbox.git",
|
|
7
|
+
"name": "h5RDMtoolbox",
|
|
8
|
+
"version": "2.8.3",
|
|
9
|
+
"description": "Supporting a FAIR Research Data lifecycle using Python and HDF5.",
|
|
10
|
+
"applicationCategory": "Engineering",
|
|
11
|
+
"programmingLanguage": [
|
|
12
|
+
"Python 3",
|
|
13
|
+
"Python 3.9",
|
|
14
|
+
"Python 3.10",
|
|
15
|
+
"Python 3.11",
|
|
16
|
+
"Python 3.12",
|
|
17
|
+
"Python 3.13"
|
|
18
|
+
],
|
|
19
|
+
"operatingSystem": [
|
|
20
|
+
"Linux",
|
|
21
|
+
"Windows",
|
|
22
|
+
"macOS"
|
|
23
|
+
],
|
|
24
|
+
"author": [
|
|
25
|
+
{
|
|
26
|
+
"@type": "Person",
|
|
27
|
+
"@id": "https://orcid.org/0000-0001-8729-0482",
|
|
28
|
+
"givenName": "Matthias",
|
|
29
|
+
"familyName": "Probst",
|
|
30
|
+
"email": "matth.probst@gmail.com",
|
|
31
|
+
"affiliation": {
|
|
32
|
+
"@type": "Organization",
|
|
33
|
+
"@id": "https://ror.org/04t3en479",
|
|
34
|
+
"name": "Karlsruhe Institute of Technology, Institute of Thermal Turbomachinery"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"@type": "Person",
|
|
39
|
+
"@id": "https://orcid.org/0000-0002-4116-0065",
|
|
40
|
+
"givenName": "Lucas",
|
|
41
|
+
"familyName": "Büttner",
|
|
42
|
+
"affiliation": {
|
|
43
|
+
"@type": "Organization",
|
|
44
|
+
"@id": "https://ror.org/04t3en479",
|
|
45
|
+
"name": "Karlsruhe Institute of Technology, Institute of Thermal Turbomachinery"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"@type": "Person",
|
|
50
|
+
"@id": "https://orcid.org/0000-0001-9560-500X",
|
|
51
|
+
"givenName": "Balazs",
|
|
52
|
+
"familyName": "Pritz",
|
|
53
|
+
"affiliation": {
|
|
54
|
+
"@type": "Organization",
|
|
55
|
+
"@id": "https://ror.org/04t3en479",
|
|
56
|
+
"name": "Karlsruhe Institute of Technology, Institute of Thermal Turbomachinery"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
}
|
|
@@ -65,10 +65,22 @@ __author_orcid__ = 'https://orcid.org/0000-0001-8729-0482'
|
|
|
65
65
|
|
|
66
66
|
|
|
67
67
|
def get_package_meta() -> Dict:
|
|
68
|
-
"""
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
"""Return CodeMeta metadata from the installed package or editable checkout.
|
|
69
|
+
|
|
70
|
+
Builds copy the canonical repository ``codemeta.json`` into package data;
|
|
71
|
+
editable checkouts read that canonical source directly when needed.
|
|
72
|
+
"""
|
|
73
|
+
from importlib_resources import files
|
|
74
|
+
|
|
75
|
+
resource = files(__package__).joinpath('data/codemeta.json')
|
|
76
|
+
try:
|
|
77
|
+
text = resource.read_text(encoding='utf-8')
|
|
78
|
+
except FileNotFoundError:
|
|
79
|
+
source_root = __this_dir__.parent
|
|
80
|
+
if not (source_root / 'pyproject.toml').is_file():
|
|
81
|
+
raise
|
|
82
|
+
text = (source_root / 'codemeta.json').read_text(encoding='utf-8')
|
|
83
|
+
return json.loads(text)
|
|
72
84
|
|
|
73
85
|
|
|
74
86
|
cv_h5py = convention.Convention(name='h5py',
|
|
@@ -168,11 +180,6 @@ def compute_metrics(
|
|
|
168
180
|
)
|
|
169
181
|
|
|
170
182
|
|
|
171
|
-
def _optimize_ld_context(graph: rdflib.Graph, context: Optional[Dict]) -> Dict:
|
|
172
|
-
from .ld import optimize_context
|
|
173
|
-
return optimize_context(graph, context or {})
|
|
174
|
-
|
|
175
|
-
|
|
176
183
|
def _resolve_serialize_format(fmt: str, kwargs: Dict) -> str:
|
|
177
184
|
return kwargs.pop("format", fmt)
|
|
178
185
|
|
|
@@ -192,12 +199,8 @@ def dump_jsonld(
|
|
|
192
199
|
contextual=contextual,
|
|
193
200
|
file_uri=file_uri,
|
|
194
201
|
skipND=skipND)
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
indent=indent,
|
|
198
|
-
auto_compact=True,
|
|
199
|
-
context=_optimize_ld_context(graph, context)
|
|
200
|
-
)
|
|
202
|
+
from .ld.utils import _serialize_graph
|
|
203
|
+
return _serialize_graph(graph, fmt="json-ld", indent=indent, context=context)
|
|
201
204
|
|
|
202
205
|
|
|
203
206
|
# def shacl_validate(
|
|
@@ -44,11 +44,11 @@ _VALIDATORS = {
|
|
|
44
44
|
'return_xarray': lambda x: isinstance(x, bool),
|
|
45
45
|
'advanced_shape_repr': lambda x: isinstance(x, bool),
|
|
46
46
|
'natural_naming': lambda x: isinstance(x, bool),
|
|
47
|
-
'hdf_compression': lambda x: isinstance(x, str),
|
|
48
|
-
'hdf_compression_opts': lambda x: isinstance(x, int),
|
|
47
|
+
'hdf_compression': lambda x: x is None or isinstance(x, str),
|
|
48
|
+
'hdf_compression_opts': lambda x: x is None or isinstance(x, int),
|
|
49
49
|
'xarray_unit_repr_in_plots': lambda x: x in ('/', '()', '(', '[]', '[', '//', 'in'),
|
|
50
|
-
'plotting_name_order': lambda x: isinstance(x, (tuple, list)) and
|
|
51
|
-
|
|
50
|
+
'plotting_name_order': lambda x: isinstance(x, (tuple, list)) and bool(x) and all(
|
|
51
|
+
xx in ('plot_name', 'long_name', 'standard_name') for xx in x),
|
|
52
52
|
'require_unit': lambda x: isinstance(x, bool),
|
|
53
53
|
'ureg_format': lambda x: isinstance(x, str),
|
|
54
54
|
'init_logger_level': lambda x: is_valid_logger_level(x),
|
|
@@ -62,7 +62,14 @@ _VALIDATORS = {
|
|
|
62
62
|
|
|
63
63
|
|
|
64
64
|
class set_config:
|
|
65
|
-
"""Set
|
|
65
|
+
"""Set configuration immediately, optionally restoring it as a context manager.
|
|
66
|
+
|
|
67
|
+
All keys and values are validated before configuration is changed. Context
|
|
68
|
+
exit restores previous values, including the shared Pint registry format.
|
|
69
|
+
Compression settings accept ``None`` to restore their uncompressed defaults.
|
|
70
|
+
``plotting_name_order`` requires a nonempty list or tuple containing only
|
|
71
|
+
``plot_name``, ``long_name``, or ``standard_name``.
|
|
72
|
+
"""
|
|
66
73
|
|
|
67
74
|
def __init__(self, **kwargs):
|
|
68
75
|
self.old = {}
|
|
@@ -72,8 +79,6 @@ class set_config:
|
|
|
72
79
|
if k not in CONFIG:
|
|
73
80
|
raise KeyError(f'Not a configuration key: "{k}"')
|
|
74
81
|
self.old[k] = CONFIG[k]
|
|
75
|
-
if k == 'ureg_format':
|
|
76
|
-
get_ureg().formatter.default_format = str(v)
|
|
77
82
|
self._update(kwargs)
|
|
78
83
|
|
|
79
84
|
def __enter__(self):
|
|
@@ -83,6 +88,8 @@ class set_config:
|
|
|
83
88
|
self._update(self.old)
|
|
84
89
|
|
|
85
90
|
def _update(self, options_dict: Dict):
|
|
91
|
+
if 'ureg_format' in options_dict:
|
|
92
|
+
get_ureg().formatter.default_format = options_dict['ureg_format']
|
|
86
93
|
CONFIG.update(options_dict)
|
|
87
94
|
|
|
88
95
|
|
|
@@ -10,14 +10,14 @@ import h5py
|
|
|
10
10
|
import importlib_resources
|
|
11
11
|
import numpy as np
|
|
12
12
|
import xarray as xr
|
|
13
|
-
from IPython.display import HTML, display
|
|
14
13
|
from numpy import ndarray
|
|
15
14
|
from ontolutils import M4I
|
|
16
15
|
|
|
17
16
|
from h5rdmtoolbox.ld.rdf import (RDF_PREDICATE_ATTR_NAME,
|
|
18
17
|
RDF_OBJECT_ATTR_NAME,
|
|
19
18
|
RDF_TYPE_ATTR_NAME)
|
|
20
|
-
from . import
|
|
19
|
+
from . import identifiers, protected_attributes
|
|
20
|
+
from ._cfg import get_config
|
|
21
21
|
|
|
22
22
|
H5PY_SPECIAL_ATTRIBUTES = ('DIMENSION_LIST', 'REFERENCE_LIST', 'NAME', 'CLASS', protected_attributes.COORDINATES)
|
|
23
23
|
try:
|
|
@@ -734,6 +734,8 @@ class H5Repr:
|
|
|
734
734
|
|
|
735
735
|
def __html__(self, group, collapsed: bool = True, preamble: str = None,
|
|
736
736
|
chunks: bool = False, maxshape: bool = False) -> None:
|
|
737
|
+
from IPython.display import HTML, display
|
|
738
|
+
|
|
737
739
|
display(
|
|
738
740
|
HTML(
|
|
739
741
|
self.html_repr(
|
|
@@ -101,6 +101,12 @@ class Convention(AbstractConvention):
|
|
|
101
101
|
Recommended initialization is via `Convention.from_yaml(<yaml_filename>)` or
|
|
102
102
|
`Convention.from_json(<json_filename>)`.
|
|
103
103
|
|
|
104
|
+
Convention objects support sequential nested context use, including repeated
|
|
105
|
+
entry of the same object. Each exit restores the preceding convention.
|
|
106
|
+
Activation changes process-global wrapper signatures and decoder selection;
|
|
107
|
+
concurrent convention-dependent operations are not isolated across threads
|
|
108
|
+
or asynchronous tasks.
|
|
109
|
+
|
|
104
110
|
Parameters
|
|
105
111
|
----------
|
|
106
112
|
name : str
|
|
@@ -142,6 +148,7 @@ class Convention(AbstractConvention):
|
|
|
142
148
|
|
|
143
149
|
self.contact = contact
|
|
144
150
|
self.institution = institution
|
|
151
|
+
self._context_managers = []
|
|
145
152
|
|
|
146
153
|
self._registered_standard_attributes = {}
|
|
147
154
|
self.name = name
|
|
@@ -257,12 +264,12 @@ class Convention(AbstractConvention):
|
|
|
257
264
|
return out
|
|
258
265
|
|
|
259
266
|
def __enter__(self):
|
|
260
|
-
|
|
261
|
-
|
|
267
|
+
manager = use(self)
|
|
268
|
+
self._context_managers.append(manager)
|
|
262
269
|
return self
|
|
263
270
|
|
|
264
271
|
def __exit__(self, exc_type, exc_val, exc_tb):
|
|
265
|
-
|
|
272
|
+
return self._context_managers.pop().__exit__(exc_type, exc_val, exc_tb)
|
|
266
273
|
|
|
267
274
|
@property
|
|
268
275
|
def registered_standard_attributes(self):
|
|
@@ -677,7 +684,12 @@ def _ensure_builtin_convention(name: str) -> bool:
|
|
|
677
684
|
|
|
678
685
|
class use:
|
|
679
686
|
"""Enable a convention.
|
|
680
|
-
|
|
687
|
+
|
|
688
|
+
Call ``use(None)`` to activate the default empty ``h5py`` convention.
|
|
689
|
+
|
|
690
|
+
Activation occurs when this manager is constructed. Use a fresh manager for
|
|
691
|
+
each context. Wrapper signatures and decoder selection are process-global;
|
|
692
|
+
this manager does not isolate concurrent convention-dependent operations.
|
|
681
693
|
|
|
682
694
|
Parameters
|
|
683
695
|
----------
|
|
@@ -772,7 +784,12 @@ def add_convention(convention: Convention, name=None):
|
|
|
772
784
|
|
|
773
785
|
|
|
774
786
|
def get_current_convention() -> Union[None, Convention]:
|
|
775
|
-
"""Return the
|
|
787
|
+
"""Return the context-local convention pointer.
|
|
788
|
+
|
|
789
|
+
Activation also changes process-global wrapper signatures and decoders.
|
|
790
|
+
Context-local lookup does not imply isolated file operations across threads
|
|
791
|
+
or asynchronous tasks.
|
|
792
|
+
"""
|
|
776
793
|
return cfg._current_convention.get()
|
|
777
794
|
|
|
778
795
|
|