Skip to content
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

Add screen capture functionality for TekScope device driver family #342

Merged
merged 5 commits into from
Oct 31, 2024

Conversation

nfelt14
Copy link
Collaborator

@nfelt14 nfelt14 commented Oct 30, 2024

Proposed changes

feat: Added a screen capture mixin and implemented the functionality for the TekScope family of device drivers

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply

  • New feature (non-breaking change which adds functionality)

Checklist

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.

  • I have followed the guidelines in the CONTRIBUTING document
  • I have signed the CLA
  • I have checked to ensure there aren't other open Pull Requests for the same update/change
  • I have created (or updated) an Issue to track the status of this update/change and updated the link in this PR description (see above in the Proposed changes section) using the wording Addresses #<issue_number>
  • I have performed a self-review of my code
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • Basic linting passes locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have added necessary documentation (if appropriate)
  • I have updated the Changelog with a brief description of my changes

@nfelt14 nfelt14 requested review from a team as code owners October 30, 2024 23:41
@nfelt14 nfelt14 requested a review from amccann-Tek October 30, 2024 23:42
CHANGELOG.md Show resolved Hide resolved
Copy link

codecov bot commented Oct 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (dd63403) to head (f23bf24).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #342   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          159       160    +1     
  Lines         4489      4547   +58     
  Branches       784       799   +15     
=========================================
+ Hits          4489      4547   +58     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

…y and on TekScope.

Also added an example to the basic_usage.md file.
michaelwagoner
michaelwagoner previously approved these changes Oct 31, 2024
ldantek
ldantek previously approved these changes Oct 31, 2024
@nfelt14 nfelt14 enabled auto-merge (squash) October 31, 2024 20:17
@nfelt14 nfelt14 disabled auto-merge October 31, 2024 20:17
@amccann-Tek
Copy link

Couple questions:
What are your thoughts on not requiring a file name and just using the standard date time format?
And
Assuming we can trigger and take multiple events a second, are we able to increment or handle the case where there might be a duplicate file name collision?

@nfelt14
Copy link
Collaborator Author

nfelt14 commented Oct 31, 2024

Couple questions: What are your thoughts on not requiring a file name and just using the standard date time format? And Assuming we can trigger and take multiple events a second, are we able to increment or handle the case where there might be a duplicate file name collision?

My thoughts would be to let the user decide if they want the filename to be datetime or not, then tm_devices doesn't need to worry about name collisions, since that is out of its control.

@amccann-Tek
Copy link

Couple questions: What are your thoughts on not requiring a file name and just using the standard date time format? And Assuming we can trigger and take multiple events a second, are we able to increment or handle the case where there might be a duplicate file name collision?

My thoughts would be to let the user decide if they want the filename to be datetime or not, then tm_devices doesn't need to worry about name collisions, since that is out of its control.

For that first part I meant more along the lines of allowing
save_screenshot() to be valid, and default output would be date_time naming.

@nfelt14
Copy link
Collaborator Author

nfelt14 commented Oct 31, 2024

Couple questions: What are your thoughts on not requiring a file name and just using the standard date time format? And Assuming we can trigger and take multiple events a second, are we able to increment or handle the case where there might be a duplicate file name collision?

My thoughts would be to let the user decide if they want the filename to be datetime or not, then tm_devices doesn't need to worry about name collisions, since that is out of its control.

For that first part I meant more along the lines of allowing
save_screenshot() to be valid, and default output would be date_time naming.

I could add that in.

…t will now default to a timestamped filename
amccann-Tek
amccann-Tek previously approved these changes Oct 31, 2024
examples/scopes/tekscope/save_screenshot.py Outdated Show resolved Hide resolved
@tektronix tektronix deleted a comment from amccann-Tek Oct 31, 2024
Copy link

github-actions bot commented Oct 31, 2024

Test Results (ubuntu)

path passed subtotal
tests/test_afgs.py 2 2
tests/test_alias_dict.py 1 1
tests/test_all_device_drivers.py 100 100
tests/test_alternative_connection_addresses.py 19 19
tests/test_awgs.py 4 4
tests/test_config_parser.py 39 39
tests/test_device_manager.py 17 17
tests/test_devices_legacy_tsp_ieee_cmds.py 3 3
tests/test_extension_mixin.py 1 1
tests/test_generate_waveform.py 6 6
tests/test_helpers.py 73 73
tests/test_ieee_scpi_cmds.py 1 1
tests/test_margin_testers.py 5 5
tests/test_pi_device.py 1 1
tests/test_psu.py 1 1
tests/test_rest_api_device.py 10 10
tests/test_scopes.py 9 9
tests/test_singleton.py 1 1
tests/test_smu.py 4 4
tests/test_ss.py 1 1
tests/test_tm_devices.py 425 425
tests/test_unsupported_device_type.py 1 1
tests/test_verification_functions.py 6 6
TOTAL 730 730

Link to workflow run

Copy link

github-actions bot commented Oct 31, 2024

Test Results (windows)

path passed subtotal
tests\test_afgs.py 2 2
tests\test_alias_dict.py 1 1
tests\test_all_device_drivers.py 100 100
tests\test_alternative_connection_addresses.py 19 19
tests\test_awgs.py 4 4
tests\test_config_parser.py 39 39
tests\test_device_manager.py 17 17
tests\test_devices_legacy_tsp_ieee_cmds.py 3 3
tests\test_extension_mixin.py 1 1
tests\test_generate_waveform.py 6 6
tests\test_helpers.py 73 73
tests\test_ieee_scpi_cmds.py 1 1
tests\test_margin_testers.py 5 5
tests\test_pi_device.py 1 1
tests\test_psu.py 1 1
tests\test_rest_api_device.py 10 10
tests\test_scopes.py 9 9
tests\test_singleton.py 1 1
tests\test_smu.py 4 4
tests\test_ss.py 1 1
tests\test_tm_devices.py 425 425
tests\test_unsupported_device_type.py 1 1
tests\test_verification_functions.py 6 6
TOTAL 730 730

Link to workflow run

Copy link

github-actions bot commented Oct 31, 2024

Test Results (macos)

path passed subtotal
tests/test_afgs.py 2 2
tests/test_alias_dict.py 1 1
tests/test_all_device_drivers.py 100 100
tests/test_alternative_connection_addresses.py 19 19
tests/test_awgs.py 4 4
tests/test_config_parser.py 39 39
tests/test_device_manager.py 17 17
tests/test_devices_legacy_tsp_ieee_cmds.py 3 3
tests/test_extension_mixin.py 1 1
tests/test_generate_waveform.py 6 6
tests/test_helpers.py 73 73
tests/test_ieee_scpi_cmds.py 1 1
tests/test_margin_testers.py 5 5
tests/test_pi_device.py 1 1
tests/test_psu.py 1 1
tests/test_rest_api_device.py 10 10
tests/test_scopes.py 9 9
tests/test_singleton.py 1 1
tests/test_smu.py 4 4
tests/test_ss.py 1 1
tests/test_tm_devices.py 425 425
tests/test_unsupported_device_type.py 1 1
tests/test_verification_functions.py 6 6
TOTAL 730 730

Link to workflow run

@nfelt14 nfelt14 merged commit 0f9c4c1 into tektronix:main Oct 31, 2024
71 checks passed
@nfelt14 nfelt14 requested a review from a team November 4, 2024 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants