Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge 0.7.0 release into Main #70

Merged
merged 15 commits into from
Jun 28, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
formatting
TShapinsky committed Dec 15, 2023
commit 8ba7a79eaaea657754d34e54224ec6bb8d4d42de
6 changes: 3 additions & 3 deletions alfalfa_client/alfalfa_client.py
Original file line number Diff line number Diff line change
@@ -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:
@@ -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():
@@ -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
@@ -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):
@@ -120,6 +120,7 @@ class AlfalfaWorkerException(AlfalfaException):

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

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

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



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