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 adistream CLI tool #496

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

Conversation

SaikiranGudla
Copy link
Contributor

@SaikiranGudla SaikiranGudla commented Nov 7, 2023

Add adistream CLI tool to support data generation and streaming for tx devices like DACs.
Update doc to include new tools optional dependency.

Description

The new CLI tool helps in generating various types of waveforms using the Genalyzer APIs and streaming them to the device.

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

  • Test A
  • Test B

Test Configuration:

  • Hardware:
  • OS:

Documentation

Quick start doc has been updated with the dependencies. The help command in the tool gives a detailed description of how to use the tool.

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

from genalyzer import WaveformGen
from pynput import keyboard


Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should add documentation/comments for functions/properties

@SaikiranGudla SaikiranGudla force-pushed the add_adistream_cli_script branch from 9ea49a2 to 8b606e6 Compare November 7, 2023 05:55
.. note::

For the adistream CLI tool to generate and stream data to the device, it's also needed to install the `genalyzer <https://analogdevicesinc.github.io/genalyzer/master/setup.html#windows>`_ and its python bindings.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove the #windows

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.

Can you add a specific doc page for tools. That way users are aware these things exist. We will also need a unit to this as well. See here https://jugmac00.github.io/blog/testing-argparse-applications-the-better-way/

@SaikiranGudla SaikiranGudla force-pushed the add_adistream_cli_script branch from 8b606e6 to 25ebc31 Compare November 13, 2023 07:25
@SaikiranGudla SaikiranGudla force-pushed the add_adistream_cli_script branch from 25ebc31 to 8472ebe Compare January 4, 2024 09:42
Add adistream CLI tool to support data generation
and streaming for tx devices like DACs.
Update doc to include new tools optional
dependency.
Add doc page for tools.

Signed-off-by: SGudla <[email protected]>
@SaikiranGudla SaikiranGudla force-pushed the add_adistream_cli_script branch from 8472ebe to e0e8d1f Compare January 4, 2024 10:54
import argparse

import pytest
from adi.tools.adistream import run_adi_stream
Copy link
Collaborator

Choose a reason for hiding this comment

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

You'll need an import check to see if adi tools was imported. Otherwise this will always break tests when the dependencies don't exist

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, ModuleNotFoundError is occurring when importing Genalyzer. Shall I skip the tests if an import error occurs here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

May I know if any more changes need to be made, @tfcollins?

@SaikiranGudla SaikiranGudla force-pushed the add_adistream_cli_script branch from e899e7d to 9229ce7 Compare January 12, 2024 11:32
@SaikiranGudla SaikiranGudla force-pushed the add_adistream_cli_script branch from 9229ce7 to c5e48a1 Compare March 5, 2024 12:52
@SaikiranGudla SaikiranGudla force-pushed the add_adistream_cli_script branch from c5e48a1 to 2262995 Compare April 23, 2024 12:19
@SaikiranGudla
Copy link
Contributor Author

Change log:
Rename ad578x class name occurrences with ad579x with respect to the driver name change.

@SaikiranGudla SaikiranGudla force-pushed the add_adistream_cli_script branch from 2262995 to acdcc9b Compare April 24, 2024 10:56
@SaikiranGudla
Copy link
Contributor Author

Change log:
Fixed Lint issues (F841).

@SaikiranGudla
Copy link
Contributor Author

Hi @tfcollins,
Is this PR good to be merged?

@tfcollins
Copy link
Collaborator

CI is failing still. That needs to be addressed first

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