From 4c7fb6256539a6a4b29d8db12f36c8b81cd1b83e Mon Sep 17 00:00:00 2001 From: aishwariyachakraborty Date: Thu, 3 Oct 2024 16:24:29 +0530 Subject: [PATCH] changes to ensure data files are present in wheel --- .../higher_order_syntactic_profiler/python/pyproject.toml | 6 ++++++ transforms/code/semantic_profiler/python/pyproject.toml | 6 ++++++ transforms/code/semantic_profiler/python/src/sp_local.py | 2 +- .../code/semantic_profiler/python/src/sp_local_python.py | 4 ++-- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/transforms/code/higher_order_syntactic_profiler/python/pyproject.toml b/transforms/code/higher_order_syntactic_profiler/python/pyproject.toml index 6a5686a0a..27265e218 100644 --- a/transforms/code/higher_order_syntactic_profiler/python/pyproject.toml +++ b/transforms/code/higher_order_syntactic_profiler/python/pyproject.toml @@ -48,3 +48,9 @@ markers = ["unit: unit tests", "integration: integration tests"] [tool.coverage.run] include = ["src/*"] + +[tool.setuptools.packages.find] +where = ["src"] + +[tool.setuptools.package-data] +'src' = ['template.html'] \ No newline at end of file diff --git a/transforms/code/semantic_profiler/python/pyproject.toml b/transforms/code/semantic_profiler/python/pyproject.toml index c7faa5b11..7603f9aa2 100644 --- a/transforms/code/semantic_profiler/python/pyproject.toml +++ b/transforms/code/semantic_profiler/python/pyproject.toml @@ -43,3 +43,9 @@ markers = ["unit: unit tests", "integration: integration tests"] [tool.coverage.run] include = ["src/*"] + +[tool.setuptools.packages.find] +where = ["src"] + +[tool.setuptools.package-data] +'src' = ['*.csv'] \ No newline at end of file diff --git a/transforms/code/semantic_profiler/python/src/sp_local.py b/transforms/code/semantic_profiler/python/src/sp_local.py index 33a863f7a..21a03da31 100644 --- a/transforms/code/semantic_profiler/python/src/sp_local.py +++ b/transforms/code/semantic_profiler/python/src/sp_local.py @@ -19,7 +19,7 @@ # create parameters input_folder = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "test-data", "input")) -sp_params = {"ikb_file": "src/ikb/ikb_model.csv", "null_libs_file": "src/ikb/null_libs.csv"} +sp_params = {"ikb_file": "ikb/ikb_model.csv", "null_libs_file": "ikb/null_libs.csv"} if __name__ == "__main__": # Here we show how to run outside of the runtime diff --git a/transforms/code/semantic_profiler/python/src/sp_local_python.py b/transforms/code/semantic_profiler/python/src/sp_local_python.py index be468d761..8fda420e7 100644 --- a/transforms/code/semantic_profiler/python/src/sp_local_python.py +++ b/transforms/code/semantic_profiler/python/src/sp_local_python.py @@ -34,8 +34,8 @@ "runtime_job_id": "job_id", "runtime_code_location": ParamsUtils.convert_to_ast(code_location), # sp params - "sp_ikb_file": "src/ikb/ikb_model.csv", - "sp_null_libs_file": "src/ikb/null_libs.csv" + "sp_ikb_file": "ikb/ikb_model.csv", + "sp_null_libs_file": "ikb/null_libs.csv" } if __name__ == "__main__":