diff --git a/src/pyrdfrules/__about__.py b/src/pyrdfrules/__about__.py index b0e7df8..9842da8 100644 --- a/src/pyrdfrules/__about__.py +++ b/src/pyrdfrules/__about__.py @@ -1,4 +1,4 @@ # SPDX-FileCopyrightText: 2023-present Karel Douda # # SPDX-License-Identifier: MIT -__version__ = "0.0.9" +__version__ = "0.0.11" diff --git a/src/pyrdfrules/engine/util/jvm.py b/src/pyrdfrules/engine/util/jvm.py index 78f2ded..c992865 100644 --- a/src/pyrdfrules/engine/util/jvm.py +++ b/src/pyrdfrules/engine/util/jvm.py @@ -51,6 +51,15 @@ def setup(rdf_rules_path: str = '', jvm_path: str = '', workspace_path: str|Path global _workspace_path _workspace_path = str(workspace_path) + if not os.path.exists(_workspace_path): + os.makedirs(_workspace_path, exist_ok=True) + + if not os.path.exists(_rdfrules_path): + os.makedirs(_rdfrules_path, exist_ok=True) + + if _jvm_path and not os.path.exists(_jvm_path): + os.makedirs(_jvm_path, exist_ok=True) + pass def get_jvm_path() -> str: diff --git a/src/tests/test_local_pipeline.py b/src/tests/test_local_pipeline.py index 42e4cc6..39eca2f 100644 --- a/src/tests/test_local_pipeline.py +++ b/src/tests/test_local_pipeline.py @@ -19,6 +19,9 @@ def get_path(file_name): # from https://stackoverflow.com/questions/16694907/download-large-file-in-python-with-requests def download_file(url, file_name, base_path): file_path = os.path.join(base_path, "dbpedia_yago", file_name) + + os.makedirs(os.path.join(base_path, "dbpedia_yago"), exist_ok=True) + print(file_path) # check if the file already exists if os.path.exists(file_path):