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

Add opentrons recipes #15705

Merged
merged 26 commits into from
Aug 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
2d94974
Add opentrons recipes
mrakitin Jul 20, 2021
d1e21c3
Add summary and update the URLs for opentrons
mrakitin Jul 20, 2021
5114ba6
Correct dependency formatting; sorted.
mrakitin Jul 20, 2021
8bb6f53
Do not parametrize the GH URL
mrakitin Jul 20, 2021
fba49f3
Use install commands from Dockerfile
mrakitin Jul 21, 2021
72185fc
Arch-dependent opentrons; update install command for Windows
mrakitin Jul 21, 2021
cd0dca0
Update install command for opentrons_shared_data
mrakitin Jul 21, 2021
5992a5b
Extract building steps in relevant scripts
mrakitin Jul 21, 2021
94fb998
Simplify PYTHONPATH env var
mrakitin Jul 21, 2021
c689419
Debug info in bld.bat
mrakitin Jul 21, 2021
1a80563
Do not use jinja vars in build files
mrakitin Jul 21, 2021
2331cff
Try skipping py39 to see it if passes
mrakitin Jul 22, 2021
2f4640e
Remove upper Python pin; comment-out typing-extensions dep
mrakitin Jul 22, 2021
4183713
Slightly relax dependencies pins
mrakitin Jul 22, 2021
2df9853
Add a patch & fix pip-checked pin
mrakitin Jul 23, 2021
3365c83
Add typing-extensions to the run deps
mrakitin Jul 23, 2021
e8e1620
Run 'pip check' test command for Linux only
mrakitin Jul 23, 2021
4a50924
Remove pip-check & relax pedantic pin
mrakitin Jul 23, 2021
008e934
More consistent bld.bat for Win builds
mrakitin Jul 23, 2021
1014349
Update pip install command for Win
mrakitin Jul 23, 2021
9c5b7d6
Update bld.bat with tested instructions
mrakitin Jul 23, 2021
fa9e1c6
Combine 2 opentrons recipes into one with outputs
mrakitin Jul 29, 2021
4c46e34
Change the suite name
mrakitin Jul 29, 2021
56712df
Do not use pin_subpackage
mrakitin Jul 29, 2021
52219b0
Do not install PyPI dependencies
mrakitin Jul 29, 2021
a55d5a3
Revert usage of pin_subpackage
mrakitin Jul 29, 2021
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
From c6f69700d07f0f672eeefafa2713a57e9255bebd Mon Sep 17 00:00:00 2001
From: Maksim Rakitin <[email protected]>
Date: Thu, 22 Jul 2021 23:37:13 -0400
Subject: [PATCH] FIX: ignore missing aionotify more properly

---
api/src/opentrons/hardware_control/controller.py | 2 +-
api/tests/opentrons/conftest.py | 2 +-
api/tests/opentrons/hardware_control/test_instruments.py | 2 +-
api/tests/opentrons/hardware_control/test_modules.py | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/api/src/opentrons/hardware_control/controller.py b/api/src/opentrons/hardware_control/controller.py
index a28bfa623..20b4aa1c6 100644
--- a/api/src/opentrons/hardware_control/controller.py
+++ b/api/src/opentrons/hardware_control/controller.py
@@ -7,7 +7,7 @@ from typing import (Any, Dict, List, Optional, Tuple,
from typing_extensions import Final
try:
import aionotify # type: ignore
-except OSError:
+except (OSError, ModuleNotFoundError):
aionotify = None # type: ignore

from opentrons.drivers.smoothie_drivers import driver_3_0
diff --git a/api/tests/opentrons/conftest.py b/api/tests/opentrons/conftest.py
index fa1e0d2b3..a85c2ac08 100755
--- a/api/tests/opentrons/conftest.py
+++ b/api/tests/opentrons/conftest.py
@@ -9,7 +9,7 @@ from opentrons.protocols.context.protocol_api.protocol_context import \

try:
import aionotify
-except OSError:
+except (OSError, ModuleNotFoundError):
aionotify = None # type: ignore
import asyncio
import os
diff --git a/api/tests/opentrons/hardware_control/test_instruments.py b/api/tests/opentrons/hardware_control/test_instruments.py
index 2e00e9841..cd358c3ed 100644
--- a/api/tests/opentrons/hardware_control/test_instruments.py
+++ b/api/tests/opentrons/hardware_control/test_instruments.py
@@ -2,7 +2,7 @@ import asyncio
from unittest import mock
try:
import aionotify
-except OSError:
+except (OSError, ModuleNotFoundError):
aionotify = None # type: ignore
import pytest
import typeguard
diff --git a/api/tests/opentrons/hardware_control/test_modules.py b/api/tests/opentrons/hardware_control/test_modules.py
index 406f373ba..6591ef80d 100644
--- a/api/tests/opentrons/hardware_control/test_modules.py
+++ b/api/tests/opentrons/hardware_control/test_modules.py
@@ -4,7 +4,7 @@ from unittest import mock
import pytest
try:
import aionotify
-except OSError:
+except (OSError, ModuleNotFoundError):
aionotify = None # type: ignore
from opentrons.hardware_control import ExecutionManager
from opentrons.hardware_control.modules import ModuleAtPort
--
2.30.2

11 changes: 11 additions & 0 deletions recipes/opentrons/install-opentrons.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
set PYTHONPATH=%CD%\scripts
cd api\
%PYTHON% setup.py bdist_wheel

dir
dir dist

for /f "tokens=* USEBACKQ" %%g in (`dir /b dist\*.whl`) do (set "whl=%%g")

%PYTHON% -m pip install dist\%whl% -vv --no-deps

9 changes: 9 additions & 0 deletions recipes/opentrons/install-opentrons.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

set -vxeuo pipefail

export PYTHONPATH=$PWD/scripts/
cd api/
$PYTHON setup.py bdist_wheel
$PYTHON -m pip install dist/*.whl -vv --no-deps

11 changes: 11 additions & 0 deletions recipes/opentrons/install-shared-data.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
set PYTHONPATH=%CD%\scripts
cd shared-data\python\
%PYTHON% setup.py bdist_wheel

dir
dir dist

for /f "tokens=* USEBACKQ" %%g in (`dir /b dist\*.whl`) do (set "whl=%%g")

%PYTHON% -m pip install dist\%whl% -vv --no-deps

10 changes: 10 additions & 0 deletions recipes/opentrons/install-shared-data.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

set -vxeuo pipefail

export PYTHONPATH=$PWD/scripts/

cd shared-data/python/
$PYTHON setup.py bdist_wheel
$PYTHON -m pip install dist/*.whl -vv --no-deps

74 changes: 74 additions & 0 deletions recipes/opentrons/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{% set version = "4.4.0" %}

package:
name: opentrons-suite
version: {{ version }}

source:
url: https://github.com/Opentrons/opentrons/archive/refs/tags/v{{ version }}.tar.gz
sha256: 6dd85756b1c99050926abf6d518fc8179a367a8a0c53d67d170c87312419cf3f
patches:
- 0001-FIX-ignore-missing-aionotify-more-properly.patch

build:
number: 0

outputs:
- name: opentrons_shared_data
script: install-shared-data.bat # [win]
script: install-shared-data.sh # [not win]
build:
noarch: python
requirements:
host:
- python >=3.7
- pip
run:
- python >=3.7
- jsonschema >=3.0.2,<4
test:
imports:
- opentrons_shared_data
commands:
- pip check
requires:
- pip

- name: opentrons
script: install-opentrons.bat # [win]
script: install-opentrons.sh # [not win]
build:
entry_points:
- opentrons_simulate = opentrons.simulate:main
- opentrons_execute = opentrons.execute:main
skip: true # [py<37]
requirements:
host:
- python
- pip
run:
- python
- aionotify >=0.2.0 # [linux]
- jsonschema >=3.0.2,<4
- numpy >=1.15.1
- pydantic >=1.4
- pyserial >=3.5
- typing-extensions >=3.7.4.3
- {{ pin_subpackage('opentrons_shared_data', max_pin="x.x.x") }}
test:
imports:
- opentrons

about:
home: https://www.opentrons.com
license: Apache-2.0
license_file: LICENSE
summary: |
The Opentrons API is a simple framework designed to make writing automated
biology lab protocols easy
dev_url: https://github.com/Opentrons/opentrons
doc_url: https://docs.opentrons.com

extra:
recipe-maintainers:
- mrakitin