-
Notifications
You must be signed in to change notification settings - Fork 178
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
chore: bump python deps for 3.10 and robot system updates #13865
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## edge #13865 +/- ##
==========================================
- Coverage 68.05% 58.78% -9.28%
==========================================
Files 2509 1979 -530
Lines 71342 47067 -24275
Branches 9062 8737 -325
==========================================
- Hits 48555 27667 -20888
+ Misses 20684 17370 -3314
+ Partials 2103 2030 -73
Flags with carried forward coverage won't be shown. Click here to find out more.
|
72491a1
to
d12d2eb
Compare
The new OE needs a new version of python-can because the old wasn't compatible with python 3.10. This updates it.
We excluded the top level tests but apparently also need to do that for the subdirectories.
mypy needs to be 0.981 to handle numpy pyis python/mypy#13627 that means pydantic needs to be >1.9.0 to handle new internal apis
d291249
to
5693a8f
Compare
@@ -27,6 +27,6 @@ runs: | |||
- shell: bash | |||
run: | | |||
npm install --global [email protected] | |||
$OT_PYTHON -m pip install pipenv==2021.5.29 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
among other things! note that we'll need to downgrade this to v2023.10.13 if we want to a) keep 3.7 support and b) ensure that by having i guess separate pipfiles (we shouldn't do this, if we want to do something like that we should set up a tox environment just for the api stack)
@@ -75,17 +75,13 @@ jobs: | |||
os: ['windows-2022', 'ubuntu-22.04', 'macos-latest'] | |||
# TODO(mc, 2022-02-24): expand this matrix to 3.8 and 3.9, | |||
# preferably in a nightly cronjob on edge or something | |||
python: ['3.7', '3.10'] | |||
python: ['3.10'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see above re: keeping 3.7 support and testing for it
exclude: | ||
- os: 'macos-latest' | ||
python: '3.10' | ||
python: ['3.10'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see above re: python 3.7 support
@@ -66,7 +66,7 @@ PYTHON_SETUP_TARGETS := $(addsuffix -py-setup, $(PYTHON_DIRS)) | |||
|
|||
.PHONY: setup-py | |||
setup-py: | |||
$(OT_PYTHON) -m pip install pipenv==2021.5.29 | |||
$(OT_PYTHON) -m pip install pipenv==2023.11.15 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see above re: tested versions and pipenv versions
@@ -7,24 +7,24 @@ name = "pypi" | |||
# atomicwrites and colorama are pytest dependencies on windows, | |||
# spec'd here to force lockfile inclusion | |||
# https://github.com/pypa/pipenv/issues/4408#issuecomment-668324177 | |||
atomicwrites = { version = "==1.4.0", sys_platform = "== 'win32'" } | |||
colorama = { version = "==0.4.4", sys_platform = "== 'win32'" } | |||
atomicwrites = { version = "==1.4.0", markers="sys_platform=='win32'" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one annoying subtle pipenv change was they altered how you spell markers in pipfiles
shared-data/python/opentrons_shared_data/labware/labware_definition.py
Outdated
Show resolved
Hide resolved
@@ -6,43 +6,40 @@ name = "pypi" | |||
[packages] | |||
fastapi = "==0.68.1" | |||
uvicorn = "==0.14.0" | |||
anyio = "==3.3.0" | |||
anyio = "==3.6.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from system builder
pydantic = "==1.8.2" | ||
sqlalchemy = "==1.4.32" | ||
systemd-python = { version = "==234", sys_platform = "== 'linux'" } | ||
pydantic = "==1.9.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for mypy
return web.json_response( # type: ignore[no-untyped-call,no-any-return] | ||
data={"message": msg}, status=400 | ||
) | ||
return web.json_response(data={"message": msg}, status=400) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typed aiohttp? the future is now!
@@ -97,6 +97,8 @@ async def status(request: web.Request, session: UpdateSession) -> web.Response: | |||
async def _save_file(part: BodyPartReader, path: str) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all this stuff wasn't type safe at all and now it should be
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hallelujah.
Here are some preliminary comments and questions. I'll take a closer look when we return in January, but I don't anticipate anything that would block this from merging.
shared-data/python/opentrons_shared_data/labware/labware_definition.py
Outdated
Show resolved
Hide resolved
robot-server/tests/integration/http_api/test_deck_configuration.tavern.yaml
Outdated
Show resolved
Hide resolved
Add the missing .json() override to BaseResponseBody.
Are we addressing #11905 request here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've reviewed this in detail and it looks great to merge whenever you're ready with Opentrons/oe-core#110 and Opentrons/buildroot#213. Thank you so much, @caila-marashaj and @sfoster1, for pulling this off!
No, but I want to do the following:
|
This PR contains updates required to handle Opentrons/oe-core#110 and Opentrons/buildroot#213 which update the flex operating system and ot-2 operating system respectively to more recent versions of, well everything. Perhaps most significantly to us, both PRs update the python that runs on the machine to 3.10, which requires a lot of changes to a lot of our code.
This PR makes those changes by updating the python versions used in our test harnesses to 3.10; setting those dependencies explicitly captured by the system builders to their new versions from the new versions of the system builders; and bumping other dependencies the minimum required to make it all work. Further work may increase dependency versions further.
The big ones are updating pydantic to 1.9, which is something we've been putting off for a while and probably unlocks further updates. This update is because of the following, which is typical of the process:
This should hopefully free us to update mypy to the latest again, and hopefully the changes to explicit handling of none keys will let us update pydantic further.
Anyway, there's a fair amount of "just run the robot" style testing to do here, and we have to decide what to do about loading pickles; handling user-installed dependencies; and further support of 3.7. But all the tests should now pass.