Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
TShapinsky committed Dec 15, 2023
1 parent 1cfc6e1 commit 8ba7a79
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions alfalfa_client/alfalfa_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def get_inputs(self, run_id: str) -> List[str]:
:returns: list of input names"""

response = self._request(f"runs/{run_id}/points", method="POST",
parameters={ "pointTypes": ["INPUT", "BIDIRECTIONAL"]})
parameters={"pointTypes": ["INPUT", "BIDIRECTIONAL"]})
response_body = response.json()["payload"]
inputs = []
for point in response_body:
Expand All @@ -286,7 +286,7 @@ def get_outputs(self, run_id: str) -> dict:
:param run_id: id of run
:returns: dictionary of output names and values"""
response = self._request(f"runs/{run_id}/points/values", method="POST",
parameters={ "pointTypes": ["OUTPUT", "BIDIRECTIONAL"]})
parameters={"pointTypes": ["OUTPUT", "BIDIRECTIONAL"]})
response_body = response.json()["payload"]
outputs = {}
for point, value in response_body.items():
Expand Down Expand Up @@ -334,7 +334,7 @@ def _get_point_translation(self, *args):
return None

def _fetch_points(self, run_id):
response = self._request(f"runs/{run_id}/points", method = "GET")
response = self._request(f"runs/{run_id}/points", method="GET")
for point in response.json()["payload"]:
self.point_translation_map[(run_id, point["name"])] = point["id"]
self.point_translation_map[(run_id, point["id"])] = point["name"]
4 changes: 2 additions & 2 deletions alfalfa_client/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@

import concurrent.futures
import functools
import json
import shutil
import tempfile
from functools import partial
from os import PathLike, path
from pathlib import Path
from typing import List
import json


def parallelize(func):
Expand Down Expand Up @@ -120,6 +120,7 @@ class AlfalfaWorkerException(AlfalfaException):

class AlfalfaAPIException(AlfalfaException):
"""Wrapper for API errors"""

def add_payload(self, payload):
self.payload = payload

Expand All @@ -129,6 +130,5 @@ def __str__(self) -> str:
return super().__str__()



class AlfalfaClientException(AlfalfaException):
"""Wrapper for exceptions in client operation"""

0 comments on commit 8ba7a79

Please sign in to comment.