Skip to content

Commit

Permalink
fix env, extra logging oscar.py
Browse files Browse the repository at this point in the history
  • Loading branch information
WOTrompDeltares committed Nov 21, 2024
1 parent fccd7bf commit 70bf9e8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions DT_flood/workflows/cwl_OSCAR/oscar_workflow/oscar.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

def check_oscar_connection():
# Check the service or create it
print("Checking OSCAR connection status")
options_basic_auth = {'cluster_id':'cluster-id',
'endpoint': endpoint,
'user':user,
Expand All @@ -46,6 +47,7 @@ def check_oscar_connection():


def check_service(client,service,service_directory):
print("Checking OSCAR service status")
try:
service_info = client.get_service(service)
minio_info = json.loads(service_info.text)["storage_providers"]["minio"]["default"]
Expand Down Expand Up @@ -116,6 +118,7 @@ def wait_output_and_download(client, output_info):


def compress():
print("Compressing input")
files = os.listdir(filename)
tar_file_ = tarfile.open(filename + ".tar", "w")
for x in files:
Expand All @@ -126,6 +129,7 @@ def compress():


def decompress(output_file):
print("Decompressing output")
with tarfile.open(output_file, 'r') as tar:
for member in tar.getmembers():
tar.extract(member, path=output)
Expand Down
9 changes: 6 additions & 3 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ dependencies:
- dask=2024.6.0
- ipykernel
- hydromt_wflow
- pandas>2.0.0
- python<3.12
- pip
- pip:
- pip:
- jupyter
- git+https://github.com/Deltares-research/FloodAdapt.git@6a18711
- gwwapi
- git+https://github.com/Deltares-research/FloodAdapt.git
- gwwapi
- minio
- oscar-python

0 comments on commit 70bf9e8

Please sign in to comment.