Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changes to update remote Protocols repo to 6.1.0 for heater shaker pr… #4157

Open
wants to merge 27 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 && \
Expand Down
10 changes: 9 additions & 1 deletion protolib/parse/parseOT2v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions protolib/parse/readme_map.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
}
}
}