destiny_sdk 0.1.4__py3-none-any.whl → 0.2.0__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.
- destiny_sdk/client.py +3 -3
- destiny_sdk/enhancements.py +3 -2
- destiny_sdk/robots.py +3 -3
- {destiny_sdk-0.1.4.dist-info → destiny_sdk-0.2.0.dist-info}/METADATA +3 -14
- {destiny_sdk-0.1.4.dist-info → destiny_sdk-0.2.0.dist-info}/RECORD +7 -7
- {destiny_sdk-0.1.4.dist-info → destiny_sdk-0.2.0.dist-info}/WHEEL +1 -1
- {destiny_sdk-0.1.4.dist-info → destiny_sdk-0.2.0.dist-info}/LICENSE +0 -0
destiny_sdk/client.py
CHANGED
|
@@ -69,7 +69,7 @@ class Client:
|
|
|
69
69
|
:type auth_method: str
|
|
70
70
|
"""
|
|
71
71
|
self.session = httpx.Client(
|
|
72
|
-
base_url=str(base_url),
|
|
72
|
+
base_url=str(base_url).removesuffix("/v1/").removesuffix("/v1") + "/v1/",
|
|
73
73
|
headers={"Content-Type": "application/json"},
|
|
74
74
|
auth=HMACSigningAuth(secret_key=secret_key, client_id=client_id),
|
|
75
75
|
)
|
|
@@ -86,7 +86,7 @@ class Client:
|
|
|
86
86
|
:rtype: EnhancementRequestRead
|
|
87
87
|
"""
|
|
88
88
|
response = self.session.post(
|
|
89
|
-
"/
|
|
89
|
+
f"/enhancement-requests/single-requests/{robot_result.request_id}/results/",
|
|
90
90
|
json=robot_result.model_dump(mode="json"),
|
|
91
91
|
)
|
|
92
92
|
response.raise_for_status()
|
|
@@ -106,7 +106,7 @@ class Client:
|
|
|
106
106
|
:rtype: BatchEnhancementRequestRead
|
|
107
107
|
"""
|
|
108
108
|
response = self.session.post(
|
|
109
|
-
"/
|
|
109
|
+
f"/enhancement-requests/batch-requests/{batch_robot_result.request_id}/results/",
|
|
110
110
|
json=batch_robot_result.model_dump(mode="json"),
|
|
111
111
|
)
|
|
112
112
|
response.raise_for_status()
|
destiny_sdk/enhancements.py
CHANGED
|
@@ -219,7 +219,7 @@ class AnnotationEnhancement(BaseModel):
|
|
|
219
219
|
"""An enhancement which is composed of a list of Annotations."""
|
|
220
220
|
|
|
221
221
|
enhancement_type: Literal[EnhancementType.ANNOTATION] = EnhancementType.ANNOTATION
|
|
222
|
-
annotations: list[Annotation]
|
|
222
|
+
annotations: list[Annotation] = Field(min_length=1)
|
|
223
223
|
|
|
224
224
|
|
|
225
225
|
class DriverVersion(StrEnum):
|
|
@@ -299,7 +299,8 @@ class LocationEnhancement(BaseModel):
|
|
|
299
299
|
|
|
300
300
|
enhancement_type: Literal[EnhancementType.LOCATION] = EnhancementType.LOCATION
|
|
301
301
|
locations: list[Location] = Field(
|
|
302
|
-
|
|
302
|
+
min_length=1,
|
|
303
|
+
description="A list of locations where this reference can be found.",
|
|
303
304
|
)
|
|
304
305
|
|
|
305
306
|
|
destiny_sdk/robots.py
CHANGED
|
@@ -357,6 +357,9 @@ class ProvisionedRobot(Robot):
|
|
|
357
357
|
class _RobotAutomationBase(BaseModel):
|
|
358
358
|
"""Base Robot Automation class."""
|
|
359
359
|
|
|
360
|
+
robot_id: UUID4 = Field(
|
|
361
|
+
description="The ID of the robot that will be used to enhance the reference."
|
|
362
|
+
)
|
|
360
363
|
query: dict[str, Any] = Field(
|
|
361
364
|
description="The percolator query that will be used to match references "
|
|
362
365
|
" or enhancements against."
|
|
@@ -385,6 +388,3 @@ class RobotAutomation(_RobotAutomationBase):
|
|
|
385
388
|
id: UUID4 = Field(
|
|
386
389
|
description="The ID of the robot automation.",
|
|
387
390
|
)
|
|
388
|
-
robot_id: UUID4 = Field(
|
|
389
|
-
description="The ID of the robot that will be used to enhance the reference."
|
|
390
|
-
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: destiny_sdk
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: A software development kit (sdk) to support interaction with the DESTINY repository
|
|
5
5
|
License: Apache 2.0
|
|
6
6
|
Author: Adam Hamilton
|
|
@@ -75,20 +75,9 @@ poetry build
|
|
|
75
75
|
poetry add ./PATH/TO/WHEEL.whl
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
-
### Publishing
|
|
78
|
+
### Publishing
|
|
79
79
|
|
|
80
|
-
|
|
81
|
-
poetry config repositories.testpypi https://test.pypi.org/legacy/
|
|
82
|
-
poetry config pypi-token.testpypi [YOUR_TESTPYPI_TOKEN]
|
|
83
|
-
poetry publish --repository testpypi
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
## Publishing
|
|
87
|
-
|
|
88
|
-
```sh
|
|
89
|
-
poetry config pypi-token.pypi [YOUR_PYPI_TOKEN]
|
|
90
|
-
poetry publish
|
|
91
|
-
```
|
|
80
|
+
Once the package change is merged to main with an iterated `libs/sdk/pyproject.toml` version number, you can run the [github action](https://github.com/destiny-evidence/destiny-repository/actions/workflows/release-sdk-to-pypi.yml) to publish to the test pypi and then production pypi registries.
|
|
92
81
|
|
|
93
82
|
### Versioning
|
|
94
83
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
destiny_sdk/__init__.py,sha256=gmmrceJX84T4msk_GSm_OjTQvCpHFZRjnlUK5_7IODE,356
|
|
2
2
|
destiny_sdk/auth.py,sha256=bY72ywZEcG_67YBd9PrwgWTXkCf58rhLvVEXrtXbWtA,6247
|
|
3
|
-
destiny_sdk/client.py,sha256=
|
|
3
|
+
destiny_sdk/client.py,sha256=fPcn6iUYZd2xFzwTv9uenWwhHpx3YLIXQ8XZGFEo3rI,3792
|
|
4
4
|
destiny_sdk/core.py,sha256=GgNc7EncHKyZ5ppIG2CATWN2JFPjtA7IYhF0FutqwGE,945
|
|
5
|
-
destiny_sdk/enhancements.py,sha256=
|
|
5
|
+
destiny_sdk/enhancements.py,sha256=Sciu5YCyYbOXCdlmqVdL6Z-J9nDjByj_H_QW4sfveU4,11780
|
|
6
6
|
destiny_sdk/identifiers.py,sha256=JHxu-wM3T8kKtAYuk5dMec35Ay73KxYP7gthbSvOhuI,3480
|
|
7
7
|
destiny_sdk/imports.py,sha256=mfC1QXbAU27iD3hO9OFTRQes352F6DS1U4fSMw26-8w,8243
|
|
8
8
|
destiny_sdk/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
9
|
destiny_sdk/references.py,sha256=Dx-WKcv9gNJkKU9n52AYoEey7siTHR5_wBVBKSHND6Q,2321
|
|
10
|
-
destiny_sdk/robots.py,sha256=
|
|
10
|
+
destiny_sdk/robots.py,sha256=CL8hRTyHhTp4PShLmCuX2Ck4UBScPkOF44ivT1XRbMs,12806
|
|
11
11
|
destiny_sdk/visibility.py,sha256=nDLqnWuSZSk0vG3ynzDpHAvaALsbk8cuEZujTsqf6no,684
|
|
12
|
-
destiny_sdk-0.
|
|
13
|
-
destiny_sdk-0.
|
|
14
|
-
destiny_sdk-0.
|
|
15
|
-
destiny_sdk-0.
|
|
12
|
+
destiny_sdk-0.2.0.dist-info/LICENSE,sha256=6QURU4gvvTjVZ5rfp5amZ6FtFvcpPhAGUjxF5WSZAHI,9138
|
|
13
|
+
destiny_sdk-0.2.0.dist-info/METADATA,sha256=Ryn0y9KOyQyhoWXsAJ7_6VVLiNAC0lLrRAmcersDtkI,2568
|
|
14
|
+
destiny_sdk-0.2.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
15
|
+
destiny_sdk-0.2.0.dist-info/RECORD,,
|
|
File without changes
|