Skip to content

Commit

Permalink
chore: not tracking client-side analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekMaggio committed Jun 3, 2024
1 parent cc0dc74 commit d64072a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 31 deletions.
1 change: 0 additions & 1 deletion api/src/opentrons/cli/analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ def _get_return_code(analysis: RunResult) -> int:
return 0


@track_analysis
async def _do_analyze(protocol_source: ProtocolSource) -> RunResult:

runner = await create_simulating_runner(
Expand Down
31 changes: 1 addition & 30 deletions api/tests/opentrons/cli/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,33 +298,4 @@ def test_python_error_line_numbers(
assert result.exit_code == 0
assert result.json_output is not None
[error] = result.json_output["errors"]
assert error["detail"] == expected_detail


@pytest.mark.usefixtures("override_data_store")
@pytest.mark.parametrize("output", ["--json-output", "--human-json-output"])
def test_track_analysis(tmp_path: Path, output: str) -> None:
"""Test that the RobotContextTracker tracks analysis."""
protocol_source = textwrap.dedent(
"""
requirements = {"apiLevel": "2.15"}
def run(protocol):
pass
"""
)
protocol_source_file = tmp_path / "protocol.py"
protocol_source_file.write_text(protocol_source, encoding="utf-8")
store = context_tracker._store # type: ignore[attr-defined]

num_storage_entities_before_analysis = len(store._data)

_get_analysis_result([protocol_source_file], output)

assert len(store._data) == num_storage_entities_before_analysis + 1

verify_metrics_store_file(store.metadata.data_file_location, 0)

context_tracker.store()

verify_metrics_store_file(store.metadata.data_file_location, 1)
assert error["detail"] == expected_detail

0 comments on commit d64072a

Please sign in to comment.