Skip to content

Commit

Permalink
chore(python): Various small Python build and dependency fixes (#15720)
Browse files Browse the repository at this point in the history
  • Loading branch information
SyntaxColoring authored Jul 22, 2024
1 parent 5643bbe commit 8f2583f
Show file tree
Hide file tree
Showing 10 changed files with 778 additions and 744 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ HARDWARE_DIR := hardware
USB_BRIDGE_DIR := usb-bridge
NODE_USB_BRIDGE_CLIENT_DIR := usb-bridge/node-client

PYTHON_DIRS := $(API_DIR) $(UPDATE_SERVER_DIR) $(ROBOT_SERVER_DIR) $(SERVER_UTILS_DIR) $(SHARED_DATA_DIR)/python $(G_CODE_TESTING_DIR) $(HARDWARE_DIR) $(USB_BRIDGE_DIR)
PYTHON_DIRS := $(API_DIR) $(UPDATE_SERVER_DIR) $(ROBOT_SERVER_DIR) $(SERVER_UTILS_DIR) $(SHARED_DATA_DIR)/python $(SYSTEM_SERVER_DIR) $(G_CODE_TESTING_DIR) $(HARDWARE_DIR) $(USB_BRIDGE_DIR)

# This may be set as an environment variable (and is by CI tasks that upload
# to test pypi) to add a .dev extension to the python package versions. If
Expand Down
2 changes: 1 addition & 1 deletion api/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def get_version():
f"opentrons-shared-data=={VERSION}",
"aionotify==0.3.1",
"anyio>=3.6.1,<4.0.0",
"jsonschema>=3.0.1,<4.18.0",
"jsonschema>=3.0.1,<5",
"numpy>=1.20.0,<2",
"pydantic>=1.10.9,<2.0.0",
"pyserial>=3.5",
Expand Down
2 changes: 1 addition & 1 deletion hardware/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ python-can = "==4.2.2"
pyserial = "==3.5"
typing-extensions = ">=4.0.0,<5"
numpy = "==1.22.3"
pydantic = "==1.9.2"
pydantic = "==1.10.12"

[dev-packages]
pytest = "==7.4.4"
Expand Down
1,006 changes: 548 additions & 458 deletions hardware/Pipfile.lock

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions hardware/opentrons_hardware/drivers/can_bus/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,21 @@ class DriverSettings(BaseSettings):
"""Settings for driver building."""

interface: str = Field(
DEFAULT_INTERFACE,
default=DEFAULT_INTERFACE,
description=f"Can either be {OPENTRONS_INTERFACE} for simple socket "
f"or a python can interface.",
)
bit_rate: int = Field(
DEFAULT_BITRATE,
default=DEFAULT_BITRATE,
description=f"Bit rate. Not applicable to {OPENTRONS_INTERFACE} interface.",
)
channel: str = Field(DEFAULT_CHANNEL, description="The SocketCan channel.")
channel: str = Field(default=DEFAULT_CHANNEL, description="The SocketCan channel.")

host: str = Field(DEFAULT_HOST, description=f"{OPENTRONS_INTERFACE} only.")
port: int = Field(DEFAULT_PORT, description=f"{OPENTRONS_INTERFACE} only.")
fcan_clock: int = Field(DEFAULT_FDCAN_CLK, description="pcan only.")
sample_rate: float = Field(DEFAULT_SAMPLE_RATE, description="pcan only.")
jump_width: int = Field(DEFAULT_JUMP_WIDTH_SEG, descript="pcan only.")
host: str = Field(default=DEFAULT_HOST, description=f"{OPENTRONS_INTERFACE} only.")
port: int = Field(default=DEFAULT_PORT, description=f"{OPENTRONS_INTERFACE} only.")
fcan_clock: int = Field(default=DEFAULT_FDCAN_CLK, description="pcan only.")
sample_rate: float = Field(default=DEFAULT_SAMPLE_RATE, description="pcan only.")
jump_width: int = Field(default=DEFAULT_JUMP_WIDTH_SEG, description="pcan only.")

class Config: # noqa: D106
env_prefix = "OT3_CAN_DRIVER_"
Expand Down
4 changes: 3 additions & 1 deletion performance-metrics/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ name = "pypi"
[packages]
performance-metrics = {file = ".", editable = true}
psutil = "==6.0.0"
systemd-python = "234"
# systemd-python errors upon installation if the host machine does not have systemd.
# Mark it as Linux-only so we can have dev environments on such machines.
systemd-python = { version = "==234", markers="sys_platform=='linux'" }

[dev-packages]
pytest = "==7.4.4"
Expand Down
15 changes: 8 additions & 7 deletions performance-metrics/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion shared-data/python/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ pytest-clarity = "~=1.0.0"

[packages]
opentrons-shared-data = { editable = true, path = "." }
jsonschema = "==4.21.1"
jsonschema = "==4.17.3"
pydantic = "==1.10.12"
Loading

0 comments on commit 8f2583f

Please sign in to comment.