From 9965f5d4a27411cb8c9511e0cb867011a39ef06a Mon Sep 17 00:00:00 2001 From: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com> Date: Tue, 15 Jul 2025 09:39:06 -0700 Subject: [PATCH 1/2] Update usage sections, fix some formatting and typos Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com> --- examples/all_types/README.md | 9 ++++++--- examples/hello/README.md | 7 +++++-- examples/nidaqmx/README.md | 8 +++++--- examples/niscope/README.md | 11 +++++++---- examples/performance_checker/README.md | 7 +++++-- examples/simple_graph/README.md | 7 +++++-- 6 files changed, 33 insertions(+), 16 deletions(-) diff --git a/examples/all_types/README.md b/examples/all_types/README.md index 7b56c38..38bc03b 100644 --- a/examples/all_types/README.md +++ b/examples/all_types/README.md @@ -1,10 +1,10 @@ ## All Types Example -This is an example for `nipanel` that demonstrates all supported data types +This is an example for `nipanel` that demonstrates all supported data types. ### Feature -- Demonstrates support for all data types +- Demonstrates all supported data types ### Required Software @@ -12,4 +12,7 @@ This is an example for `nipanel` that demonstrates all supported data types ### Usage -Run `poetry run python examples/all_types/all_types.py` +```pwsh +poetry install --with examples +poetry run python examples/all_types/all_types.py +``` diff --git a/examples/hello/README.md b/examples/hello/README.md index b6d6bd6..f183157 100644 --- a/examples/hello/README.md +++ b/examples/hello/README.md @@ -1,6 +1,6 @@ ## Hello -This is a simple nipanel example that displays a Streamlit app. +This is a simple `nipanel` example that displays a Streamlit app. ### Feature @@ -12,4 +12,7 @@ This is a simple nipanel example that displays a Streamlit app. ### Usage -Run `poetry run python examples/hello/hello.py` \ No newline at end of file +```pwsh +poetry install --with examples +poetry run python examples/hello/hello.py +``` diff --git a/examples/nidaqmx/README.md b/examples/nidaqmx/README.md index 5e80d97..fb9adfa 100644 --- a/examples/nidaqmx/README.md +++ b/examples/nidaqmx/README.md @@ -1,4 +1,4 @@ -Prerequisites +Prerequisites =============== Requires a Physical or Simulated Device : https://github.com/ni/nidaqmx-python/blob/master/README.rst (Getting Started Section) @@ -16,5 +16,7 @@ This is a nipanel example that displays an interactive Streamlit app and updates ### Usage -Run `poetry run examples/nidaqmx/nidaqmx_continuous_analog_input.py` - +```pwsh +poetry install --with examples +poetry run examples/nidaqmx/nidaqmx_continuous_analog_input.py +``` diff --git a/examples/niscope/README.md b/examples/niscope/README.md index 83e8f6e..35b1e47 100644 --- a/examples/niscope/README.md +++ b/examples/niscope/README.md @@ -1,13 +1,14 @@ -Prerequisites +Prerequisites =============== Requires a Physical or Simulated Device. Refer to the [Getting Started Section](https://github.com/ni/nidaqmx-python/blob/master/README.rst) to learn how to create a simulated device. This example uses NI oscilloscopes/digitizers, which have the module numbering pattern _51xx_. One example is NI PXIe-5114. + ## Sample This is a nipanel example that displays an interactive Streamlit app and updates and fetches data from device. ### Feature -Script demonstrates NIScope waveform data getting continuously acquired. +Script demonstrates NIScope waveform data getting continuously acquired. - Supports various data types ### Required Software @@ -16,5 +17,7 @@ Script demonstrates NIScope waveform data getting continuously acquired. ### Usage -Run `poetry run examples/niscope/niscope_ex_fetch_forever.py` - +```pwsh +poetry install --with examples +poetry run examples/niscope/niscope_ex_fetch_forever.py +``` diff --git a/examples/performance_checker/README.md b/examples/performance_checker/README.md index d59a804..fe40401 100644 --- a/examples/performance_checker/README.md +++ b/examples/performance_checker/README.md @@ -1,6 +1,6 @@ # Performance checker Example -This example measures the performance of a stremlit panel with a graph. +This example measures the performance of a streamlit panel with a graph. ## Features @@ -15,4 +15,7 @@ This example measures the performance of a stremlit panel with a graph. ### Usage -Run `poetry run python examples/performance_checker/performance_checker.py` +```pwsh +poetry install --with examples +poetry run python examples/performance_checker/performance_checker.py +``` diff --git a/examples/simple_graph/README.md b/examples/simple_graph/README.md index 6264444..a8ba9a8 100644 --- a/examples/simple_graph/README.md +++ b/examples/simple_graph/README.md @@ -1,6 +1,6 @@ # Simple Graph Example -This example demonstrates using nipanel with Streamlit to display a dynamic sine wave using the `streamlit-echarts` library. +This example demonstrates using `nipanel` with Streamlit to display a dynamic sine wave using the `streamlit-echarts` library. ## Features @@ -15,4 +15,7 @@ This example demonstrates using nipanel with Streamlit to display a dynamic sine ### Usage -Run `poetry run python examples/simple_graph/simple_graph.py` +```pwsh +poetry install --with examples +poetry run python examples/simple_graph/simple_graph.py +``` From d01596610cb9062517a731fd0189aed67a0f80fc Mon Sep 17 00:00:00 2001 From: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com> Date: Tue, 15 Jul 2025 12:01:42 -0700 Subject: [PATCH 2/2] Add niscope as a dependency for the examples Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com> --- poetry.lock | 34 +++++++++++++++++++++++++++++++++- pyproject.toml | 1 + 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/poetry.lock b/poetry.lock index 60f6878..1114bd8 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1375,6 +1375,38 @@ tzlocal = ">=5.0,<6.0" [package.extras] grpc = ["grpcio (>=1.49.0,<2.0)", "protobuf (>=4.21)"] +[[package]] +name = "niscope" +version = "1.4.9" +description = "NI-SCOPE Python API" +optional = false +python-versions = ">=3.9" +files = [ + {file = "niscope-1.4.9-py3-none-any.whl", hash = "sha256:0b03f1e665ef22ba614defc476149500bc6ddf20e64534476d7496b4f58b30c0"}, + {file = "niscope-1.4.9.tar.gz", hash = "sha256:e85493c9d3f707fac1b280352ea2c1cacd71fd733d6faf9a22a05853492fe87a"}, +] + +[package.dependencies] +hightime = ">=0.2.0" +nitclk = "*" + +[package.extras] +grpc = ["grpcio (>=1.59.0,<2.0)", "protobuf (>=4.21.6)"] + +[[package]] +name = "nitclk" +version = "1.4.9" +description = "NI-TClk Python API" +optional = false +python-versions = ">=3.9" +files = [ + {file = "nitclk-1.4.9-py3-none-any.whl", hash = "sha256:fa62a03fd8a820246f0adebb59f95249ad086dd407dab9102204338343833b45"}, + {file = "nitclk-1.4.9.tar.gz", hash = "sha256:86835d4c8f08411433bd7c6dce26a346eef5120e476510bebdbaeb2700582cf5"}, +] + +[package.dependencies] +hightime = ">=0.2.0" + [[package]] name = "nitypes" version = "0.1.0.dev4" @@ -3231,4 +3263,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = ">=3.9,<4.0,!=3.9.7" -content-hash = "4d8fe33d72a4d5a4eab2fed3db3068518a165cac5172632a00ec9f577e404145" +content-hash = "45dc36d0ef51734fbde48be7f49ed705209f3b0d46c827cd0de4115fbf15ce62" diff --git a/pyproject.toml b/pyproject.toml index ba3985c..751929e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,6 +65,7 @@ optional = true [tool.poetry.group.examples.dependencies] streamlit-echarts = ">=0.4.0" nidaqmx = { version = ">=0.8.0", allow-prereleases = true } +niscope = "^1.4.9" [build-system] requires = ["poetry-core>=1.8.0"]