futurehouse-client 0.3.20.dev196__py3-none-any.whl → 0.3.20.dev202__py3-none-any.whl
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/clients/rest_client.py +43 -45
- futurehouse_client/models/app.py +3 -2
- futurehouse_client/version.py +2 -2
- {futurehouse_client-0.3.20.dev196.dist-info → futurehouse_client-0.3.20.dev202.dist-info}/METADATA +1 -1
- {futurehouse_client-0.3.20.dev196.dist-info → futurehouse_client-0.3.20.dev202.dist-info}/RECORD +8 -8
- {futurehouse_client-0.3.20.dev196.dist-info → futurehouse_client-0.3.20.dev202.dist-info}/WHEEL +0 -0
- {futurehouse_client-0.3.20.dev196.dist-info → futurehouse_client-0.3.20.dev202.dist-info}/licenses/LICENSE +0 -0
- {futurehouse_client-0.3.20.dev196.dist-info → futurehouse_client-0.3.20.dev202.dist-info}/top_level.txt +0 -0
@@ -112,7 +112,7 @@ class WorldModelCreationError(RestClientError):
|
|
112
112
|
"""Raised when there's an error creating a world model."""
|
113
113
|
|
114
114
|
|
115
|
-
class
|
115
|
+
class ProjectError(RestClientError):
|
116
116
|
"""Raised when there's an error with trajectory group operations."""
|
117
117
|
|
118
118
|
|
@@ -1573,132 +1573,130 @@ class RestClient:
|
|
1573
1573
|
wait=wait_exponential(multiplier=RETRY_MULTIPLIER, max=MAX_RETRY_WAIT),
|
1574
1574
|
retry=retry_if_connection_error,
|
1575
1575
|
)
|
1576
|
-
def
|
1577
|
-
"""Create a new
|
1576
|
+
def create_project(self, name: str) -> str:
|
1577
|
+
"""Create a new project.
|
1578
1578
|
|
1579
1579
|
Args:
|
1580
|
-
name: The name for the
|
1580
|
+
name: The name for the project
|
1581
1581
|
|
1582
1582
|
Returns:
|
1583
|
-
UUID of the created
|
1583
|
+
UUID of the created project
|
1584
1584
|
|
1585
1585
|
Raises:
|
1586
|
-
|
1586
|
+
ProjectError: If there's an error creating the project
|
1587
1587
|
"""
|
1588
1588
|
try:
|
1589
1589
|
data = {"name": name}
|
1590
|
-
response = self.client.post("/v0.1/
|
1590
|
+
response = self.client.post("/v0.1/projects", json=data)
|
1591
1591
|
response.raise_for_status()
|
1592
1592
|
return response.json()
|
1593
1593
|
except HTTPStatusError as e:
|
1594
|
-
raise
|
1595
|
-
f"Error creating
|
1594
|
+
raise ProjectError(
|
1595
|
+
f"Error creating project: {e.response.status_code} - {e.response.text}"
|
1596
1596
|
) from e
|
1597
1597
|
except Exception as e:
|
1598
|
-
raise
|
1598
|
+
raise ProjectError(f"Error creating project: {e}") from e
|
1599
1599
|
|
1600
1600
|
@retry(
|
1601
1601
|
stop=stop_after_attempt(MAX_RETRY_ATTEMPTS),
|
1602
1602
|
wait=wait_exponential(multiplier=RETRY_MULTIPLIER, max=MAX_RETRY_WAIT),
|
1603
1603
|
retry=retry_if_connection_error,
|
1604
1604
|
)
|
1605
|
-
def
|
1606
|
-
"""Add a trajectory to a
|
1605
|
+
def add_task_to_project(self, project_id: str, trajectory_id: str) -> None:
|
1606
|
+
"""Add a trajectory to a project.
|
1607
1607
|
|
1608
1608
|
Args:
|
1609
|
-
|
1609
|
+
project_id: The UUID of the project
|
1610
1610
|
trajectory_id: The UUID of the trajectory to add
|
1611
1611
|
|
1612
1612
|
Raises:
|
1613
|
-
|
1613
|
+
ProjectError: If there's an error adding the trajectory to the project
|
1614
1614
|
"""
|
1615
1615
|
try:
|
1616
1616
|
data = {"trajectory_id": trajectory_id}
|
1617
1617
|
response = self.client.post(
|
1618
|
-
f"/v0.1/
|
1618
|
+
f"/v0.1/projects/{project_id}/trajectories", json=data
|
1619
1619
|
)
|
1620
1620
|
response.raise_for_status()
|
1621
1621
|
except HTTPStatusError as e:
|
1622
1622
|
if e.response.status_code == codes.NOT_FOUND:
|
1623
|
-
raise
|
1624
|
-
f"
|
1623
|
+
raise ProjectError(
|
1624
|
+
f"Project {project_id} or trajectory {trajectory_id} not found"
|
1625
1625
|
) from e
|
1626
1626
|
if e.response.status_code == codes.FORBIDDEN:
|
1627
|
-
raise
|
1628
|
-
f"Permission denied to add trajectory to
|
1627
|
+
raise ProjectError(
|
1628
|
+
f"Permission denied to add trajectory to project {project_id}"
|
1629
1629
|
) from e
|
1630
|
-
raise
|
1631
|
-
f"Error adding trajectory to
|
1630
|
+
raise ProjectError(
|
1631
|
+
f"Error adding trajectory to project: {e.response.status_code} - {e.response.text}"
|
1632
1632
|
) from e
|
1633
1633
|
except Exception as e:
|
1634
|
-
raise
|
1634
|
+
raise ProjectError(f"Error adding trajectory to project: {e}") from e
|
1635
1635
|
|
1636
1636
|
@retry(
|
1637
1637
|
stop=stop_after_attempt(MAX_RETRY_ATTEMPTS),
|
1638
1638
|
wait=wait_exponential(multiplier=RETRY_MULTIPLIER, max=MAX_RETRY_WAIT),
|
1639
1639
|
retry=retry_if_connection_error,
|
1640
1640
|
)
|
1641
|
-
async def
|
1642
|
-
"""Asynchronously create a new
|
1641
|
+
async def acreate_project(self, name: str) -> str:
|
1642
|
+
"""Asynchronously create a new project.
|
1643
1643
|
|
1644
1644
|
Args:
|
1645
|
-
name: The name for the
|
1645
|
+
name: The name for the project
|
1646
1646
|
|
1647
1647
|
Returns:
|
1648
|
-
UUID of the created
|
1648
|
+
UUID of the created project
|
1649
1649
|
|
1650
1650
|
Raises:
|
1651
|
-
|
1651
|
+
ProjectError: If there's an error creating the project
|
1652
1652
|
"""
|
1653
1653
|
try:
|
1654
1654
|
data = {"name": name}
|
1655
|
-
response = await self.async_client.post(
|
1656
|
-
"/v0.1/trajectory-groups", json=data
|
1657
|
-
)
|
1655
|
+
response = await self.async_client.post("/v0.1/projects", json=data)
|
1658
1656
|
response.raise_for_status()
|
1659
1657
|
return response.json()
|
1660
1658
|
except HTTPStatusError as e:
|
1661
|
-
raise
|
1662
|
-
f"Error creating
|
1659
|
+
raise ProjectError(
|
1660
|
+
f"Error creating project: {e.response.status_code} - {e.response.text}"
|
1663
1661
|
) from e
|
1664
1662
|
except Exception as e:
|
1665
|
-
raise
|
1663
|
+
raise ProjectError(f"Error creating project: {e}") from e
|
1666
1664
|
|
1667
1665
|
@retry(
|
1668
1666
|
stop=stop_after_attempt(MAX_RETRY_ATTEMPTS),
|
1669
1667
|
wait=wait_exponential(multiplier=RETRY_MULTIPLIER, max=MAX_RETRY_WAIT),
|
1670
1668
|
retry=retry_if_connection_error,
|
1671
1669
|
)
|
1672
|
-
async def
|
1673
|
-
"""Asynchronously add a trajectory to a
|
1670
|
+
async def aadd_task_to_project(self, project_id: str, trajectory_id: str) -> None:
|
1671
|
+
"""Asynchronously add a trajectory to a project.
|
1674
1672
|
|
1675
1673
|
Args:
|
1676
|
-
|
1674
|
+
project_id: The UUID of the project
|
1677
1675
|
trajectory_id: The UUID of the trajectory to add
|
1678
1676
|
|
1679
1677
|
Raises:
|
1680
|
-
|
1678
|
+
ProjectError: If there's an error adding the trajectory to the project
|
1681
1679
|
"""
|
1682
1680
|
try:
|
1683
1681
|
data = {"trajectory_id": trajectory_id}
|
1684
1682
|
response = await self.async_client.post(
|
1685
|
-
f"/v0.1/
|
1683
|
+
f"/v0.1/projects/{project_id}/trajectories", json=data
|
1686
1684
|
)
|
1687
1685
|
response.raise_for_status()
|
1688
1686
|
except HTTPStatusError as e:
|
1689
1687
|
if e.response.status_code == codes.NOT_FOUND:
|
1690
|
-
raise
|
1691
|
-
f"
|
1688
|
+
raise ProjectError(
|
1689
|
+
f"Project {project_id} or trajectory {trajectory_id} not found"
|
1692
1690
|
) from e
|
1693
1691
|
if e.response.status_code == codes.FORBIDDEN:
|
1694
|
-
raise
|
1695
|
-
f"Permission denied to add trajectory to
|
1692
|
+
raise ProjectError(
|
1693
|
+
f"Permission denied to add trajectory to project {project_id}"
|
1696
1694
|
) from e
|
1697
|
-
raise
|
1698
|
-
f"Error adding trajectory to
|
1695
|
+
raise ProjectError(
|
1696
|
+
f"Error adding trajectory to project: {e.response.status_code} - {e.response.text}"
|
1699
1697
|
) from e
|
1700
1698
|
except Exception as e:
|
1701
|
-
raise
|
1699
|
+
raise ProjectError(f"Error adding trajectory to project: {e}") from e
|
1702
1700
|
|
1703
1701
|
|
1704
1702
|
def get_installed_packages() -> dict[str, str]:
|
futurehouse_client/models/app.py
CHANGED
@@ -647,15 +647,16 @@ class RuntimeConfig(BaseModel):
|
|
647
647
|
|
648
648
|
|
649
649
|
class TaskRequest(BaseModel):
|
650
|
+
model_config = ConfigDict(extra="forbid")
|
651
|
+
|
650
652
|
task_id: UUID | None = Field(
|
651
653
|
default=None,
|
652
654
|
description="Optional task identifier",
|
653
655
|
alias="id",
|
654
656
|
)
|
655
|
-
|
657
|
+
project_id: UUID | None = Field(
|
656
658
|
default=None,
|
657
659
|
description="Optional group identifier for the task",
|
658
|
-
alias="group_id",
|
659
660
|
)
|
660
661
|
name: "str | JobNames" = Field(
|
661
662
|
description="Name of the crow to execute eg. paperqa-crow"
|
futurehouse_client/version.py
CHANGED
@@ -17,5 +17,5 @@ __version__: str
|
|
17
17
|
__version_tuple__: VERSION_TUPLE
|
18
18
|
version_tuple: VERSION_TUPLE
|
19
19
|
|
20
|
-
__version__ = version = '0.3.20.
|
21
|
-
__version_tuple__ = version_tuple = (0, 3, 20, '
|
20
|
+
__version__ = version = '0.3.20.dev202'
|
21
|
+
__version_tuple__ = version_tuple = (0, 3, 20, 'dev202')
|
{futurehouse_client-0.3.20.dev196.dist-info → futurehouse_client-0.3.20.dev202.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: futurehouse-client
|
3
|
-
Version: 0.3.20.
|
3
|
+
Version: 0.3.20.dev202
|
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
|
License: Apache License
|
{futurehouse_client-0.3.20.dev196.dist-info → futurehouse_client-0.3.20.dev202.dist-info}/RECORD
RENAMED
@@ -1,11 +1,11 @@
|
|
1
1
|
futurehouse_client/__init__.py,sha256=BztM_ntbgmIEjzvnBWcvPhvLjM8xGDFCK0Upf3-nIn8,488
|
2
2
|
futurehouse_client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
|
-
futurehouse_client/version.py,sha256=
|
3
|
+
futurehouse_client/version.py,sha256=eD-V4eBpidnS4ZM0pIjvWEHnQR5mEfU2Ul099Jfio9g,530
|
4
4
|
futurehouse_client/clients/__init__.py,sha256=-HXNj-XJ3LRO5XM6MZ709iPs29YpApss0Q2YYg1qMZw,280
|
5
5
|
futurehouse_client/clients/job_client.py,sha256=D51_qTxya6g5Wfg_ZfJdP031TV_YDJeXkGMiYAJ1qRc,11962
|
6
|
-
futurehouse_client/clients/rest_client.py,sha256=
|
6
|
+
futurehouse_client/clients/rest_client.py,sha256=lWTha7tWZ1omE-w7O8mzs7umNcmYy0-GIqrOvlbvm5E,66558
|
7
7
|
futurehouse_client/models/__init__.py,sha256=kQ4R7VEuRxO0IQEW_sk9CndBL7zzl8rUKI24ddyYLM0,647
|
8
|
-
futurehouse_client/models/app.py,sha256=
|
8
|
+
futurehouse_client/models/app.py,sha256=SvkXOu5Qx28_jCS84XKKepnpGyfrQUEVnxS-JGqmsaE,29128
|
9
9
|
futurehouse_client/models/client.py,sha256=n4HD0KStKLm6Ek9nL9ylP-bkK10yzAaD1uIDF83Qp_A,1828
|
10
10
|
futurehouse_client/models/rest.py,sha256=AwPMcB1ruoqaI8NIhX2ZzN8UuX6XsaQ7uzeSE8EpwKk,1573
|
11
11
|
futurehouse_client/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -13,8 +13,8 @@ futurehouse_client/utils/auth.py,sha256=tgWELjKfg8eWme_qdcRmc8TjQN9DVZuHHaVXZNHL
|
|
13
13
|
futurehouse_client/utils/general.py,sha256=A_rtTiYW30ELGEZlWCIArO7q1nEmqi8hUlmBRYkMQ_c,767
|
14
14
|
futurehouse_client/utils/module_utils.py,sha256=aFyd-X-pDARXz9GWpn8SSViUVYdSbuy9vSkrzcVIaGI,4955
|
15
15
|
futurehouse_client/utils/monitoring.py,sha256=UjRlufe67kI3VxRHOd5fLtJmlCbVA2Wqwpd4uZhXkQM,8728
|
16
|
-
futurehouse_client-0.3.20.
|
17
|
-
futurehouse_client-0.3.20.
|
18
|
-
futurehouse_client-0.3.20.
|
19
|
-
futurehouse_client-0.3.20.
|
20
|
-
futurehouse_client-0.3.20.
|
16
|
+
futurehouse_client-0.3.20.dev202.dist-info/licenses/LICENSE,sha256=oQ9ZHjUi-_6GfP3gs14FlPb0OlGwE1QCCKFGnJ4LD2I,11341
|
17
|
+
futurehouse_client-0.3.20.dev202.dist-info/METADATA,sha256=oRX5T0ygXAosvFCfyFLvc-f_azXWj2OdMkLwm1B1JrM,26805
|
18
|
+
futurehouse_client-0.3.20.dev202.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
19
|
+
futurehouse_client-0.3.20.dev202.dist-info/top_level.txt,sha256=TRuLUCt_qBnggdFHCX4O_BoCu1j2X43lKfIZC-ElwWY,19
|
20
|
+
futurehouse_client-0.3.20.dev202.dist-info/RECORD,,
|
{futurehouse_client-0.3.20.dev196.dist-info → futurehouse_client-0.3.20.dev202.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|
File without changes
|