futurehouse-client 0.4.1__tar.gz → 0.4.2.dev11__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.4.1/futurehouse_client.egg-info → futurehouse_client-0.4.2.dev11}/PKG-INFO +1 -1
- {futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/futurehouse_client/clients/rest_client.py +16 -17
- {futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/futurehouse_client/models/client.py +1 -5
- futurehouse_client-0.4.2.dev11/futurehouse_client/version.py +34 -0
- {futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11/futurehouse_client.egg-info}/PKG-INFO +1 -1
- {futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/tests/test_rest.py +5 -4
- futurehouse_client-0.4.1/futurehouse_client/version.py +0 -21
- {futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/LICENSE +0 -0
- {futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/README.md +0 -0
- {futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/docs/__init__.py +0 -0
- {futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/docs/client_notebook.ipynb +0 -0
- {futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/futurehouse_client/__init__.py +0 -0
- {futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/futurehouse_client/clients/__init__.py +0 -0
- {futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/futurehouse_client/clients/job_client.py +0 -0
- {futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/futurehouse_client/models/__init__.py +0 -0
- {futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/futurehouse_client/models/app.py +0 -0
- {futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/futurehouse_client/models/rest.py +0 -0
- {futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/futurehouse_client/py.typed +0 -0
- {futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/futurehouse_client/utils/__init__.py +0 -0
- {futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/futurehouse_client/utils/auth.py +0 -0
- {futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/futurehouse_client/utils/general.py +0 -0
- {futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/futurehouse_client/utils/module_utils.py +0 -0
- {futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/futurehouse_client/utils/monitoring.py +0 -0
- {futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/futurehouse_client/utils/world_model_tools.py +0 -0
- {futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/futurehouse_client.egg-info/SOURCES.txt +0 -0
- {futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/futurehouse_client.egg-info/dependency_links.txt +0 -0
- {futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/futurehouse_client.egg-info/requires.txt +0 -0
- {futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/futurehouse_client.egg-info/top_level.txt +0 -0
- {futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/pyproject.toml +0 -0
- {futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/setup.cfg +0 -0
- {futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/tests/test_client.py +0 -0
@@ -1746,22 +1746,19 @@ class RestClient:
|
|
1746
1746
|
wait=wait_exponential(multiplier=RETRY_MULTIPLIER, max=MAX_RETRY_WAIT),
|
1747
1747
|
retry=retry_if_connection_error,
|
1748
1748
|
)
|
1749
|
-
def get_project_by_name(self, name: str) -> UUID:
|
1749
|
+
def get_project_by_name(self, name: str, limit: int = 2) -> UUID | list[UUID]:
|
1750
1750
|
"""Get a project UUID by name.
|
1751
1751
|
|
1752
1752
|
Args:
|
1753
1753
|
name: The name of the project to find
|
1754
|
+
limit: Maximum number of projects to return
|
1754
1755
|
|
1755
1756
|
Returns:
|
1756
|
-
UUID of the project as a string
|
1757
|
-
|
1758
|
-
Raises:
|
1759
|
-
ProjectError: If no project is found, multiple projects are found, or there's an error
|
1757
|
+
UUID of the project as a string or a list of UUIDs if multiple projects are found
|
1760
1758
|
"""
|
1761
1759
|
try:
|
1762
|
-
# Get projects filtered by name (backend now filters by name and owner)
|
1763
1760
|
response = self.client.get(
|
1764
|
-
"/v0.1/projects", params={"limit":
|
1761
|
+
"/v0.1/projects", params={"limit": limit, "name": name}
|
1765
1762
|
)
|
1766
1763
|
response.raise_for_status()
|
1767
1764
|
projects = response.json()
|
@@ -1774,32 +1771,33 @@ class RestClient:
|
|
1774
1771
|
if len(projects) == 0:
|
1775
1772
|
raise ProjectError(f"No project found with name '{name}'")
|
1776
1773
|
if len(projects) > 1:
|
1777
|
-
|
1774
|
+
logger.warning(
|
1778
1775
|
f"Multiple projects found with name '{name}'. Found {len(projects)} projects."
|
1779
1776
|
)
|
1780
1777
|
|
1781
|
-
|
1778
|
+
ids = [UUID(project["id"]) for project in projects]
|
1779
|
+
return ids[0] if len(ids) == 1 else ids
|
1782
1780
|
|
1783
1781
|
@retry(
|
1784
1782
|
stop=stop_after_attempt(MAX_RETRY_ATTEMPTS),
|
1785
1783
|
wait=wait_exponential(multiplier=RETRY_MULTIPLIER, max=MAX_RETRY_WAIT),
|
1786
1784
|
retry=retry_if_connection_error,
|
1787
1785
|
)
|
1788
|
-
async def aget_project_by_name(
|
1786
|
+
async def aget_project_by_name(
|
1787
|
+
self, name: str, limit: int = 2
|
1788
|
+
) -> UUID | list[UUID]:
|
1789
1789
|
"""Asynchronously get a project UUID by name.
|
1790
1790
|
|
1791
1791
|
Args:
|
1792
1792
|
name: The name of the project to find
|
1793
|
+
limit: Maximum number of projects to return
|
1793
1794
|
|
1794
1795
|
Returns:
|
1795
|
-
UUID of the project as a string
|
1796
|
-
|
1797
|
-
Raises:
|
1798
|
-
ProjectError: If no project is found, multiple projects are found, or there's an error
|
1796
|
+
UUID of the project as a string or a list of UUIDs if multiple projects are found
|
1799
1797
|
"""
|
1800
1798
|
try:
|
1801
1799
|
response = await self.async_client.get(
|
1802
|
-
"/v0.1/projects", params={"limit":
|
1800
|
+
"/v0.1/projects", params={"limit": limit, "name": name}
|
1803
1801
|
)
|
1804
1802
|
response.raise_for_status()
|
1805
1803
|
projects = response.json()
|
@@ -1808,11 +1806,12 @@ class RestClient:
|
|
1808
1806
|
if len(projects) == 0:
|
1809
1807
|
raise ProjectError(f"No project found with name '{name}'")
|
1810
1808
|
if len(projects) > 1:
|
1811
|
-
|
1809
|
+
logger.warning(
|
1812
1810
|
f"Multiple projects found with name '{name}'. Found {len(projects)} projects."
|
1813
1811
|
)
|
1814
1812
|
|
1815
|
-
|
1813
|
+
ids = [UUID(project["id"]) for project in projects]
|
1814
|
+
return ids[0] if len(ids) == 1 else ids
|
1816
1815
|
|
1817
1816
|
@retry(
|
1818
1817
|
stop=stop_after_attempt(MAX_RETRY_ATTEMPTS),
|
{futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/futurehouse_client/models/client.py
RENAMED
@@ -27,17 +27,13 @@ class InitialState(BaseState):
|
|
27
27
|
|
28
28
|
class ASVState(BaseState, Generic[T]):
|
29
29
|
action: OpResult[T] = Field()
|
30
|
-
|
30
|
+
next_agent_state: Any = Field()
|
31
31
|
value: float = Field()
|
32
32
|
|
33
33
|
@field_serializer("action")
|
34
34
|
def serialize_action(self, action: OpResult[T]) -> dict:
|
35
35
|
return action.to_dict()
|
36
36
|
|
37
|
-
@field_serializer("next_state")
|
38
|
-
def serialize_next_state(self, state: Any) -> str:
|
39
|
-
return str(state)
|
40
|
-
|
41
37
|
|
42
38
|
class EnvResetState(BaseState):
|
43
39
|
observations: list[Message] = Field()
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# file generated by setuptools-scm
|
2
|
+
# don't change, don't track in version control
|
3
|
+
|
4
|
+
__all__ = [
|
5
|
+
"__version__",
|
6
|
+
"__version_tuple__",
|
7
|
+
"version",
|
8
|
+
"version_tuple",
|
9
|
+
"__commit_id__",
|
10
|
+
"commit_id",
|
11
|
+
]
|
12
|
+
|
13
|
+
TYPE_CHECKING = False
|
14
|
+
if TYPE_CHECKING:
|
15
|
+
from typing import Tuple
|
16
|
+
from typing import Union
|
17
|
+
|
18
|
+
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
19
|
+
COMMIT_ID = Union[str, None]
|
20
|
+
else:
|
21
|
+
VERSION_TUPLE = object
|
22
|
+
COMMIT_ID = object
|
23
|
+
|
24
|
+
version: str
|
25
|
+
__version__: str
|
26
|
+
__version_tuple__: VERSION_TUPLE
|
27
|
+
version_tuple: VERSION_TUPLE
|
28
|
+
commit_id: COMMIT_ID
|
29
|
+
__commit_id__: COMMIT_ID
|
30
|
+
|
31
|
+
__version__ = version = '0.4.2.dev11'
|
32
|
+
__version_tuple__ = version_tuple = (0, 4, 2, 'dev11')
|
33
|
+
|
34
|
+
__commit_id__ = commit_id = 'ge97af7bf7'
|
@@ -820,13 +820,14 @@ class TestProjectOperations:
|
|
820
820
|
mock_response = MagicMock()
|
821
821
|
mock_response.raise_for_status.return_value = None
|
822
822
|
mock_response.json.return_value = [
|
823
|
-
{"id":
|
824
|
-
{"id":
|
823
|
+
{"id": str(uuid4()), "name": "test"},
|
824
|
+
{"id": str(uuid4()), "name": "test"},
|
825
825
|
]
|
826
826
|
mock_get.return_value = mock_response
|
827
827
|
|
828
|
-
|
829
|
-
|
828
|
+
projects = admin_client.get_project_by_name("test")
|
829
|
+
assert isinstance(projects, list)
|
830
|
+
assert len(projects) == 2
|
830
831
|
|
831
832
|
def test_add_task_to_project_success(
|
832
833
|
self, admin_client: RestClient, test_project_name: str, task_req: TaskRequest
|
@@ -1,21 +0,0 @@
|
|
1
|
-
# file generated by setuptools-scm
|
2
|
-
# don't change, don't track in version control
|
3
|
-
|
4
|
-
__all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
|
5
|
-
|
6
|
-
TYPE_CHECKING = False
|
7
|
-
if TYPE_CHECKING:
|
8
|
-
from typing import Tuple
|
9
|
-
from typing import Union
|
10
|
-
|
11
|
-
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
12
|
-
else:
|
13
|
-
VERSION_TUPLE = object
|
14
|
-
|
15
|
-
version: str
|
16
|
-
__version__: str
|
17
|
-
__version_tuple__: VERSION_TUPLE
|
18
|
-
version_tuple: VERSION_TUPLE
|
19
|
-
|
20
|
-
__version__ = version = '0.4.1'
|
21
|
-
__version_tuple__ = version_tuple = (0, 4, 1)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/futurehouse_client/clients/__init__.py
RENAMED
File without changes
|
{futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/futurehouse_client/clients/job_client.py
RENAMED
File without changes
|
{futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/futurehouse_client/models/__init__.py
RENAMED
File without changes
|
{futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/futurehouse_client/models/app.py
RENAMED
File without changes
|
{futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/futurehouse_client/models/rest.py
RENAMED
File without changes
|
File without changes
|
{futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/futurehouse_client/utils/__init__.py
RENAMED
File without changes
|
{futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/futurehouse_client/utils/auth.py
RENAMED
File without changes
|
{futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/futurehouse_client/utils/general.py
RENAMED
File without changes
|
{futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/futurehouse_client/utils/module_utils.py
RENAMED
File without changes
|
{futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/futurehouse_client/utils/monitoring.py
RENAMED
File without changes
|
File without changes
|
{futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/futurehouse_client.egg-info/SOURCES.txt
RENAMED
File without changes
|
File without changes
|
{futurehouse_client-0.4.1 → futurehouse_client-0.4.2.dev11}/futurehouse_client.egg-info/requires.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|