Skip to content

feat(config): add visa_library option and deprecate standalone - #649

Open
hkumar30 wants to merge 8 commits into
tektronix:mainfrom
hkumar30:feat/visa-library-option
Open

hkumar30 wants to merge 8 commits into
tektronix:mainfrom
hkumar30:feat/visa-library-option

Conversation

@hkumar30

@hkumar30 hkumar30 commented Nov 4, 2026 •

Copy link
Copy Markdown

Proposed changes

Adds a visa_library config option that takes any VISA backend string PyVISA accepts (for example "@py", "@ivi", or the path to a VISA library file), and deprecates standalone. As discussed in the issue, standalone still works but now raises a DeprecationWarning, so it can be removed in v4.0.

  • When both options are set, visa_library takes precedence, both when selecting the VISA library and in the check that rejects USB/GPIB connections with PyVISA-py.
  • The DeviceManager.visa_library setter now stores the value in visa_library and clears standalone, instead of setting standalone = (value == "@py"). Otherwise users who never set standalone would get the warning, and saved configs would keep containing it. Because of this, test_get_config_methods_with_devices now expects visa_library in the saved config instead of standalone: false.
  • visa_library is the last DMConfigOptions field, so existing positional arguments don't shift (griffe reports no breaking changes against main).
  • The PyVISA-py fallback warning and the get_available_devices() error now point to visa_library instead of STANDALONE.
  • The files in tests/samples/ still use standalone: true on purpose, to keep testing the deprecated option.

The deprecation only uses warnings.warn, as asked in the issue. Happy to add a log message too if you'd like it to be more visible.

Addresses #417

Types of changes

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Functionality update (non-breaking change which updates or changes existing functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • CI/CD update (an update to the CI/CD workflows, scripts, and/or configurations)
  • Documentation update (an update to enhance the user experience when reading through the docs)

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

Comment thread src/tm_devices/helpers/functions.py Resolved
Comment thread CHANGELOG.md Resolved
@read-the-docs-community

read-the-docs-community Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

nfelt14
nfelt14 previously approved these changes Nov 4, 2026
@CLAassistant

CLAassistant commented Nov 5, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

nfelt14
nfelt14 previously approved these changes Nov 5, 2026
@hkumar30
hkumar30 deployed to package-build November 5, 2026 17:24 — with GitHub Actions Active
@codecov

codecov Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (eb4969c) to head (0588abf).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #649   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          166       166           
  Lines         4888      4899   +11     
  Branches       440       442    +2     
=========================================
+ Hits          4888      4899   +11     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hkumar30

Copy link
Copy Markdown
Author

Hi @nfelt14. Thanks for the approval. I looked into why the tests are failing.

  • First, it turns out that it is an ongoing issue with nodeenv 1.11.0 as mentioned here: ekalinin/nodeenv#453. The latest Dependabot PR #650 bumps it to 1.12.0, which fixes the nodeenv error in both docs jobs. On #650, doctests then fails on an unrelated link check (tek.com returns 403 for the TekVISA link in README.md), so that may still show up here after a rebase.
  • Second, test-fast (macos) failed only test_ping_address, a ping timing problem. That test passed on #650.

I can rebase after #650 is merged (or you can rerun the macOS job, whichever is preferable).

@nfelt14

nfelt14 commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

Hi @nfelt14. Thanks for the approval. I looked into why the tests are failing.

  • First, it turns out that it is an ongoing issue with nodeenv 1.11.0 as mentioned here: ekalinin/nodeenv#453. The latest Dependabot PR #650 bumps it to 1.12.0, which fixes the nodeenv error in both docs jobs. On #650, doctests then fails on an unrelated link check (tek.com returns 403 for the TekVISA link in README.md), so that may still show up here after a rebase.
  • Second, test-fast (macos) failed only test_ping_address, a ping timing problem. That test passed on #650.

I can rebase after #650 is merged (or you can rerun the macOS job, whichever is preferable).

I will be trying to fix dependency issues this week, thanks for your patience.

@hkumar30
hkumar30 force-pushed the feat/visa-library-option branch from 5e06c15 to 0588abf Compare November 23, 2026 17:16
@hkumar30
hkumar30 deployed to package-build November 23, 2026 18:11 — with GitHub Actions Active
@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Test Results (windows)

path passed subtotal
tests\test_abstract_device_expect_esr.py 1 1
tests\test_afgs.py 2 2
tests\test_alias_dict.py 1 1
tests\test_all_device_drivers.py 112 112
tests\test_alternative_connection_addresses.py 19 19
tests\test_awgs.py 5 5
tests\test_config_parser.py 60 60
tests\test_device_manager.py 19 19
tests\test_devices_legacy_tsp_ieee_cmds.py 3 3
tests\test_extension_mixin.py 1 1
tests\test_generate_waveform.py 7 7
tests\test_helpers.py 94 94
tests\test_ieee_scpi_cmds.py 1 1
tests\test_logging.py 10 10
tests\test_mainframe.py 13 13
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_schema.py 7 7
tests\test_scopes.py 10 10
tests\test_singleton.py 1 1
tests\test_smu.py 4 4
tests\test_ss.py 1 1
tests\test_tm_devices.py 471 471
tests\test_unsupported_device_type.py 1 1
tests\test_verification_functions.py 13 13
TOTAL 873 873

Link to workflow run

@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Test Results (ubuntu)

path passed subtotal
tests/test_abstract_device_expect_esr.py 1 1
tests/test_afgs.py 2 2
tests/test_alias_dict.py 1 1
tests/test_all_device_drivers.py 112 112
tests/test_alternative_connection_addresses.py 19 19
tests/test_awgs.py 5 5
tests/test_config_parser.py 60 60
tests/test_device_manager.py 19 19
tests/test_devices_legacy_tsp_ieee_cmds.py 3 3
tests/test_extension_mixin.py 1 1
tests/test_generate_waveform.py 7 7
tests/test_helpers.py 94 94
tests/test_ieee_scpi_cmds.py 1 1
tests/test_logging.py 10 10
tests/test_mainframe.py 13 13
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_schema.py 7 7
tests/test_scopes.py 10 10
tests/test_singleton.py 1 1
tests/test_smu.py 4 4
tests/test_ss.py 1 1
tests/test_tm_devices.py 471 471
tests/test_unsupported_device_type.py 1 1
tests/test_verification_functions.py 13 13
TOTAL 873 873

Link to workflow run

@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Test Results (macos)

path passed subtotal
tests/test_abstract_device_expect_esr.py 1 1
tests/test_afgs.py 2 2
tests/test_alias_dict.py 1 1
tests/test_all_device_drivers.py 112 112
tests/test_alternative_connection_addresses.py 19 19
tests/test_awgs.py 5 5
tests/test_config_parser.py 60 60
tests/test_device_manager.py 19 19
tests/test_devices_legacy_tsp_ieee_cmds.py 3 3
tests/test_extension_mixin.py 1 1
tests/test_generate_waveform.py 7 7
tests/test_helpers.py 94 94
tests/test_ieee_scpi_cmds.py 1 1
tests/test_logging.py 10 10
tests/test_mainframe.py 13 13
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_schema.py 7 7
tests/test_scopes.py 10 10
tests/test_singleton.py 1 1
tests/test_smu.py 4 4
tests/test_ss.py 1 1
tests/test_tm_devices.py 471 471
tests/test_unsupported_device_type.py 1 1
tests/test_verification_functions.py 13 13
TOTAL 873 873

Link to workflow run

This branch was successfully deployed

1 active deployment
package-build — 0588abfa Deployed Nov 23, 2026 by hkumar30 via package-build / Build package #1995
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.

3 participants