-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
252 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
from dataclasses import dataclass | ||
from typing import NotRequired, TypedDict | ||
|
||
from shared.reports.editable import EditableReport | ||
|
||
|
||
class UploadArguments(TypedDict): | ||
# TODO(swatinem): migrate this over to `upload_id` | ||
upload_pk: int | ||
|
||
|
||
class ProcessingResult(TypedDict): | ||
upload_id: int | ||
arguments: UploadArguments | ||
successful: bool | ||
error: NotRequired[dict] | ||
|
||
|
||
@dataclass | ||
class IntermediateReport: | ||
upload_id: int | ||
""" | ||
The `Upload` id for which this report was loaded. | ||
""" | ||
|
||
report: EditableReport | ||
""" | ||
The loaded Report. | ||
""" | ||
|
||
|
||
@dataclass | ||
class MergeResult: | ||
session_mapping: dict[int, int] | ||
""" | ||
This is a mapping from the input `upload_id` to the output `session_id` | ||
as it exists in the merged "master Report". | ||
""" | ||
|
||
deleted_sessions: set[int] | ||
""" | ||
The Set of carryforwarded `session_id`s that have been removed from the "master Report". | ||
""" |
Oops, something went wrong.