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

Fix #5007 Handle version str with extra info #5008

Merged
merged 6 commits into from
Feb 14, 2023

Conversation

jenshnielsen
Copy link
Collaborator

@jenshnielsen jenshnielsen commented Feb 13, 2023

Packaging 22 dropped LegacyVersion. We mostly handled this by converting any letters in the version str to a number using ord. However, the version str for keysight also contained extra info and looks something like this "A.02.17-02.40-02.17-00.52-04-01"

From packaging 22 and upwards this is an error. We fix that by splitting on - and only using the first part. The converter is only used for Keysight versions so adding it there seems safe.

This was not caught in the Keysight 34xxx driver tests since the test only runs for a simulated instrument that has the dig option marked installed and this path in the code is only taken if the dig option is not present in the options str.

Extend the tests for the converter to

  • include this type of version field
  • Ensure what comes out of the converter can be parsed by packaing.
  • Add changelog

fixes #5007

@codecov
Copy link

codecov bot commented Feb 13, 2023

Codecov Report

Merging #5008 (a878fef) into master (238bbee) will decrease coverage by 0.04%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #5008      +/-   ##
==========================================
- Coverage   67.21%   67.18%   -0.04%     
==========================================
  Files         356      356              
  Lines       29718    29719       +1     
==========================================
- Hits        19976    19967       -9     
- Misses       9742     9752      +10     

qcodes/utils/installation_info.py Outdated Show resolved Hide resolved
@jenshnielsen jenshnielsen added this pull request to the merge queue Feb 14, 2023
Merged via the queue into microsoft:master with commit 2720dce Feb 14, 2023
@jenshnielsen jenshnielsen deleted the fix_5007 branch February 14, 2023 07:56
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.

Parsing version string error with Keysight_34465A
2 participants