-
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
Merged
Merged
refactor(api): remove legacy from names of variables and classes that are not actually legacy #15075
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
d7c1522
beginning to rename incorrectly named legacy variables and classes, a…
jbleon95 8605f3e
more renaming away from legacy
jbleon95 a672a9a
renaming protocol_runner test fixture
jbleon95 64a3a20
opentrons api can have a little legacy as a treat
jbleon95 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -7,10 +7,10 @@ | |||||
|
||||||
from opentrons.legacy_commands.types import CommandMessage as LegacyCommand | ||||||
from opentrons.legacy_broker import LegacyBroker | ||||||
from opentrons.protocol_api.core.legacy.load_info import LoadInfo | ||||||
from opentrons.protocol_engine import AbstractPlugin, actions as pe_actions | ||||||
from opentrons.util.broker import ReadOnlyBroker | ||||||
|
||||||
from .legacy_wrappers import LegacyLoadInfo | ||||||
from .legacy_command_mapper import LegacyCommandMapper | ||||||
from .thread_async_queue import ThreadAsyncQueue | ||||||
|
||||||
|
@@ -37,7 +37,7 @@ class LegacyContextPlugin(AbstractPlugin): | |||||
def __init__( | ||||||
self, | ||||||
broker: LegacyBroker, | ||||||
equipment_broker: ReadOnlyBroker[LegacyLoadInfo], | ||||||
equipment_broker: ReadOnlyBroker[LoadInfo], | ||||||
legacy_command_mapper: Optional[LegacyCommandMapper] = None, | ||||||
) -> None: | ||||||
"""Initialize the plugin with its dependencies.""" | ||||||
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we can update these docstrings to be clearer too.
Suggested change
|
||||||
|
||||||
Used as a broker callback, so this will run in the APIv2 protocol's thread. | ||||||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.