From 8fdf26494a2b3dcd63c214a2a7d0c0ac9109cd29 Mon Sep 17 00:00:00 2001 From: MatthiasProbst Date: Sun, 21 Apr 2024 23:09:18 +0200 Subject: [PATCH] rdf module moved to wrapper --- h5rdmtoolbox/_repr.py | 2 +- h5rdmtoolbox/utils.py | 2 +- h5rdmtoolbox/wrapper/core.py | 3 +-- h5rdmtoolbox/{convention => wrapper}/rdf.py | 0 tests/wrapper/test_jsonld.py | 5 ++--- tests/wrapper/test_rdf.py | 4 ++-- 6 files changed, 7 insertions(+), 9 deletions(-) rename h5rdmtoolbox/{convention => wrapper}/rdf.py (100%) diff --git a/h5rdmtoolbox/_repr.py b/h5rdmtoolbox/_repr.py index 9bc03773..a743fcee 100644 --- a/h5rdmtoolbox/_repr.py +++ b/h5rdmtoolbox/_repr.py @@ -14,7 +14,7 @@ from ontolutils import M4I, Thing from . import get_config, identifiers, protected_attributes -from .convention.rdf import RDF_SUBJECT_ATTR_NAME, RDF_PREDICATE_ATTR_NAME, RDF_OBJECT_ATTR_NAME +from h5rdmtoolbox.wrapper.rdf import RDF_SUBJECT_ATTR_NAME, RDF_PREDICATE_ATTR_NAME, RDF_OBJECT_ATTR_NAME H5PY_SPECIAL_ATTRIBUTES = ('DIMENSION_LIST', 'REFERENCE_LIST', 'NAME', 'CLASS', protected_attributes.COORDINATES) try: diff --git a/h5rdmtoolbox/utils.py b/h5rdmtoolbox/utils.py index 77689c5c..587e08e0 100644 --- a/h5rdmtoolbox/utils.py +++ b/h5rdmtoolbox/utils.py @@ -21,7 +21,7 @@ from . import _user, get_config, get_ureg from ._version import __version__ -from .convention import rdf +from .wrapper import rdf logger = logging.getLogger('h5rdmtoolbox') DEFAULT_LOGGING_LEVEL = logging.INFO diff --git a/h5rdmtoolbox/wrapper/core.py b/h5rdmtoolbox/wrapper/core.py index ea3a1bea..2f22c4ff 100644 --- a/h5rdmtoolbox/wrapper/core.py +++ b/h5rdmtoolbox/wrapper/core.py @@ -23,7 +23,7 @@ from h5rdmtoolbox.database import ObjDB from h5rdmtoolbox.database.lazy import LHDFObject # noinspection PyUnresolvedReferences -from . import xr2hdf +from . import xr2hdf, rdf from .ds_decoder import dataset_value_decoder from .h5attr import H5_DIM_ATTRS, pop_hdf_attributes, WrapperAttributeManager from .h5utils import _is_not_valid_natural_name, get_rootparent @@ -31,7 +31,6 @@ from .. import get_ureg from .._repr import H5Repr, H5PY_SPECIAL_ATTRIBUTES from ..convention import definition -from ..convention import rdf from ..convention.consts import DefaultValue logger = logging.getLogger('h5rdmtoolbox') diff --git a/h5rdmtoolbox/convention/rdf.py b/h5rdmtoolbox/wrapper/rdf.py similarity index 100% rename from h5rdmtoolbox/convention/rdf.py rename to h5rdmtoolbox/wrapper/rdf.py diff --git a/tests/wrapper/test_jsonld.py b/tests/wrapper/test_jsonld.py index 72ca0e3f..d0ca2968 100644 --- a/tests/wrapper/test_jsonld.py +++ b/tests/wrapper/test_jsonld.py @@ -10,10 +10,9 @@ import h5rdmtoolbox as h5tbx from h5rdmtoolbox import __version__ -from h5rdmtoolbox.convention import rdf from h5rdmtoolbox.convention.hdf_ontology import HDF5 -from h5rdmtoolbox.convention.rdf import RDF_SUBJECT_ATTR_NAME -from h5rdmtoolbox.wrapper import jsonld +from h5rdmtoolbox.wrapper.rdf import RDF_SUBJECT_ATTR_NAME +from h5rdmtoolbox.wrapper import jsonld, rdf from h5rdmtoolbox.wrapper.jsonld import build_node_list logger = h5tbx.logger diff --git a/tests/wrapper/test_rdf.py b/tests/wrapper/test_rdf.py index 1b371f1f..2d8710fd 100644 --- a/tests/wrapper/test_rdf.py +++ b/tests/wrapper/test_rdf.py @@ -8,8 +8,8 @@ from h5rdmtoolbox import Attribute from h5rdmtoolbox import jsonld from h5rdmtoolbox import use -from h5rdmtoolbox.convention.rdf import RDFError -from h5rdmtoolbox.convention.rdf import RDF_PREDICATE_ATTR_NAME +from h5rdmtoolbox.wrapper.rdf import RDFError +from h5rdmtoolbox.wrapper.rdf import RDF_PREDICATE_ATTR_NAME from h5rdmtoolbox.wrapper.h5attr import AttrDescriptionError