diff --git a/.cruft.json b/.cruft.json index 79b0e25..a8029b2 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/DHARPA-Project/kiara_plugin.develop.git", - "commit": "96e37df1692a56068082857a41318dc7d17f1643", + "commit": "61841496d46e8ce4f79da1126443524bde03f977", "context": { "cookiecutter": { "full_name": "Markus Binsteiner", diff --git a/ci/conda/conda-pkg-patch.yaml b/ci/conda/conda-pkg-patch.yaml index 83a76ea..ad78b69 100644 --- a/ci/conda/conda-pkg-patch.yaml +++ b/ci/conda/conda-pkg-patch.yaml @@ -19,4 +19,4 @@ test: - examples commands: - kiara module list - - kiara run import.table.from.local_file_path path=examples/data/journals/JournalEdges1902.csv + - kiara run import.table.from.local_file_path path=examples/data/journals/JournalEdges1902.csv -c conda diff --git a/pyproject.toml b/pyproject.toml index 33e59e8..287e682 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,8 +47,8 @@ classifiers = [ "Programming Language :: Python :: 3.12" ] dependencies = [ - "kiara>=0.5.10rc6,<0.6.0", - "kiara_plugin.core_types>=0.5.0,<0.6.0", + "kiara>=0.5.10rc10,<0.6.0", + "kiara_plugin.core_types>=0.5.1rc1,<0.6.0", "duckdb>=0.10.0,<0.11.0", "pandas>=1.4.0", "polars>=0.18.0", diff --git a/tests/conftest.py b/tests/conftest.py index 5296121..243f5cf 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -17,13 +17,16 @@ import pytest +from kiara.api import JobDesc, KiaraAPI from kiara.context import KiaraConfig -from kiara.interfaces.python_api import KiaraAPI -from kiara.interfaces.python_api.models.job import JobDesc, JobTest +from kiara.interfaces.python_api.models.job import JobTest from kiara.utils.testing import get_init_job, get_tests_for_job, list_job_descs ROOT_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) -JOBS_FOLDER = Path(os.path.join(ROOT_DIR, "examples", "jobs")) +JOBS_FOLDERS = [ + Path(os.path.join(ROOT_DIR, "tests", "resources", "jobs")), + Path(os.path.join(ROOT_DIR, "examples", "jobs")), +] def create_temp_dir(): @@ -54,22 +57,28 @@ def kiara_api_init_example() -> KiaraAPI: kc = KiaraConfig.create_in_folder(instance_path) api = KiaraAPI(kc) - init_job = get_init_job(JOBS_FOLDER) - if init_job is None: + init_jobs = [] + for jobs_folder in JOBS_FOLDERS: + init_job = get_init_job(jobs_folder) + if init_job is not None: + init_jobs.append(init_job) + + if not init_jobs: return api - results = api.run_job(init_job, comment="Init test job") + for init_job in init_jobs: + results = api.run_job(init_job, comment="Init example job") - if not init_job.save: - return api + if not init_job.save: + continue - for field_name, alias_name in init_job.save.items(): - api.store_value(results[field_name], alias_name) + for field_name, alias_name in init_job.save.items(): + api.store_value(results[field_name], alias_name) return api -@pytest.fixture(params=list_job_descs(JOBS_FOLDER), ids=get_job_alias) +@pytest.fixture(params=list_job_descs(JOBS_FOLDERS), ids=get_job_alias) def example_job_test(request, kiara_api_init_example) -> JobTest: job_tests_folder = Path(os.path.join(ROOT_DIR, "tests", "job_tests")) diff --git a/tests/resources/jobs/.gitkeep b/tests/resources/jobs/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tests/resources/pipelines/.gitkeep b/tests/resources/pipelines/.gitkeep new file mode 100644 index 0000000..e69de29