-
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
refactor(api): remove legacy from names of variables and classes that are not actually legacy #15075
Conversation
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.
So glad this is happening! Added some soft suggestions.
LoadInfo, | ||
LabwareLoadInfo, | ||
InstrumentLoadInfo, | ||
ModuleLoadInfo, |
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 do prefer these to be aliased as LegacyLoadInfo
, etc because they actually are classes from/for the legacy system.
@@ -63,24 +44,24 @@ | |||
LEGACY_JSON_SCHEMA_VERSION_CUTOFF = 6 | |||
|
|||
|
|||
class LegacyFileReader: | |||
class PythonProtocolFileReader: |
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.
How about PythonAndLegacyFileReader
to be consistent with the PythonAndLegacyRunner
, and also since it actually does include the legacy JSON protocol files.
@@ -129,7 +129,7 @@ def _handle_legacy_command(self, command: LegacyCommand) -> None: | |||
pe_actions = self._legacy_command_mapper.map_command(command=command) | |||
self._actions_to_dispatch.put(pe_actions) | |||
|
|||
def _handle_equipment_loaded(self, load_info: LegacyLoadInfo) -> None: | |||
def _handle_equipment_loaded(self, load_info: LoadInfo) -> None: | |||
"""Handle an equipment load reported by the APIv2 protocol. |
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.
Maybe we can update these docstrings to be clearer too.
"""Handle an equipment load reported by the APIv2 protocol. | |
"""Handle an equipment load reported by the legacy APIv2 protocol. |
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.
LGTM!
… are not actually legacy (#15075)
… are not actually legacy (#15075)
Overview
Sometime ago, a number of classes in our
protocol_runner
folder were marked as legacy with the thought that we'd move to a new major API version and those would no longer be the actively developed parts of our protocol reading and execution.However this proved not to be the cases, and for the past couple years these have continued to be marked as legacy despite the fact that they are being actively used now and for the foreseeable future. Furthermore, there are a number of folders, classes and variables that are marked legacy which are actually legacy parts of our system, further increasing confusion of what is current and what is deprecated/no longer in active development.
This PR renames everything in the
protocol_runner
that was prematurely marked as legacy, and additionally gets rid of a bunch of re-exports that were further naming things that are no longer legacy.Test Plan
Pure refactor PR, so existing unit and integration tests cover everything.
Changelog
legacy_wrappers.py
topython_protocol_wrappers.py
,LegacyFileReader
toPythonProtocolFileReader
,LegacyContextCreator
toProtocolContextCreator
, andLegacyExecutor
toPythonProtocolExecutor
Review requests
Is there anything I either missed or incorrectly labelled as no longer legacy but which in fact is. I also removed the export renaming of
LoadInfo
since the fact that it's legacy is shown by the fact its in the correctly namedlegacy
folder ofprotocol_api
, but if this is a step too far I can revert those changes.Risk assessment
Low, refactor only PR.