Skip to content

Commit

Permalink
using dummy code for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
cehbrecht committed Sep 4, 2023
1 parent b5687b1 commit db90e85
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,6 @@ testdata.json

# macos
.DS_Store

# provenance
provenance.db
24 changes: 18 additions & 6 deletions duck/processes/wps_clintai.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down

0 comments on commit db90e85

Please sign in to comment.