Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor the internal package structure and change how driver classes…
… inherit functionality (#333) * ci: Update testing/linting to use official Python 3.13 versions * refactor: Converted the SignalGenerator class into a mixin class called TekAFGAWG. Also removed the previously deprecated TekScopeSW alias. * refactor: Remove previously deprecated write_buffers() method * refactor: Refactor the TekScope inheritance to remove methods from the TekScopePC driver that it shouldn't have. Also, some miscellaneous cleanup of outstanding TODO items. * refactor: Moved the REST API class into a mixin. Also moved other mixins around into subfolders to organize the mixins by type. * refactor: Moved the Device, PIDevice, and TSPDevice class into device_control mixins. Also moved shared code into mixin folders and moved all device type subpackages up to the top level of the drivers subpackage. * refactor: Remove deprecated `DEVICE_DRIVER_MODEL_MAPPING` constant. Also removed another constant that wasn't really needed. * refactor: Updated most device types to no longer inherit from the control mixin, the control mixins are now inherited at the family base class level (in most cases) * docs: Updated docs with the new references to the refactored object locations * refactor: Checkpoint commit during the process of converting the PIDevice/TSPDevice/RESTAPIDevice classes into true control mixins (PIControl/TSPControl/RESTAPIControl) * refactor: Checkpoint commit during the process of converting the PIDevice/TSPDevice/RESTAPIDevice classes into true control mixins (PIControl/TSPControl/RESTAPIControl). This commit updates tests and ruff formatting/linting to pass. * refactor: First revision completed of converting the PIDevice/TSPDevice/RESTAPIDevice classes into true control mixins (PIControl/TSPControl/RESTAPIControl). Plenty of TODO items remain, but tests and linting are all passing. * refactor: Converted the verify_values(), raise_error(), and raise_failure() methods into separate functions. Also implemented a super high-level abstract class to enable better type checking of control mixin classes. * refactor: Updated the ReadOnlyCachedProperty decorator to be able to 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. * refactor: Simplified the sharing of common method implementations by creating a mixin class that implements the common system:error PI logic necessary for certain device's expect_esr() implementations * refactor: Removed the get_eventlog_status() method and replaced it with 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. * refactor: Removed the device_type_classes.py file since it was no longer 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. * docs: Added more detail to the architecture document page. Added highlighting of the main device driver diagram. * test: Fix test for DeviceTypes enum that verifies all device types are represented * ci: Use python -m poetry when installing the package dependencies during tox runs to avoid issues when poetry needs to be updated * refactor: Checkpoint commit during the refactor of the expect_esr() method * refactor: Checkpoint commit during the refactor of the expect_esr() method * refactor: Converted the expect_esr() method into a final method that 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. * test: Refactored the test for proper driver inheritance and abstraction 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. * docs: Update inheritance diagrams and fix an abstract class that wasn't properly marked as abstract * fix: Updated the hostname lookup to use concurrent.futures to implement a shorter timeout * refactor: Update TODO comments and remove an unneeded dependency * refactor: Made a handful of the new mixins private since they don't really need to show up in the documentation * refactor: Converted the private class constant `_DEVICE_TYPE` into an abstract property that each device must implement to better enforce all devices to have a type defined * refactor: checkpoint commit in the process of removing the unneeded init functions from the device driver classes * docs: Update the two contributing guides based on the new folder structure * docs: Update signal_generators.md to include links to the API documentation when necessary * docs: Update custom template with newer code to enable rendering classes that make use of multiple inheritance more accurately * refactor: Re-generated the commands subpackage to use the new class structure that works better with the documentation * docs: Update the changelog * refactor: Fixes after pulling latest main branch * chore: Update development dependencies * chore: Update development dependencies * chore: Fixes from pull request review * chore: Fixes from pull request review * chore: Removed some unnecessary init methods * chore(python-deps): Remove safety-schemas pinned version since the broken version was yanked from PyPI * docs: Add macro to docs for converting github flavored markdown alerts to admonitions * docs: Made breaking change callout in changelog bold and italics * docs: Update changelog * docs: Update changelog * docs: Switch to lawngreen for the inheritance tree color * refactor: Update code and comments after reviewing pull request * ci: Update testing dependency to remove vulnerability * fix: Fix example to use proper SCPI syntax * docs: Change the note by the device inheritance tree to simply highlight in the lawngreen color to make the text easier to read * docs: Fix changelog after merge conflicts
- Loading branch information