futurehouse-client 0.3.18.dev186__tar.gz → 0.3.19__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {futurehouse_client-0.3.18.dev186 → futurehouse_client-0.3.19}/PKG-INFO +2 -3
- {futurehouse_client-0.3.18.dev186 → futurehouse_client-0.3.19}/futurehouse_client/__init__.py +11 -1
- {futurehouse_client-0.3.18.dev186 → futurehouse_client-0.3.19}/futurehouse_client/clients/__init__.py +1 -2
- {futurehouse_client-0.3.18.dev186 → futurehouse_client-0.3.19}/futurehouse_client/clients/job_client.py +27 -1
- {futurehouse_client-0.3.18.dev186 → futurehouse_client-0.3.19}/futurehouse_client/clients/rest_client.py +439 -255
- {futurehouse_client-0.3.18.dev186 → futurehouse_client-0.3.19}/futurehouse_client/models/app.py +70 -2
- futurehouse_client-0.3.19/futurehouse_client/utils/__init__.py +0 -0
- futurehouse_client-0.3.19/futurehouse_client/utils/auth.py +92 -0
- {futurehouse_client-0.3.18.dev186 → futurehouse_client-0.3.19}/futurehouse_client.egg-info/PKG-INFO +2 -3
- {futurehouse_client-0.3.18.dev186 → futurehouse_client-0.3.19}/futurehouse_client.egg-info/SOURCES.txt +2 -1
- {futurehouse_client-0.3.18.dev186 → futurehouse_client-0.3.19}/futurehouse_client.egg-info/requires.txt +0 -1
- {futurehouse_client-0.3.18.dev186 → futurehouse_client-0.3.19}/pyproject.toml +1 -2
- futurehouse_client-0.3.19/tests/test_client.py +161 -0
- futurehouse_client-0.3.19/tests/test_rest.py +684 -0
- futurehouse_client-0.3.18.dev186/futurehouse_client/utils/auth.py +0 -107
- futurehouse_client-0.3.18.dev186/tests/test_rest.py +0 -260
- futurehouse_client-0.3.18.dev186/uv.lock +0 -2953
- {futurehouse_client-0.3.18.dev186 → futurehouse_client-0.3.19}/LICENSE +0 -0
- {futurehouse_client-0.3.18.dev186 → futurehouse_client-0.3.19}/README.md +0 -0
- {futurehouse_client-0.3.18.dev186 → futurehouse_client-0.3.19}/docs/__init__.py +0 -0
- {futurehouse_client-0.3.18.dev186 → futurehouse_client-0.3.19}/docs/client_notebook.ipynb +0 -0
- {futurehouse_client-0.3.18.dev186 → futurehouse_client-0.3.19}/futurehouse_client/models/__init__.py +0 -0
- {futurehouse_client-0.3.18.dev186 → futurehouse_client-0.3.19}/futurehouse_client/models/client.py +0 -0
- {futurehouse_client-0.3.18.dev186 → futurehouse_client-0.3.19}/futurehouse_client/models/rest.py +0 -0
- /futurehouse_client-0.3.18.dev186/futurehouse_client/utils/__init__.py → /futurehouse_client-0.3.19/futurehouse_client/py.typed +0 -0
- {futurehouse_client-0.3.18.dev186 → futurehouse_client-0.3.19}/futurehouse_client/utils/general.py +0 -0
- {futurehouse_client-0.3.18.dev186 → futurehouse_client-0.3.19}/futurehouse_client/utils/module_utils.py +0 -0
- {futurehouse_client-0.3.18.dev186 → futurehouse_client-0.3.19}/futurehouse_client/utils/monitoring.py +0 -0
- {futurehouse_client-0.3.18.dev186 → futurehouse_client-0.3.19}/futurehouse_client.egg-info/dependency_links.txt +0 -0
- {futurehouse_client-0.3.18.dev186 → futurehouse_client-0.3.19}/futurehouse_client.egg-info/top_level.txt +0 -0
- {futurehouse_client-0.3.18.dev186 → futurehouse_client-0.3.19}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: futurehouse-client
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.19
|
4
4
|
Summary: A client for interacting with endpoints of the FutureHouse service.
|
5
5
|
Author-email: FutureHouse technical staff <hello@futurehouse.org>
|
6
6
|
Classifier: Operating System :: OS Independent
|
@@ -8,10 +8,9 @@ Classifier: Programming Language :: Python :: 3 :: Only
|
|
8
8
|
Classifier: Programming Language :: Python :: 3.11
|
9
9
|
Classifier: Programming Language :: Python :: 3.12
|
10
10
|
Classifier: Programming Language :: Python
|
11
|
-
Requires-Python: <3.
|
11
|
+
Requires-Python: <3.14,>=3.11
|
12
12
|
Description-Content-Type: text/markdown
|
13
13
|
Requires-Dist: cloudpickle
|
14
|
-
Requires-Dist: dm-tree<0.1.9
|
15
14
|
Requires-Dist: fhaviary
|
16
15
|
Requires-Dist: httpx
|
17
16
|
Requires-Dist: ldp>=0.22.0
|
{futurehouse_client-0.3.18.dev186 → futurehouse_client-0.3.19}/futurehouse_client/__init__.py
RENAMED
@@ -1,12 +1,22 @@
|
|
1
1
|
from .clients.job_client import JobClient, JobNames
|
2
|
-
from .clients.rest_client import PQATaskResponse, TaskResponse, TaskResponseVerbose
|
3
2
|
from .clients.rest_client import RestClient as FutureHouseClient
|
3
|
+
from .models.app import (
|
4
|
+
FinchTaskResponse,
|
5
|
+
PhoenixTaskResponse,
|
6
|
+
PQATaskResponse,
|
7
|
+
TaskRequest,
|
8
|
+
TaskResponse,
|
9
|
+
TaskResponseVerbose,
|
10
|
+
)
|
4
11
|
|
5
12
|
__all__ = [
|
13
|
+
"FinchTaskResponse",
|
6
14
|
"FutureHouseClient",
|
7
15
|
"JobClient",
|
8
16
|
"JobNames",
|
9
17
|
"PQATaskResponse",
|
18
|
+
"PhoenixTaskResponse",
|
19
|
+
"TaskRequest",
|
10
20
|
"TaskResponse",
|
11
21
|
"TaskResponseVerbose",
|
12
22
|
]
|
@@ -1,12 +1,11 @@
|
|
1
1
|
from .job_client import JobClient, JobNames
|
2
|
-
from .rest_client import PQATaskResponse, TaskResponse, TaskResponseVerbose
|
3
2
|
from .rest_client import RestClient as FutureHouseClient
|
3
|
+
from .rest_client import TaskResponse, TaskResponseVerbose
|
4
4
|
|
5
5
|
__all__ = [
|
6
6
|
"FutureHouseClient",
|
7
7
|
"JobClient",
|
8
8
|
"JobNames",
|
9
|
-
"PQATaskResponse",
|
10
9
|
"TaskResponse",
|
11
10
|
"TaskResponseVerbose",
|
12
11
|
]
|
@@ -8,7 +8,13 @@ from aviary.env import Frame
|
|
8
8
|
from pydantic import BaseModel
|
9
9
|
from tenacity import before_sleep_log, retry, stop_after_attempt, wait_exponential
|
10
10
|
|
11
|
-
from futurehouse_client.models.app import
|
11
|
+
from futurehouse_client.models.app import (
|
12
|
+
FinchTaskResponse,
|
13
|
+
PhoenixTaskResponse,
|
14
|
+
PQATaskResponse,
|
15
|
+
Stage,
|
16
|
+
TaskResponse,
|
17
|
+
)
|
12
18
|
from futurehouse_client.models.rest import (
|
13
19
|
FinalEnvironmentRequest,
|
14
20
|
StoreAgentStatePostRequest,
|
@@ -31,6 +37,19 @@ class JobNames(StrEnum):
|
|
31
37
|
DUMMY = "job-futurehouse-dummy-env"
|
32
38
|
PHOENIX = "job-futurehouse-phoenix"
|
33
39
|
FINCH = "job-futurehouse-data-analysis-crow-high"
|
40
|
+
CHIMP = "job-futurehouse-chimp"
|
41
|
+
|
42
|
+
@classmethod
|
43
|
+
def _get_response_mapping(cls) -> dict[str, type[TaskResponse]]:
|
44
|
+
return {
|
45
|
+
cls.CROW: PQATaskResponse,
|
46
|
+
cls.FALCON: PQATaskResponse,
|
47
|
+
cls.OWL: PQATaskResponse,
|
48
|
+
cls.CHIMP: PQATaskResponse,
|
49
|
+
cls.PHOENIX: PhoenixTaskResponse,
|
50
|
+
cls.FINCH: FinchTaskResponse,
|
51
|
+
cls.DUMMY: TaskResponse,
|
52
|
+
}
|
34
53
|
|
35
54
|
@classmethod
|
36
55
|
def from_stage(cls, job_name: str, stage: Stage | None = None) -> str:
|
@@ -52,6 +71,13 @@ class JobNames(StrEnum):
|
|
52
71
|
f"Invalid job name: {job_name}. \nOptions are: {', '.join([name.name for name in cls])}"
|
53
72
|
) from e
|
54
73
|
|
74
|
+
@staticmethod
|
75
|
+
def get_response_object_from_job(job_name: str) -> type[TaskResponse]:
|
76
|
+
return JobNames._get_response_mapping()[job_name]
|
77
|
+
|
78
|
+
def get_response_object(self) -> type[TaskResponse]:
|
79
|
+
return self._get_response_mapping()[self.name]
|
80
|
+
|
55
81
|
|
56
82
|
class JobClient:
|
57
83
|
REQUEST_TIMEOUT: ClassVar[float] = 30.0 # sec
|