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

refactor(hardware): constants from firmware #9016

Merged
merged 6 commits into from
Dec 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
34 changes: 19 additions & 15 deletions .github/workflows/hardware-lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,6 @@ jobs:
timeout-minutes: 20
runs-on: 'ubuntu-20.04'
steps:
- name: Setup SocketCan
run: |
sudo apt-get update
sudo apt-get install linux-modules-extra-$(uname -r)
sudo modprobe vcan

- name: Checkout firmware repo
uses: actions/checkout@v2

- name: Run OT-3 Emulator
uses: Opentrons/[email protected]
with:
ot3-firmware-commit-id: latest
modules-commit-id: latest

- name: Checkout opentrons repo
uses: 'actions/checkout@v2'

Expand Down Expand Up @@ -78,3 +63,22 @@ jobs:
with:
files: ./hardware/coverage.xml
flags: hardware
integration:
name: 'hardware package integration tests'
timeout-minutes: 20
runs-on: 'ubuntu-20.04'
steps:
- name: Setup SocketCan
run: |
sudo apt-get update
sudo apt-get install linux-modules-extra-$(uname -r)
sudo modprobe vcan

- name: Checkout firmware repo
uses: actions/checkout@v2

- name: Run OT-3 Emulator
uses: Opentrons/[email protected]
with:
ot3-firmware-commit-id: latest
modules-commit-id: latest
4 changes: 2 additions & 2 deletions api/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ format:
$(python) -m black src tests setup.py

docs/build/html/v%: docs/v%
$(sphinx_build) -b html -d docs/build/doctrees -n $< $@
$(sphinx_build_allow_warnings) -b html -d docs/build/doctrees -n $< $@
# sphinx wont automatically do this because it's only in a template
$(SHX) cp docs/img/lightbulb.jpg $@/_images/

Expand All @@ -122,7 +122,7 @@ docs/build/html/hardware: docs/hardware src/opentrons/hardware_control
$(SHX) cp docs/img/lightbulb.jpg $@/_images/

docs/build/pdf/OpentronsPythonAPIV%.pdf: docs/v%
$(sphinx_build) -b latex -d docs/build/doctrees $< $(@D)
$(sphinx_build_allow_warnings) -b latex -d docs/build/doctrees $< $(@D)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bummer, but 👍 if this fixes spurious/uncontrollable CI stuff.

(Cross-reference for posterity: #6135)

$(MAKE) -C $(@D) all-pdf $(if $(CI),>/dev/null,|| $(SHX) echo "latex build failed (pdflatex not installed?)")
$(SHX) ls $(@D)/*.pdf $(if $(CI),,|| $(SHX) echo "no pdf produced")

Expand Down
1 change: 1 addition & 0 deletions api/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ types-setuptools = "==57.0.2"
opentrons-shared-data = {editable = true, path = "../shared-data/python"}
opentrons = {editable = true, path = "."}
opentrons-hardware = {editable = true, path = "./../hardware"}
opentrons-ot3-firmware = {subdirectory = "python", git = "https://github.com/Opentrons/ot3-firmware.git", branch = "main"}
548 changes: 304 additions & 244 deletions api/Pipfile.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions api/docs/v1/api_cache/robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ def connect(self, port=None, options=None):
-------
``True`` for success, ``False`` for failure.

Note
----
Notes
-----
If you wish to connect to the robot without using the OT App, you will
need to use this function.

Expand Down
6 changes: 3 additions & 3 deletions api/src/opentrons/hardware_control/ot3controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@

try:
from opentrons_hardware.drivers.can_bus import CanDriver, CanMessenger
from opentrons_hardware.drivers.can_bus.constants import NodeId
from opentrons_hardware.hardware_control.motion import create
from opentrons_hardware.hardware_control.move_group_runner import MoveGroupRunner
from opentrons_hardware.drivers.can_bus.messages.message_definitions import (
from opentrons_ot3_firmware.constants import NodeId
from opentrons_ot3_firmware.messages.message_definitions import (
SetupRequest,
EnableMotorRequest,
)
from opentrons_hardware.drivers.can_bus.messages.payloads import EmptyPayload
from opentrons_ot3_firmware.messages.payloads import EmptyPayload
except ModuleNotFoundError:
pass

Expand Down
10 changes: 7 additions & 3 deletions hardware/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ format:
dev:
echo "Nothing here yet"

.PHONY: opentrons_ot3_firmware_dist
opentrons_ot3_firmware_dist: Pipfile.lock
mkdir -p dist
$(python) ../scripts/bundle_installed_package.py opentrons_ot3_firmware dist

.PHONY: push-no-restart
push-no-restart: wheel
Expand All @@ -109,11 +113,11 @@ push-no-restart: wheel
push: push-no-restart
$(call restart-service,$(host),$(br_ssh_key),$(ssh_opts),"jupyter-notebook opentrons-robot-server")


.PHONY: push-no-restart-ot3
push-no-restart-ot3: $(sdist_file)
echo $(sdist_file)
push-no-restart-ot3: $(sdist_file) Pipfile.lock
echo $(sdist_file) $(wildcard dist/opentrons_ot3_firmware-*.tar.gz)
$(call push-python-sdist,$(host),,$(ssh_opts),$(sdist_file),/opt/opentrons-robot-server,"opentrons_hardware")
$(call push-python-sdist,$(host),,$(ssh_opts),$(wildcard dist/opentrons_ot3_firmware-*.tar.gz),/opt/opentrons-robot-server,"opentrons_ot3_firmware")

.PHONY: push-ot3
push-ot3: push-no-restart-ot3
Expand Down
1 change: 1 addition & 0 deletions hardware/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ name = "pypi"
python-can = "==3.3.4"
pyserial = "==3.5"
typing-extensions = "==3.10.0.0"
opentrons-ot3-firmware = {subdirectory = "python", git = "https://github.com/Opentrons/ot3-firmware.git", branch = "main"}

[dev-packages]
pytest = "==6.1.0"
Expand Down
Loading