h5rdmtoolbox 2.7.3__tar.gz → 2.8.0__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.7.3 → h5rdmtoolbox-2.8.0}/PKG-INFO +32 -9
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/README.md +25 -6
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/__init__.py +69 -14
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/catalog/core.py +187 -105
- h5rdmtoolbox-2.8.0/h5rdmtoolbox/cli.py +4 -0
- h5rdmtoolbox-2.8.0/h5rdmtoolbox/convention/__init__.py +58 -0
- h5rdmtoolbox-2.8.0/h5rdmtoolbox/convention/cfg.py +7 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/convention/core.py +313 -157
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/convention/standard_attributes.py +134 -80
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/database/mongo.py +168 -104
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/extensions/magnitude.py +2 -1
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/extensions/normalize.py +4 -2
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/extensions/units.py +8 -3
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/gui/fairify.py +168 -95
- h5rdmtoolbox-2.8.0/h5rdmtoolbox/ld/__init__.py +285 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/ld/hdf/attributes.py +4 -4
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/ld/hdf/datasets.py +9 -7
- h5rdmtoolbox-2.8.0/h5rdmtoolbox/ld/hdf/file.py +63 -0
- h5rdmtoolbox-2.8.0/h5rdmtoolbox/ld/metrics.py +279 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/ld/shacl.py +49 -40
- h5rdmtoolbox-2.8.0/h5rdmtoolbox/ld/sparql.py +59 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/ld/user/attributes.py +15 -5
- h5rdmtoolbox-2.8.0/h5rdmtoolbox/ld/user/file.py +92 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/ld/user/utils.py +8 -5
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/ld/utils.py +19 -0
- h5rdmtoolbox-2.8.0/h5rdmtoolbox/llm/__init__.py +15 -0
- h5rdmtoolbox-2.8.0/h5rdmtoolbox/llm/chat.py +340 -0
- h5rdmtoolbox-2.8.0/h5rdmtoolbox/llm/errors.py +22 -0
- h5rdmtoolbox-2.8.0/h5rdmtoolbox/llm/executor.py +56 -0
- h5rdmtoolbox-2.8.0/h5rdmtoolbox/llm/interfaces.py +17 -0
- h5rdmtoolbox-2.8.0/h5rdmtoolbox/llm/models.py +85 -0
- h5rdmtoolbox-2.8.0/h5rdmtoolbox/llm/ontology.py +171 -0
- h5rdmtoolbox-2.8.0/h5rdmtoolbox/llm/prompting.py +157 -0
- h5rdmtoolbox-2.8.0/h5rdmtoolbox/llm/providers/__init__.py +6 -0
- h5rdmtoolbox-2.8.0/h5rdmtoolbox/llm/providers/openai_adapter.py +61 -0
- h5rdmtoolbox-2.8.0/h5rdmtoolbox/llm/sparql_guard.py +124 -0
- h5rdmtoolbox-2.8.0/h5rdmtoolbox/llm/summary.py +77 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/protocols.py +76 -50
- h5rdmtoolbox-2.8.0/h5rdmtoolbox/server/static/graph.css +337 -0
- h5rdmtoolbox-2.8.0/h5rdmtoolbox/server/static/graph.js +568 -0
- h5rdmtoolbox-2.8.0/h5rdmtoolbox/server/static/style.css +11 -0
- h5rdmtoolbox-2.8.0/h5rdmtoolbox/server/templates/graph.html +127 -0
- h5rdmtoolbox-2.8.0/h5rdmtoolbox/server/templates/index.html +0 -0
- h5rdmtoolbox-2.8.0/h5rdmtoolbox/server/templates/resource.html +0 -0
- h5rdmtoolbox-2.8.0/h5rdmtoolbox/server.py +3211 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/user.py +18 -11
- h5rdmtoolbox-2.8.0/h5rdmtoolbox/utils/__init__.py +82 -0
- h5rdmtoolbox-2.8.0/h5rdmtoolbox/utils/docstring.py +265 -0
- h5rdmtoolbox-2.8.0/h5rdmtoolbox/utils/download.py +341 -0
- h5rdmtoolbox-2.8.0/h5rdmtoolbox/utils/file_io.py +272 -0
- h5rdmtoolbox-2.8.0/h5rdmtoolbox/utils/hdf5.py +315 -0
- h5rdmtoolbox-2.8.0/h5rdmtoolbox/utils/string.py +37 -0
- h5rdmtoolbox-2.8.0/h5rdmtoolbox/utils.py +78 -0
- h5rdmtoolbox-2.8.0/h5rdmtoolbox/wrapper/accessors/__init__.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/wrapper/core.py +1066 -573
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/wrapper/h5attr.py +162 -114
- h5rdmtoolbox-2.8.0/h5rdmtoolbox/wrapper/h5utils.py +35 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/wrapper/h5yaml.py +17 -15
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/wrapper/jsonld.py +45 -24
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/wrapper/xr2hdf.py +5 -5
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox.egg-info/PKG-INFO +32 -9
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox.egg-info/SOURCES.txt +30 -0
- h5rdmtoolbox-2.8.0/h5rdmtoolbox.egg-info/entry_points.txt +2 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox.egg-info/requires.txt +7 -2
- h5rdmtoolbox-2.8.0/h5rdmtoolbox.egg-info/top_level.txt +2 -0
- h5rdmtoolbox-2.8.0/h5rdmtoolbox_cli.py +168 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/pyproject.toml +19 -7
- h5rdmtoolbox-2.8.0/tests/test_cli.py +190 -0
- h5rdmtoolbox-2.8.0/tests/test_extensions.py +203 -0
- h5rdmtoolbox-2.8.0/tests/test_repr.py +127 -0
- h5rdmtoolbox-2.8.0/tests/test_server.py +1771 -0
- h5rdmtoolbox-2.7.3/h5rdmtoolbox/cli.py +0 -61
- h5rdmtoolbox-2.7.3/h5rdmtoolbox/convention/__init__.py +0 -41
- h5rdmtoolbox-2.7.3/h5rdmtoolbox/convention/cfg.py +0 -2
- h5rdmtoolbox-2.7.3/h5rdmtoolbox/ld/__init__.py +0 -133
- h5rdmtoolbox-2.7.3/h5rdmtoolbox/ld/hdf/file.py +0 -54
- h5rdmtoolbox-2.7.3/h5rdmtoolbox/ld/user/file.py +0 -65
- h5rdmtoolbox-2.7.3/h5rdmtoolbox/utils.py +0 -777
- h5rdmtoolbox-2.7.3/h5rdmtoolbox/wrapper/h5utils.py +0 -32
- h5rdmtoolbox-2.7.3/h5rdmtoolbox.egg-info/entry_points.txt +0 -2
- h5rdmtoolbox-2.7.3/h5rdmtoolbox.egg-info/top_level.txt +0 -1
- h5rdmtoolbox-2.7.3/tests/test_cli.py +0 -69
- h5rdmtoolbox-2.7.3/tests/test_extensions.py +0 -148
- h5rdmtoolbox-2.7.3/tests/test_repr.py +0 -114
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/LICENSE +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/_cfg.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/_repr.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/_version.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/catalog/__init__.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/catalog/_initialization.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/catalog/abstracts.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/catalog/profiles.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/catalog/query_templates.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/catalog/stores/__init__.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/catalog/stores/hdf5.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/catalog/utils.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/consts.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/convention/consts.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/convention/errors.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/convention/generate.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/convention/ontology/__init__.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/convention/ontology/h5ontocls.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/convention/ontology/hdf_datatypes.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/convention/references.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/convention/toolbox_validators.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/convention/utils.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/data/def_icon.png +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/data/fluid-v1.yml +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/data/h5tbx.yaml +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/data/id_icon.png +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/data/iri_icon.png +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/data/ld_icon.png +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/data/piv-v1.yml +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/data/style.css +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/data/tutorial_convention.yaml +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/data/tutorial_convention_vfuncs.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/data/tutorial_standard_name_table.yaml +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/data/type_icon.png +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/database/__init__.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/database/hdfdb/__init__.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/database/hdfdb/filedb.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/database/hdfdb/objdb.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/database/hdfdb/query.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/database/hdfdb/utils.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/database/interface.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/database/lazy.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/errors.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/extensions/__init__.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/extensions/onto.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/extensions/vector.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/gui/__init__.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/gui/src/__init__.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/gui/src/main.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/identifiers.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/layout/__init__.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/layout/core.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/ld/_types.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/ld/globals.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/ld/hdf/__init__.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/ld/hdf/groups.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/ld/rdf.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/ld/user/__init__.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/ld/user/datasets.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/ld/user/groups.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/plotting.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/protected_attributes.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/repository/__init__.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/repository/default_metamapper.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/repository/interface.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/repository/utils.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/repository/zenodo/__init__.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/repository/zenodo/core.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/repository/zenodo/metadata.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/repository/zenodo/tokens.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/repository/zenodo/utils.py +0 -0
- /h5rdmtoolbox-2.7.3/h5rdmtoolbox/wrapper/accessors/__init__.py → /h5rdmtoolbox-2.8.0/h5rdmtoolbox/server/templates/file.html +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/tutorial.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/wrapper/__init__.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/wrapper/accessor.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/wrapper/accessors/provenance.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/wrapper/ds_decoder.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox/wrapper/h5ext.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/h5rdmtoolbox.egg-info/dependency_links.txt +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/setup.cfg +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/tests/test_config.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/tests/test_identifiers.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/tests/test_plotting.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/tests/test_readme.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/tests/test_user.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/tests/test_utils.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/tests/test_version.py +0 -0
- {h5rdmtoolbox-2.7.3 → h5rdmtoolbox-2.8.0}/tests/test_xarray_export.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: h5rdmtoolbox
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.8.0
|
|
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
|
|
@@ -61,7 +61,7 @@ Requires-Dist: pytest>=8.3.3; extra == "test-core"
|
|
|
61
61
|
Requires-Dist: pytest-cov>=5.0.0; extra == "test-core"
|
|
62
62
|
Requires-Dist: pylint; extra == "test-core"
|
|
63
63
|
Requires-Dist: ssnolib<3.0.0,>=2.2.0.2; extra == "test-core"
|
|
64
|
-
Requires-Dist: mongomock==4.
|
|
64
|
+
Requires-Dist: mongomock==4.3.0; extra == "test-core"
|
|
65
65
|
Requires-Dist: scipy>=1.10.1; extra == "test-core"
|
|
66
66
|
Requires-Dist: scikit-image>=0.21.0; extra == "test-core"
|
|
67
67
|
Requires-Dist: scikit-learn; extra == "test-core"
|
|
@@ -75,9 +75,13 @@ Requires-Dist: sphinx_design==0.6.1; extra == "docs"
|
|
|
75
75
|
Requires-Dist: myst_nb==1.2.0; extra == "docs"
|
|
76
76
|
Requires-Dist: sphinxcontrib_bibtex==2.6.3; extra == "docs"
|
|
77
77
|
Provides-Extra: complete
|
|
78
|
-
Requires-Dist: h5rdmtoolbox[
|
|
78
|
+
Requires-Dist: h5rdmtoolbox[gui,test]; extra == "complete"
|
|
79
79
|
Provides-Extra: complete-with-docs
|
|
80
80
|
Requires-Dist: h5rdmtoolbox[complete,docs]; extra == "complete-with-docs"
|
|
81
|
+
Provides-Extra: server
|
|
82
|
+
Requires-Dist: fastapi>=0.95; extra == "server"
|
|
83
|
+
Requires-Dist: uvicorn[standard]>=0.22; extra == "server"
|
|
84
|
+
Requires-Dist: jinja2>=3.1; extra == "server"
|
|
81
85
|
Dynamic: license-file
|
|
82
86
|
|
|
83
87
|
# HDF5 Research Data Management Toolbox
|
|
@@ -233,18 +237,37 @@ hdf:H5T_INTEL_I64 a hdf:Datatype .
|
|
|
233
237
|
hdf:size 4 .
|
|
234
238
|
```
|
|
235
239
|
|
|
236
|
-
|
|
240
|
+
## Command Line Interface
|
|
237
241
|
|
|
238
|
-
|
|
242
|
+
The `h5tbx` command provides quick access to linked-data serialization and local inspection from the shell.
|
|
239
243
|
|
|
240
|
-
|
|
244
|
+
Use `h5tbx ld dump example.h5` to print Turtle RDF, or write a specific format with:
|
|
241
245
|
|
|
242
|
-
|
|
246
|
+
```bash
|
|
247
|
+
h5tbx ld dump example.h5 -o example.jsonld
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
The dump command accepts `--format`, `--file-uri`, `--prefix`, `--structural=false`, and `--contextual=false`, so you can choose RDF output, assign stable RDF subject URIs, bind a compact prefix, and include only structural or user-provided contextual metadata when needed.
|
|
251
|
+
|
|
252
|
+
To inspect files in a browser, run:
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
h5tbx serve example.h5
|
|
256
|
+
h5tbx serve data/ --h5ext=.h5 --h5ext=.hdf5
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
The local web app links to Turtle, JSON-LD, N-Triples, RDF/XML, an interactive graph view, SPARQL query editor, graph metrics, and SHACL validation. Per-file buttons are scoped to that file; the landing page also offers a separate combined graph section for all served files plus loaded enrichment. Combined graph visualization is reduced by default with node/edge limits and search controls, and combined metrics skip exact largest-distance computation on very large graphs to keep the local server responsive. HDF5 object URLs such as `/example.h5/group/dataset` dereference to a browser HTML page by default, while `Accept: text/turtle`, `Accept: application/ld+json`, or `?format=ttl|jsonld|nt|xml|html` return the requested representation. For published DOI-style file URIs, use `/resolve?iri=https://doi.org/...%23path` to resolve an exact external RDF subject locally. The resolver uses the first matching served HDF5 subject, caches all served files in one shared query graph, and enriches that graph with known ontology TTL sources, QUDT unit definitions, Zenodo RDF attachments, generic ontology documents, and Wikidata direct claims where applicable. URI values in resource pages link back into `/resolve?iri=...` so browsing stays inside the local app; if a browser request cannot be resolved locally, the app opens the original IRI in a new tab as a fallback. `h5tbx serve` accepts files and folders; folder discovery uses `.h5`, `.hdf`, and `.hdf5` by default, or repeated `--h5ext` values. `--local-iri-pattern` is optional and only limits which external IRIs get local resolver links in the graph view. If no filename is provided, `h5tbx serve` lists all matching HDF5 files in the current directory.
|
|
260
|
+
|
|
261
|
+
The same graph metrics are available from Python:
|
|
243
262
|
|
|
244
|
-
|
|
263
|
+
```python
|
|
264
|
+
import h5rdmtoolbox as h5tbx
|
|
245
265
|
|
|
246
|
-
|
|
266
|
+
metrics = h5tbx.compute_metrics("example.h5")
|
|
247
267
|
|
|
268
|
+
with h5tbx.File("example.h5") as h5:
|
|
269
|
+
metrics = h5.metrics()
|
|
270
|
+
```
|
|
248
271
|
|
|
249
272
|
## 🚀 Key Features
|
|
250
273
|
|
|
@@ -151,18 +151,37 @@ hdf:H5T_INTEL_I64 a hdf:Datatype .
|
|
|
151
151
|
hdf:size 4 .
|
|
152
152
|
```
|
|
153
153
|
|
|
154
|
-
|
|
154
|
+
## Command Line Interface
|
|
155
155
|
|
|
156
|
-
|
|
156
|
+
The `h5tbx` command provides quick access to linked-data serialization and local inspection from the shell.
|
|
157
157
|
|
|
158
|
-
|
|
158
|
+
Use `h5tbx ld dump example.h5` to print Turtle RDF, or write a specific format with:
|
|
159
159
|
|
|
160
|
-
|
|
160
|
+
```bash
|
|
161
|
+
h5tbx ld dump example.h5 -o example.jsonld
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
The dump command accepts `--format`, `--file-uri`, `--prefix`, `--structural=false`, and `--contextual=false`, so you can choose RDF output, assign stable RDF subject URIs, bind a compact prefix, and include only structural or user-provided contextual metadata when needed.
|
|
165
|
+
|
|
166
|
+
To inspect files in a browser, run:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
h5tbx serve example.h5
|
|
170
|
+
h5tbx serve data/ --h5ext=.h5 --h5ext=.hdf5
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
The local web app links to Turtle, JSON-LD, N-Triples, RDF/XML, an interactive graph view, SPARQL query editor, graph metrics, and SHACL validation. Per-file buttons are scoped to that file; the landing page also offers a separate combined graph section for all served files plus loaded enrichment. Combined graph visualization is reduced by default with node/edge limits and search controls, and combined metrics skip exact largest-distance computation on very large graphs to keep the local server responsive. HDF5 object URLs such as `/example.h5/group/dataset` dereference to a browser HTML page by default, while `Accept: text/turtle`, `Accept: application/ld+json`, or `?format=ttl|jsonld|nt|xml|html` return the requested representation. For published DOI-style file URIs, use `/resolve?iri=https://doi.org/...%23path` to resolve an exact external RDF subject locally. The resolver uses the first matching served HDF5 subject, caches all served files in one shared query graph, and enriches that graph with known ontology TTL sources, QUDT unit definitions, Zenodo RDF attachments, generic ontology documents, and Wikidata direct claims where applicable. URI values in resource pages link back into `/resolve?iri=...` so browsing stays inside the local app; if a browser request cannot be resolved locally, the app opens the original IRI in a new tab as a fallback. `h5tbx serve` accepts files and folders; folder discovery uses `.h5`, `.hdf`, and `.hdf5` by default, or repeated `--h5ext` values. `--local-iri-pattern` is optional and only limits which external IRIs get local resolver links in the graph view. If no filename is provided, `h5tbx serve` lists all matching HDF5 files in the current directory.
|
|
174
|
+
|
|
175
|
+
The same graph metrics are available from Python:
|
|
161
176
|
|
|
162
|
-
|
|
177
|
+
```python
|
|
178
|
+
import h5rdmtoolbox as h5tbx
|
|
163
179
|
|
|
164
|
-
|
|
180
|
+
metrics = h5tbx.compute_metrics("example.h5")
|
|
165
181
|
|
|
182
|
+
with h5tbx.File("example.h5") as h5:
|
|
183
|
+
metrics = h5.metrics()
|
|
184
|
+
```
|
|
166
185
|
|
|
167
186
|
## 🚀 Key Features
|
|
168
187
|
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import logging
|
|
4
4
|
import pathlib
|
|
5
|
-
import warnings
|
|
6
5
|
from logging.handlers import RotatingFileHandler
|
|
7
6
|
from typing import Optional, Dict
|
|
8
7
|
|
|
@@ -20,7 +19,7 @@ _stream_handler = logging.StreamHandler()
|
|
|
20
19
|
_stream_handler.setLevel(DEFAULT_LOGGING_LEVEL)
|
|
21
20
|
_stream_handler.setFormatter(_formatter)
|
|
22
21
|
|
|
23
|
-
_file_handler = RotatingFileHandler(USER_LOG_DIR / 'h5rdmtoolbox.log')
|
|
22
|
+
_file_handler = RotatingFileHandler(USER_LOG_DIR / 'h5rdmtoolbox.log', delay=True)
|
|
24
23
|
_file_handler.setLevel(logging.DEBUG) # log everything to file!
|
|
25
24
|
_file_handler.setFormatter(_formatter)
|
|
26
25
|
|
|
@@ -136,13 +135,46 @@ def get_ld(
|
|
|
136
135
|
context: Optional[Dict] = None
|
|
137
136
|
) -> rdflib.Graph:
|
|
138
137
|
"""Return the HDF file content as a rdflib.Graph object."""
|
|
139
|
-
from
|
|
140
|
-
return get_ld(
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
138
|
+
from . import ld
|
|
139
|
+
return ld.get_ld(
|
|
140
|
+
hdf_filename,
|
|
141
|
+
structural=structural,
|
|
142
|
+
contextual=contextual,
|
|
143
|
+
skipND=skipND,
|
|
144
|
+
file_uri=file_uri,
|
|
145
|
+
context=context,
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
def compute_metrics(
|
|
150
|
+
hdf_filename: Union[str, pathlib.Path],
|
|
151
|
+
structural: bool = True,
|
|
152
|
+
contextual: bool = True,
|
|
153
|
+
skipND: int = 1,
|
|
154
|
+
file_uri: Optional[str] = None,
|
|
155
|
+
context: Optional[Dict] = None,
|
|
156
|
+
rdf_mappings: Dict[str, RDFMappingEntry] = None,
|
|
157
|
+
) -> Dict[str, object]:
|
|
158
|
+
"""Compute RDF knowledge graph metrics for an HDF5 file."""
|
|
159
|
+
from .ld.metrics import compute_metrics as _compute_metrics
|
|
160
|
+
return _compute_metrics(
|
|
161
|
+
hdf_filename,
|
|
162
|
+
structural=structural,
|
|
163
|
+
contextual=contextual,
|
|
164
|
+
skipND=skipND,
|
|
165
|
+
file_uri=file_uri,
|
|
166
|
+
context=context,
|
|
167
|
+
rdf_mappings=rdf_mappings,
|
|
168
|
+
)
|
|
169
|
+
|
|
170
|
+
|
|
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
|
+
def _resolve_serialize_format(fmt: str, kwargs: Dict) -> str:
|
|
177
|
+
return kwargs.pop("format", fmt)
|
|
146
178
|
|
|
147
179
|
|
|
148
180
|
def dump_jsonld(
|
|
@@ -155,19 +187,16 @@ def dump_jsonld(
|
|
|
155
187
|
file_uri: Optional[str] = None
|
|
156
188
|
):
|
|
157
189
|
"""Return the file content as a JSON-LD string."""
|
|
158
|
-
from .ld import optimize_context
|
|
159
|
-
context = context or {}
|
|
160
190
|
graph = get_ld(hdf_filename,
|
|
161
191
|
structural=structural,
|
|
162
192
|
contextual=contextual,
|
|
163
193
|
file_uri=file_uri,
|
|
164
194
|
skipND=skipND)
|
|
165
|
-
context = optimize_context(graph, context)
|
|
166
195
|
return graph.serialize(
|
|
167
196
|
format="json-ld",
|
|
168
197
|
indent=indent,
|
|
169
198
|
auto_compact=True,
|
|
170
|
-
context=context
|
|
199
|
+
context=_optimize_ld_context(graph, context)
|
|
171
200
|
)
|
|
172
201
|
|
|
173
202
|
|
|
@@ -286,7 +315,7 @@ def serialize(hdf_filename,
|
|
|
286
315
|
rdf_mappings: Dict[str, RDFMappingEntry] = None,
|
|
287
316
|
**kwargs):
|
|
288
317
|
"""Alternative to json-ld but allows multiple serialization options"""
|
|
289
|
-
fmt =
|
|
318
|
+
fmt = _resolve_serialize_format(fmt, kwargs)
|
|
290
319
|
with File(hdf_filename) as h5:
|
|
291
320
|
return h5.serialize(fmt=fmt,
|
|
292
321
|
skipND=skipND,
|
|
@@ -296,6 +325,32 @@ def serialize(hdf_filename,
|
|
|
296
325
|
rdf_mappings=rdf_mappings)
|
|
297
326
|
|
|
298
327
|
|
|
328
|
+
def sparql(
|
|
329
|
+
hdf_filename: Union[str, pathlib.Path],
|
|
330
|
+
query: str,
|
|
331
|
+
structural: bool = True,
|
|
332
|
+
contextual: bool = True,
|
|
333
|
+
skipND: int = 1,
|
|
334
|
+
file_uri: Optional[Union[str, Dict[str, str]]] = None,
|
|
335
|
+
rdf_mappings: Dict[str, RDFMappingEntry] = None,
|
|
336
|
+
as_dataframe: bool = False,
|
|
337
|
+
**kwargs
|
|
338
|
+
) -> rdflib.query.Result:
|
|
339
|
+
"""Run a SPARQL query on the HDF5 file content. Returns a rdflib.query.Result object."""
|
|
340
|
+
from .ld import sparql
|
|
341
|
+
return sparql(
|
|
342
|
+
source=hdf_filename,
|
|
343
|
+
query=query,
|
|
344
|
+
structural=structural,
|
|
345
|
+
contextual=contextual,
|
|
346
|
+
skipND=skipND,
|
|
347
|
+
file_uri=file_uri,
|
|
348
|
+
rdf_mappings=rdf_mappings,
|
|
349
|
+
as_dataframe=as_dataframe,
|
|
350
|
+
**kwargs
|
|
351
|
+
)
|
|
352
|
+
|
|
353
|
+
|
|
299
354
|
def build_pyvis_graph(hdf_filename, output_filename="kg-graph.html", notebook=False,
|
|
300
355
|
structural: bool = True,
|
|
301
356
|
contextual: bool = True,
|