Skip to content

Commit

Permalink
rename to allCommandErrors
Browse files Browse the repository at this point in the history
  • Loading branch information
TamarZanzouri committed Jul 31, 2024
1 parent a870280 commit 09321af
Show file tree
Hide file tree
Showing 22 changed files with 52 additions and 50 deletions.
1 change: 1 addition & 0 deletions api-client/src/runs/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export interface LegacyGoodRunData {
status: RunStatus
actions: RunAction[]
errors: RunError[]
allCommandErrors: RunError[]
pipettes: LoadedPipette[]
labware: LoadedLabware[]
liquids: Liquid[]
Expand Down
2 changes: 1 addition & 1 deletion api/src/opentrons/cli/analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ async def _do_analyze(protocol_source: ProtocolSource) -> RunResult:
modules=[],
labwareOffsets=[],
liquids=[],
fullErrorList=[error_occ],
allCommandErrors=[error_occ],
),
parameters=[],
)
Expand Down
2 changes: 1 addition & 1 deletion api/src/opentrons/protocol_engine/state/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def get_summary(self) -> StateSummary:
completedAt=self._state.commands.run_completed_at,
startedAt=self._state.commands.run_started_at,
liquids=self._liquid.get_all(),
fullErrorList=self._commands.get_all_errors(),
allCommandErrors=self._commands.get_all_errors(),
)


Expand Down
2 changes: 1 addition & 1 deletion api/src/opentrons/protocol_engine/state/state_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class StateSummary(BaseModel):
# errors is a list for historical reasons. (This model needs to stay compatible with
# robot-server's database.) It shouldn't have more than 1 element.
errors: List[ErrorOccurrence]
fullErrorList: List[ErrorOccurrence]
allCommandErrors: List[ErrorOccurrence]
labware: List[LoadedLabware]
pipettes: List[LoadedPipette]
modules: List[LoadedModule]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def _build_run(
pipettes=[],
modules=[],
liquids=[],
fullErrorList=[],
allCommandErrors=[],
)
return MaintenanceRun.construct(
id=run_id,
Expand All @@ -48,7 +48,7 @@ def _build_run(
completedAt=state_summary.completedAt,
startedAt=state_summary.startedAt,
liquids=state_summary.liquids,
fullErrorList=state_summary.fullErrorList,
allCommandErrors=state_summary.allCommandErrors,
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class MaintenanceRun(ResourceModel):
" but it won't have more than one element."
),
)
fullErrorList: List[ErrorOccurrence] = Field(
allCommandErrors: List[ErrorOccurrence] = Field(
...,
description=("A list of errors that occured during the run."),
)
Expand Down
6 changes: 3 additions & 3 deletions robot-server/robot_server/runs/run_data_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def _build_run(
actions=run_resource.actions,
status=state_summary.status,
errors=state_summary.errors,
fullErrorList=state_summary.fullErrorList,
allCommandErrors=state_summary.allCommandErrors,
labware=state_summary.labware,
labwareOffsets=state_summary.labwareOffsets,
pipettes=state_summary.pipettes,
Expand All @@ -66,7 +66,7 @@ def _build_run(
pipettes=[],
modules=[],
liquids=[],
fullErrorList=[],
allCommandErrors=[],
)
errors.append(state_summary.dataError)
else:
Expand Down Expand Up @@ -109,7 +109,7 @@ def _build_run(
startedAt=state.startedAt,
liquids=state.liquids,
runTimeParameters=run_time_parameters,
fullErrorList=state.fullErrorList,
allCommandErrors=state.allCommandErrors,
)


Expand Down
4 changes: 2 additions & 2 deletions robot-server/robot_server/runs/run_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class Run(ResourceModel):
" but it won't have more than one element."
),
)
fullErrorList: List[ErrorOccurrence] = Field(
allCommandErrors: List[ErrorOccurrence] = Field(
...,
description=("A list of errors that occured during the run."),
)
Expand Down Expand Up @@ -187,7 +187,7 @@ class BadRun(ResourceModel):
" but it won't have more than one element."
),
)
fullErrorList: List[ErrorOccurrence] = Field(
allCommandErrors: List[ErrorOccurrence] = Field(
...,
description=("A list of errors that occured during the run."),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ stages:
current: True
actions: []
errors: []
fullErrorList: []
allCommandErrors: []
pipettes: []
modules: []
labware:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ stages:
current: True
actions: []
errors: []
fullErrorList: []
allCommandErrors: []
pipettes: []
modules: []
labware:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ stages:
current: True
actions: []
errors: []
fullErrorList: []
allCommandErrors: []
pipettes: []
modules: []
labware:
Expand Down Expand Up @@ -242,6 +242,7 @@ stages:
runTimeParameters: []
completedAt: !re_fullmatch "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d+(Z|([+-]\\d{2}:\\d{2}))"
errors: []
allCommandErrors: []
pipettes: []
modules: []
protocolId: '{protocol_id}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ stages:
createdAt: !re_fullmatch "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d+(Z|([+-]\\d{2}:\\d{2}))"
current: True
errors: []
fullErrorList: []
allCommandErrors: []
id: '{run_id}'
labware: []
labwareOffsets: []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ stages:
current: True
actions: []
errors: []
fullErrorList: []
allCommandErrors: []
pipettes: []
modules: []
labware: []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ async def test_create_run(
labwareOffsets=[],
status=pe_types.EngineStatus.IDLE,
liquids=[],
fullErrorList=[],
allCommandErrors=[],
)

decoy.when(
Expand Down Expand Up @@ -147,7 +147,7 @@ async def test_get_run_data_from_url(
labware=[],
labwareOffsets=[],
liquids=[],
fullErrorList=[],
allCommandErrors=[],
)

decoy.when(mock_maintenance_run_data_manager.get("run-id")).then_return(
Expand Down Expand Up @@ -197,7 +197,7 @@ async def test_get_run() -> None:
labware=[],
labwareOffsets=[],
liquids=[],
fullErrorList=[],
allCommandErrors=[],
)

result = await get_run(run_data=run_data)
Expand All @@ -223,7 +223,7 @@ async def test_get_current_run(
labware=[],
labwareOffsets=[],
liquids=[],
fullErrorList=[],
allCommandErrors=[],
)
decoy.when(mock_maintenance_run_data_manager.current_run_id).then_return(
"current-run-id"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def run() -> MaintenanceRun:
modules=[],
labwareOffsets=[],
liquids=[],
fullErrorList=[],
allCommandErrors=[],
)


Expand Down
8 changes: 4 additions & 4 deletions robot-server/tests/maintenance_runs/test_run_data_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def engine_state_summary() -> StateSummary:
return StateSummary(
status=EngineStatus.IDLE,
errors=[ErrorOccurrence.construct(id="some-error-id")], # type: ignore[call-arg]
fullErrorList=[ErrorOccurrence.construct(id="some-error-id")], # type: ignore[call-arg]
allCommandErrors=[ErrorOccurrence.construct(id="some-error-id")], # type: ignore[call-arg]
labware=[LoadedLabware.construct(id="some-labware-id")], # type: ignore[call-arg]
labwareOffsets=[LabwareOffset.construct(id="some-labware-offset-id")], # type: ignore[call-arg]
pipettes=[LoadedPipette.construct(id="some-pipette-id")], # type: ignore[call-arg]
Expand Down Expand Up @@ -133,7 +133,7 @@ async def test_create(
status=engine_state_summary.status,
actions=[],
errors=engine_state_summary.errors,
fullErrorList=engine_state_summary.fullErrorList,
allCommandErrors=engine_state_summary.allCommandErrors,
labware=engine_state_summary.labware,
labwareOffsets=engine_state_summary.labwareOffsets,
pipettes=engine_state_summary.pipettes,
Expand Down Expand Up @@ -186,7 +186,7 @@ async def test_create_with_options(
status=engine_state_summary.status,
actions=[],
errors=engine_state_summary.errors,
fullErrorList=engine_state_summary.fullErrorList,
allCommandErrors=engine_state_summary.allCommandErrors,
labware=engine_state_summary.labware,
labwareOffsets=engine_state_summary.labwareOffsets,
pipettes=engine_state_summary.pipettes,
Expand Down Expand Up @@ -255,7 +255,7 @@ async def test_get_current_run(
status=engine_state_summary.status,
actions=[],
errors=engine_state_summary.errors,
fullErrorList=engine_state_summary.fullErrorList,
allCommandErrors=engine_state_summary.allCommandErrors,
labware=engine_state_summary.labware,
labwareOffsets=engine_state_summary.labwareOffsets,
pipettes=engine_state_summary.pipettes,
Expand Down
2 changes: 1 addition & 1 deletion robot-server/tests/protocols/test_protocol_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ async def test_analyze(
modules=[],
labwareOffsets=[],
liquids=[],
fullErrorList=[],
allCommandErrors=[],
),
parameters=[bool_parameter],
)
Expand Down
16 changes: 8 additions & 8 deletions robot-server/tests/runs/router/test_base_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ async def test_create_run(
labwareOffsets=[],
status=pe_types.EngineStatus.IDLE,
liquids=[],
fullErrorList=[],
allCommandErrors=[],
)
decoy.when(
await mock_deck_configuration_store.get_deck_configuration()
Expand Down Expand Up @@ -160,7 +160,7 @@ async def test_create_protocol_run(
labwareOffsets=[],
status=pe_types.EngineStatus.IDLE,
liquids=[],
fullErrorList=[],
allCommandErrors=[],
)
decoy.when(
await mock_deck_configuration_store.get_deck_configuration()
Expand Down Expand Up @@ -282,7 +282,7 @@ async def test_get_run_data_from_url(
labware=[],
labwareOffsets=[],
liquids=[],
fullErrorList=[],
allCommandErrors=[],
)

decoy.when(mock_run_data_manager.get("run-id")).then_return(expected_response)
Expand Down Expand Up @@ -329,7 +329,7 @@ async def test_get_run() -> None:
labware=[],
labwareOffsets=[],
liquids=[],
fullErrorList=[],
allCommandErrors=[],
)

result = await get_run(run_data=run_data)
Expand Down Expand Up @@ -375,7 +375,7 @@ async def test_get_runs_not_empty(
labware=[],
labwareOffsets=[],
liquids=[],
fullErrorList=[],
allCommandErrors=[],
)

response_2 = Run(
Expand All @@ -391,7 +391,7 @@ async def test_get_runs_not_empty(
labware=[],
labwareOffsets=[],
liquids=[],
fullErrorList=[],
allCommandErrors=[],
)

decoy.when(mock_run_data_manager.get_all(20)).then_return([response_1, response_2])
Expand Down Expand Up @@ -470,7 +470,7 @@ async def test_update_run_to_not_current(
labware=[],
labwareOffsets=[],
liquids=[],
fullErrorList=[],
allCommandErrors=[],
)

decoy.when(await mock_run_data_manager.update("run-id", current=False)).then_return(
Expand Down Expand Up @@ -505,7 +505,7 @@ async def test_update_current_none_noop(
labware=[],
labwareOffsets=[],
liquids=[],
fullErrorList=[],
allCommandErrors=[],
)

decoy.when(await mock_run_data_manager.update("run-id", current=None)).then_return(
Expand Down
2 changes: 1 addition & 1 deletion robot-server/tests/runs/router/test_labware_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def run() -> Run:
labwareOffsets=[],
protocolId=None,
liquids=[],
fullErrorList=[],
allCommandErrors=[],
)


Expand Down
2 changes: 1 addition & 1 deletion robot-server/tests/runs/test_run_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def engine_state_summary() -> StateSummary:
pipettes=[],
modules=[],
liquids=[],
fullErrorList=[],
allCommandErrors=[],
)


Expand Down
Loading

0 comments on commit 09321af

Please sign in to comment.