Skip to content

Commit

Permalink
running precommit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
kessler-frost committed Nov 23, 2023
1 parent 11b3b56 commit 4698edc
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 36 deletions.
1 change: 1 addition & 0 deletions covalent/executor/qbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ def override_shots(self) -> Union[int, None]:

# User has specified `shots` as an int.
return self.shots

model_config = ConfigDict(extra="allow")

@model_validator(mode="before")
Expand Down
1 change: 1 addition & 0 deletions covalent/quantum/qcluster/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,5 @@ def selector_function(self, qscript, executors):
Implement selection logic here.
"""
raise NotImplementedError

model_config = ConfigDict(extra="allow")
54 changes: 29 additions & 25 deletions covalent_ui/api/v1/models/dispatch_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,23 @@ class DispatchResponse(BaseModel):

items: List[DispatchModule]
total_count: int
model_config = ConfigDict(json_schema_extra={
"example": {
"dispatches": [
{
"dispatch_id": "1b44989a-1c65-4148-959e-00062a34ac16",
"lattice_name": "testing content",
"runtime": 1,
"started_time": "2022-06-13T07:45:02.114328+00:00",
"end_time": "2022-06-13T07:45:02.216474+00:00",
"status": "COMPLETED",
}
],
"total_count": 10,
model_config = ConfigDict(
json_schema_extra={
"example": {
"dispatches": [
{
"dispatch_id": "1b44989a-1c65-4148-959e-00062a34ac16",
"lattice_name": "testing content",
"runtime": 1,
"started_time": "2022-06-13T07:45:02.114328+00:00",
"end_time": "2022-06-13T07:45:02.216474+00:00",
"status": "COMPLETED",
}
],
"total_count": 10,
}
}
})
)


class DeleteDispatchesRequest(BaseModel):
Expand Down Expand Up @@ -108,15 +110,17 @@ class DispatchDashBoardResponse(BaseModel):
total_jobs_new_object: Union[int, None] = None
latest_running_task_status: Union[Status, None] = None
total_dispatcher_duration: Union[int, None] = None
model_config = ConfigDict(json_schema_extra={
"example": {
"total_jobs": 5,
"total_jobs_running": 5,
"total_jobs_completed": 20,
"total_jobs_failed": 3,
"total_jobs_cancelled": 0,
"total_jobs_new_object": 1,
"latest_running_task_status": "COMPLETED",
"total_dispatcher_duration": 90,
model_config = ConfigDict(
json_schema_extra={
"example": {
"total_jobs": 5,
"total_jobs_running": 5,
"total_jobs_completed": 20,
"total_jobs_failed": 3,
"total_jobs_cancelled": 0,
"total_jobs_new_object": 1,
"latest_running_task_status": "COMPLETED",
"total_dispatcher_duration": 90,
}
}
})
)
24 changes: 13 additions & 11 deletions covalent_ui/api/v1/models/logs_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,17 @@ class LogsResponse(BaseModel):

items: List[LogsModule]
total_count: Union[int, None] = None
model_config = ConfigDict(json_schema_extra={
"example": {
"data": [
{
"log_date": "2022-06-13T07:45:02.114328+00:00",
"status": "INFO",
"message": "Application Started",
}
],
"total_count": 1,
model_config = ConfigDict(
json_schema_extra={
"example": {
"data": [
{
"log_date": "2022-06-13T07:45:02.114328+00:00",
"status": "INFO",
"message": "Application Started",
}
],
"total_count": 1,
}
}
})
)

0 comments on commit 4698edc

Please sign in to comment.