Skip to content

Commit 9e55d8a

Browse files
Support jsonpath-ng 1.8.0
Works around an behavior change in jsonpath-ng 1.8.0 where Child.str gets wrapped in parenthesis.
1 parent 92772d8 commit 9e55d8a

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

cdisc_rules_engine/services/data_services/usdm_data_service.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,8 +417,19 @@ def __read_node_metadata(
417417
}
418418

419419
@staticmethod
420-
def __get_full_path(node: DatumInContext):
421-
return f"{node.full_path}".replace(".[", "[")
420+
def __get_full_path(node: DatumInContext) -> str:
421+
parts = []
422+
current = node
423+
while current is not None and current.context is not None:
424+
parts.append(str(current.path))
425+
current = current.context
426+
result = ""
427+
for part in reversed(parts):
428+
if part.startswith("["):
429+
result += part
430+
else:
431+
result = (result + "." if result else "") + part
432+
return result
422433

423434
def __get_datasets_content_index(self) -> List[dict]:
424435
"""

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dependencies = [
1919
"fastparquet >=2024.2.0",
2020
"importlib-metadata >=8.5.0",
2121
"jsonata-python >=0.6.0",
22-
"jsonpath-ng >=1.6.1, <1.8.0",
22+
"jsonpath-ng >=1.6.1",
2323
"jsonschema >=4.18.5",
2424
"lxml >=5.2.1",
2525
"numpy >=1.26.0",

0 commit comments

Comments
 (0)