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

Fixes for adrv9371 and adrv9009 #584

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

tagoylo
Copy link
Contributor

@tagoylo tagoylo commented Jul 29, 2024

Description

This PR includes fixes for adrv9371 and adrv9009 as well as their tests.

  • adrv9371 changes includes checking if decimation is supported before setting or getting sampling frequency. It was failing on arria10 since it is not supported there.
  • adrv9009 changes includes update on the obs lo attribute name. Also added new profile (got it from latest osc).

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How has this been tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Tested on hardware setup. arria10+adrv9371 and arria10+adrv9009

Test Configuration:

  • Hardware:
  • OS:

Documentation

If this is a new feature or example please mention or link any documentation. All new hardware interface classes require documentation.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have signed off all commits and they contain "Signed-off by: "
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • 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
  • Any dependent changes have been merged and published in downstream modules

Signed-off-by: Trecia Agoylo <trecia.agoylo@analog.com>
Signed-off-by: Trecia Agoylo <trecia.agoylo@analog.com>
Signed-off-by: Trecia Agoylo <trecia.agoylo@analog.com>
Signed-off-by: Trecia Agoylo <trecia.agoylo@analog.com>
Signed-off-by: Trecia Agoylo <trecia.agoylo@analog.com>
Signed-off-by: Trecia Agoylo <trecia.agoylo@analog.com>
Signed-off-by: Trecia Agoylo <trecia.agoylo@analog.com>
Signed-off-by: Trecia Agoylo <trecia.agoylo@analog.com>
Signed-off-by: Trecia Agoylo <trecia.agoylo@analog.com>
@tagoylo tagoylo marked this pull request as draft August 12, 2024 05:24
@tagoylo tagoylo force-pushed the test-fixes branch 2 times, most recently from d206755 to 2a24252 Compare September 16, 2024 06:02
Signed-off-by: Trecia Agoylo <trecia.agoylo@analog.com>
Signed-off-by: Trecia Agoylo <trecia.agoylo@analog.com>
@tagoylo tagoylo marked this pull request as ready for review September 16, 2024 06:56
@tagoylo
Copy link
Contributor Author

tagoylo commented Sep 16, 2024

@tfcollins PR is ready for review. I updated the emulated test workflow - to run the test without the optional dependency.

Copy link
Collaborator

@tfcollins tfcollins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Primarily just questions on the DEC8/INT8 updates

run: |
pytest -vs --cov=adi --scan-verbose --emu --junitxml="results.xml" -k 'not prod'
pip uninstall -y paramiko
pytest -vs --scan-verbose --emu --junitxml="results.xml" -k 'not prod'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing coverage flag

avail = avail.strip().split(" ")
return val == avail[1]
except KeyError:
return val == avail
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This applies to the other blocks that share this logic.

  1. If sampling_frequency_available does not exist this will generate a strange error. Something like sampling_frequency_available is not a valid key, which won't make any sense. So there needs to be an except catch for that case
  2. The case when it does but only 1 value exists doesn't really make sense or the logic flow is convoluted. If only 1 value exists then it should always return false.

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.

2 participants