destiny_sdk 0.1.1__tar.gz → 0.1.3__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: destiny_sdk
3
- Version: 0.1.1
3
+ Version: 0.1.3
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
@@ -13,7 +13,7 @@ description = "A software development kit (sdk) to support interaction with the
13
13
  license = "Apache 2.0"
14
14
  name = "destiny_sdk"
15
15
  readme = "README.md"
16
- version = "0.1.1"
16
+ version = "0.1.3"
17
17
 
18
18
  [tool.poetry.dependencies]
19
19
  cachetools = "^5.5.2"
@@ -28,6 +28,7 @@ python-jose = "^3.4.0"
28
28
 
29
29
  [tool.poetry.group.dev.dependencies]
30
30
  mypy = "^1.15.0"
31
+ pre-commit = "^4.2.0"
31
32
  pytest-env = "^1.1.5"
32
33
  ruff = "^0.11.5"
33
34
  uvloop = "^0.21.0"
@@ -1,11 +1,10 @@
1
1
  """Enhancement classes for the Destiny Repository."""
2
2
 
3
3
  import datetime
4
- import uuid
5
4
  from enum import StrEnum, auto
6
5
  from typing import Annotated, Literal
7
6
 
8
- from pydantic import BaseModel, Field, HttpUrl
7
+ from pydantic import UUID4, BaseModel, Field, HttpUrl
9
8
 
10
9
  from destiny_sdk.core import _JsonlFileInputMixIn
11
10
  from destiny_sdk.visibility import Visibility
@@ -317,7 +316,15 @@ EnhancementContent = Annotated[
317
316
  class Enhancement(_JsonlFileInputMixIn, BaseModel):
318
317
  """Core enhancement class."""
319
318
 
320
- reference_id: uuid.UUID = Field(
319
+ id: UUID4 | None = Field(
320
+ default=None,
321
+ description=(
322
+ "The ID of the enhancement. "
323
+ "Populated by the repository when sending enhancements with references."
324
+ ),
325
+ )
326
+
327
+ reference_id: UUID4 = Field(
321
328
  description="The ID of the reference this enhancement is associated with."
322
329
  )
323
330
  source: str = Field(
@@ -330,7 +337,7 @@ class Enhancement(_JsonlFileInputMixIn, BaseModel):
330
337
  default=None,
331
338
  description="The version of the robot that generated the content.",
332
339
  )
333
- derived_from: list[uuid.UUID] | None = Field(
340
+ derived_from: list[UUID4] | None = Field(
334
341
  default=None,
335
342
  description="List of enhancement IDs that this enhancement was derived from.",
336
343
  )
@@ -98,10 +98,15 @@ class RobotRequest(BaseModel):
98
98
  """An enhancement request from the repo to a robot."""
99
99
 
100
100
  id: UUID4
101
- reference: Reference # Reference with selected enhancements
102
- extra_fields: (
103
- dict | None
104
- ) # We need something to pass through the signed url for uploads
101
+ reference: Reference = Field(
102
+ description=(
103
+ "Reference to be enhanced, includes identifiers and existing enhancments."
104
+ )
105
+ )
106
+ extra_fields: dict | None = Field(
107
+ default=None,
108
+ description="Extra fields to pass to the robot. TBC.",
109
+ )
105
110
 
106
111
 
107
112
  #: The result for a single reference when processed by a batch enhancement request.
@@ -212,6 +217,8 @@ class BatchEnhancementRequestStatus(StrEnum):
212
217
  - `partial_failed`: Some enhancements failed to create.
213
218
  - `failed`: All enhancements failed to create.
214
219
  - `importing`: Enhancements have been received by the repo and are being imported.
220
+ - `indexing`: Enhancements have been imported and are being indexed.
221
+ - `indexing_failed`: Enhancements have been imported but indexing failed.
215
222
  - `completed`: All enhancements have been created.
216
223
  """
217
224
 
@@ -221,6 +228,8 @@ class BatchEnhancementRequestStatus(StrEnum):
221
228
  PARTIAL_FAILED = auto()
222
229
  FAILED = auto()
223
230
  IMPORTING = auto()
231
+ INDEXING = auto()
232
+ INDEXING_FAILED = auto()
224
233
  COMPLETED = auto()
225
234
 
226
235
 
File without changes
File without changes