diff --git a/Makefile b/Makefile index d1701459e0..d2b010ce6d 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,9 @@ SHELL := /bin/bash +PROTOCOLS_PYTHON ?= python + MONOREPO_URI := https://github.com/Opentrons/opentrons.git -OT2_VERSION_TAG := v4.3.0 +OT2_VERSION_TAG := v6.1.0 OT2_MONOREPO_DIR := ot2monorepoClone # Parsers output to here @@ -15,26 +17,25 @@ OT2_INPUT_FILES_UNFILTERED := $(shell find protocols -type f -name '*.ot2.apiv2. OT2_INPUT_FILES := $(filter-out $(IGNORED_INPUT_PATHS), $(OT2_INPUT_FILES_UNFILTERED)) OT2_OUTPUT_FILES := $(patsubst protocols/%.ot2.apiv2.py, $(BUILD_DIR)/%.ot2.apiv2.py.json, $(OT2_INPUT_FILES)) +pip_install := ${PROTOCOLS_PYTHON} -m pip install + + .PHONY: all all: parse-ot2 parse-errors parse-README $(MAKE) build -ot2monorepoClone: +.PHONY: clone-repo +clone-repo: git clone --depth=1 --branch=$(OT2_VERSION_TAG) $(MONOREPO_URI) $(OT2_MONOREPO_DIR) .PHONY: setup -setup: - $(MAKE) ot2monorepoClone - python -m pip install virtualenv +setup: clone-repo + ${pip_install} virtualenv flake8==3.8.4 pytest $(MAKE) venvs/ot2 venvs/ot2: - mkdir -p venvs - virtualenv venvs/ot2 - source venvs/ot2/bin/activate && \ pip install -e otcustomizers && \ pip install -r protolib/requirements.txt && \ - pip install pipenv==2021.5.29 && \ pushd $(OT2_MONOREPO_DIR)/api/ && \ $(MAKE) setup && \ python setup.py install && \ diff --git a/protolib/parse/parseOT2v2.py b/protolib/parse/parseOT2v2.py index aa01e0d5b0..6ee662b420 100644 --- a/protolib/parse/parseOT2v2.py +++ b/protolib/parse/parseOT2v2.py @@ -2,6 +2,10 @@ import sys from pathlib import Path import opentrons +from opentrons.hardware_control import ( + API as HardwareAPI, + ThreadManager, + ) from opentrons.protocols.execution.execute import run_protocol from opentrons.protocols.parse import parse as parse_protocol from opentrons.protocols.context.simulator.protocol_context \ @@ -106,10 +110,14 @@ def parse(protocol_path): assert protocol.api_level >= (2, 0) # Use a simulating protocol context - context_impl = ProtocolContextSimulation() + sh_arg = ThreadManager(HardwareAPI.build_hardware_simulator).sync + + context_impl = ProtocolContextSimulation( + sync_hardware=sh_arg, api_version=protocol.api_level) context = opentrons.protocol_api.contexts.ProtocolContext( implementation=context_impl) + # NOTE:(IL, 2020-05-13)L there’s no deck calibration, and the # identity deck calibration is about 25 mm too high (as of v1.17.1). # Because of this, tall labware can cross the threshold and cause a diff --git a/protolib/parse/readme_map.json b/protolib/parse/readme_map.json index 956dafea57..281282cc16 100644 --- a/protolib/parse/readme_map.json +++ b/protolib/parse/readme_map.json @@ -61,6 +61,10 @@ "thermocycler": { "displayText": "Opentrons Thermocycler Module", "link": "https://shop.opentrons.com/thermocycler-module-1/" + }, + "heatershaker": { + "displayText": "Opentrons Heater-Shaker Module", + "link": "https://shop.opentrons.com/heater-shaker-module/" } } }