Skip to content

Commit

Permalink
Move adiplot to be an actual CLI tool
Browse files Browse the repository at this point in the history
Signed-off-by: Travis F. Collins <[email protected]>
  • Loading branch information
tfcollins committed Oct 27, 2023
1 parent 7c3d411 commit 2525508
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
include LICENSE
include README.md
include adi/*
include adi/tools/*

exclude setup.cfg

Expand Down
5 changes: 5 additions & 0 deletions adi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,10 @@
except ImportError:
pass

try:
from adi.tools.adiplot import run_adi_plot
except ImportError:
pass

__version__ = "0.0.17"
name = "Analog Devices Hardware Interfaces"
Empty file added adi/tools/__init__.py
Empty file.
3 changes: 2 additions & 1 deletion examples/adiplot.py → adi/tools/adiplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,8 @@ def animation(self):
self.run_source = False


if __name__ == "__main__":
# if __name__ == "__main__":
def run_adi_plot():
parser = argparse.ArgumentParser(description="ADI fast plotting app")
parser.add_argument(
"class", help="pyadi class name to use as plot source", action="store"
Expand Down
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,18 @@ namespaces = true
jesd = [
"paramiko"
]
tools = [
"pyqtgraph", "matplotlib", "PyQt5", "scipy"
]

[project.urls]
homepage = "https://analogdevicesinc.github.io/pyadi-iio/"
documentation = "https://analogdevicesinc.github.io/pyadi-iio/"
repository = "https://github/analogdevicesinc/pyadi-iio"

[project.gui-scripts]
adiplot = "adi.tools.adiplot:run_adi_plot"

[tool.isort]
multi_line_output=3
include_trailing_comma="True"
Expand Down

0 comments on commit 2525508

Please sign in to comment.