-
Notifications
You must be signed in to change notification settings - Fork 21
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 the internal package structure and change how driver classes inherit functionality #333
Merged
Conversation
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
…ed TekAFGAWG. Also removed the previously deprecated TekScopeSW alias.
…e TekScopePC driver that it shouldn't have. Also, some miscellaneous cleanup of outstanding TODO items.
Also moved other mixins around into subfolders to organize the mixins by type.
…_control mixins. Also moved shared code into mixin folders and moved all device type subpackages up to the top level of the drivers subpackage.
Also removed another constant that wasn't really needed.
…trol mixin, the control mixins are now inherited at the family base class level (in most cases)
…vice/TSPDevice/RESTAPIDevice classes into true control mixins (PIControl/TSPControl/RESTAPIControl)
…vice/TSPDevice/RESTAPIDevice classes into true control mixins (PIControl/TSPControl/RESTAPIControl). This commit updates tests and ruff formatting/linting to pass.
…ce/RESTAPIDevice classes into true control mixins (PIControl/TSPControl/RESTAPIControl). Plenty of TODO items remain, but tests and linting are all passing.
…lure() methods into separate functions. Also implemented a super high-level abstract class to enable better type checking of control mixin classes.
…be used to decorate an abstractmethod while still maintaining the checks that abstractmethods perform to prevent instantiation of an object that doesn't implement all abstract methods. Updated the TSOVu driver to be able to be instantiated properly by implementing all required abstract methods.
…creating a mixin class that implements the common system:error PI logic necessary for certain device's expect_esr() implementations
…th a new get_errors() method. All devices are now required to implement a _get_errors() method with the necessary implementation to get the current error code and error messages.
…ger needed due to the added ability to go upwards and downwards when creating an automatic class diagram. Also added back the namespace to the advanced architecture generated class diagrams to make them look nicer.
Added highlighting of the main device driver diagram.
…ing tox runs to avoid issues when poetry needs to be updated
…uses the outputs of the _get_errors() abstract method to compare the expected error code and messages with the actual error code and messages. Also added regex comparison to the verification functions.
…on to provide granular results on failures. This means that if more than one failure is found all failures will be reported, rather than just the first failure.
…'t properly marked as abstract
…nt a shorter timeout
…eally need to show up in the documentation
… abstract property that each device must implement to better enforce all devices to have a type defined
…nit functions from the device driver classes
nfelt14
requested review from
amccann-Tek,
ldantek,
michaelwagoner,
pradhanfortive,
a team and
tekperson
October 28, 2024 17:22
ldantek
reviewed
Oct 28, 2024
…ght in the lawngreen color to make the text easier to read
ldantek
previously approved these changes
Oct 29, 2024
Breaking API Changes
|
ldantek
approved these changes
Oct 30, 2024
Test Results (macos)
|
Test Results (windows)
|
Test Results (ubuntu)
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Proposed changes
This PR massively restructures the internal workings of
tm_devices
. It changes how the device drivers inherit functionality by separating the device mixins from the control mixins, making future device additions easier.The biggest changes for an end-user are:
get_eventlog_status()
was moved to_get_errors()
and is accessed via a publicget_errors()
method.expect_esr()
method now requires an integer input as well as a tuple of error messages.In addition to this, previously deprecated code was removed, since the next update of the package will be v3.0. See the changelog for all the details.
Addresses #317
Types of changes
What types of changes does your code introduce?
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Addresses #<issue_number>