Skip to content

Commit

Permalink
Show all converter versions. Just in case
Browse files Browse the repository at this point in the history
  • Loading branch information
TorecLuik committed Jul 17, 2024
1 parent 4a18be0 commit 2895fe2
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions biomero/slurm_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,17 @@ def list_available_converter_versions(self) -> Dict:
r = self.run_commands([cmd])
result_dict = {}
if r.ok:
# split lines further into a k,v dict
result_dict = {line.rsplit(' ', 1)[0]: line.rsplit(' ', 1)[1] for line in r.stdout.strip().split('\n')}
# Iterate over each line in the output
for line in r.stdout.strip().split('\n'):
# Split the line into key and version
key, version = line.rsplit(' ', 1)
# Check if the key already exists in the dictionary
if key in result_dict:
# Append the version to the existing list
result_dict[key].append(version)
else:
# Create a new list with the version
result_dict[key] = [version]
return result_dict

def setup_converters(self):
Expand Down

0 comments on commit 2895fe2

Please sign in to comment.