From db90e853b249ff833cda5ba5daaec2b9905530ae Mon Sep 17 00:00:00 2001 From: Carsten Ehbrecht Date: Mon, 4 Sep 2023 17:10:26 +0200 Subject: [PATCH] using dummy code for testing --- .gitignore | 3 +++ duck/processes/wps_clintai.py | 24 ++++++++++++++++++------ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index dcdcdb5..167a59d 100644 --- a/.gitignore +++ b/.gitignore @@ -111,3 +111,6 @@ testdata.json # macos .DS_Store + +# provenance +provenance.db diff --git a/duck/processes/wps_clintai.py b/duck/processes/wps_clintai.py index f6cf8cd..83d00fb 100644 --- a/duck/processes/wps_clintai.py +++ b/duck/processes/wps_clintai.py @@ -125,12 +125,24 @@ def _handler(self, request, response): raise ProcessError("Could not find variable {} in {}.".format(variable_name, dataset)) try: - clintai.run( - dataset, - dataset_name=dataset_name, - variable_name=variable_name, - outdir=workdir, - update_status=[response.update_status, i, istep]) + # dummy start + outputs_path = workdir / "outputs" + outputs_path.mkdir() + outfile = workdir / "outputs" / str(datasets[0].stem+"_infilled.nc") + print(outfile) + with outfile.open(mode='w') as file: + file.write("dummy\n") + plotfile = workdir / "outputs" / str(datasets[0].stem+"_combined.1_0.png") + print(plotfile) + with plotfile.open(mode='w') as file: + file.write("dummy plot\n") + # dummy end + # clintai.run( + # dataset, + # dataset_name=dataset_name, + # variable_name=variable_name, + # outdir=workdir, + # update_status=[response.update_status, i, istep]) except Exception as e: raise ProcessError(str(e))