Skip to content

Commit 6c01d4c

Browse files
logs (#16)
1 parent a4f153b commit 6c01d4c

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

energyml-utils/src/energyml/utils/data/datasets_io.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,7 @@ def read_external_dataset_array(
575575
def get_path_in_external(obj) -> List[Any]:
576576
"""
577577
See :func:`get_path_in_external_with_path`. Only the value is returned, not the dot path into the object
578+
578579
:param obj:
579580
:return:
580581
"""
@@ -596,14 +597,14 @@ def get_proxy_uri_for_path_in_external(obj: Any, dataspace_name_or_uri: Union[st
596597
"""
597598
Search all PathInHdfFile or PathInExternalFile in the object and return a map of uri to list of path found
598599
in the object for this uri.
600+
599601
:param obj:
600602
:param dataspace_name_or_uri: the dataspace name or uri to search
601603
:return: { uri : [ path_in_external1, path_in_external2, ... ], ... }
602604
"""
603605
if dataspace_name_or_uri is not None and isinstance(dataspace_name_or_uri, str):
604606
dataspace_name_or_uri = dataspace_name_or_uri.strip()
605607
ds_name = dataspace_name_or_uri
606-
ds_uri = dataspace_name_or_uri
607608
if isinstance(dataspace_name_or_uri, str):
608609
if dataspace_name_or_uri is not None:
609610
if not dataspace_name_or_uri.startswith("eml:///"):
@@ -614,13 +615,12 @@ def get_proxy_uri_for_path_in_external(obj: Any, dataspace_name_or_uri: Union[st
614615
assert ds_uri is not None, f"Cannot parse dataspace uri {dataspace_name_or_uri}"
615616
ds_name = ds_uri.dataspace
616617
elif isinstance(dataspace_name_or_uri, Uri):
617-
ds_uri = dataspace_name_or_uri
618618
ds_name = dataspace_name_or_uri.dataspace
619619

620620
uri_path_map = {}
621621
_piefs = get_path_in_external_with_path(obj)
622622
if _piefs is not None and len(_piefs) > 0:
623-
logging.info(f"Found {_piefs} datasets in object {get_obj_uuid(obj)}")
623+
# logging.info(f"Found {_piefs} datasets in object {get_obj_uuid(obj)}")
624624

625625
# uri_path_map[uri] = _piefs
626626
for item in _piefs:
@@ -631,7 +631,7 @@ def get_proxy_uri_for_path_in_external(obj: Any, dataspace_name_or_uri: Union[st
631631
)
632632
# Then unpack
633633
path, pief = item
634-
logging.info(f"\t test : {path_last_attribute(path)}")
634+
# logging.info(f"\t test : {path_last_attribute(path)}")
635635
if "hdf" in path_last_attribute(path).lower():
636636
dor = get_object_attribute(
637637
obj=obj, attr_dot_path=path[: -len(path_last_attribute(path))] + "hdf_proxy"

energyml-utils/src/energyml/utils/introspection.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,7 +1116,6 @@ def get_obj_pkg_pkgv_type_uuid_version(
11161116

11171117
if ct is not None:
11181118
ct_match = parse_content_type(ct)
1119-
logging.debug("ct : %S", ct_match)
11201119
if ct_match is not None:
11211120
pkg = ct_match.group("domain")
11221121
pkg_v = ct_match.group("domainVersion")
@@ -1125,7 +1124,6 @@ def get_obj_pkg_pkgv_type_uuid_version(
11251124
try:
11261125
qt = get_object_attribute_no_verif(obj, "qualified_type")
11271126
qt_match = parse_qualified_type(qt)
1128-
logging.debug("qt : %s %s", qt, obj.__dict__, qt_match)
11291127
if qt_match is not None:
11301128
pkg = qt_match.group("domain")
11311129
pkg_v = qt_match.group("domainVersion")

0 commit comments

Comments
 (0)