Skip to content

Commit

Permalink
require version 2.20 for add csv parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
jbleon95 committed Aug 6, 2024
1 parent 1e4155a commit 7e2979f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions api/src/opentrons/protocol_api/_parameter_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from typing import List, Optional, Union, Dict

from opentrons.protocols.api_support.types import APIVersion
from opentrons.protocols.api_support.util import requires_version
from opentrons.protocols.parameters import (
parameter_definition,
csv_parameter_definition,
Expand Down Expand Up @@ -168,6 +169,7 @@ def add_str(
)
self._parameters[parameter.variable_name] = parameter

@requires_version(2, 20)
def add_csv_file(
self,
display_name: str,
Expand Down
4 changes: 2 additions & 2 deletions api/tests/opentrons/cli/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ def test_file_required_error(
python_protocol_source = textwrap.dedent(
# Raises an exception during runner load.
"""\
requirements = {"robotType": "OT-2", "apiLevel": "2.18"}
requirements = {"robotType": "OT-2", "apiLevel": "2.20"}
def add_parameters(parameters):
parameters.add_csv_file(
Expand All @@ -350,7 +350,7 @@ def run(protocol):
assert result.json_output["liquids"] == []
assert result.json_output["modules"] == []
assert result.json_output["config"] == {
"apiVersion": [2, 18],
"apiVersion": [2, 20],
"protocolType": "python",
}
assert result.json_output["files"] == [{"name": "protocol.py", "role": "main"}]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from opentrons.protocol_api import ProtocolContext, ParameterContext

metadata = {
"apiLevel": "2.18",
"apiLevel": "2.20",
"author": "[email protected]",
"protocolName": "basic_transfer_standalone",
}
Expand Down

0 comments on commit 7e2979f

Please sign in to comment.