Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
path: .venv
key: nipanel-with-docs-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
- name: Install nipanel (with docs)
run: poetry install -v --only main,docs
run: poetry install -v --extras docs
- name: Generate docs
run: poetry run sphinx-build docs docs/_build -b html -W
- name: Upload docs artifact
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check_nipanel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
path: .venv
key: nipanel-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
- name: Install nipanel
run: poetry install -v --with examples,docs
run: poetry install -v --extras "dev docs examples lint test"
- name: Lint
run: poetry run ni-python-styleguide lint
- name: Mypy static analysis (Linux)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
path: .venv
key: nipanel-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
- name: Install nipanel
run: poetry install -v
run: poetry install -v --extras test
- name: Run unit tests and code coverage
run: poetry run pytest ./tests/unit -v --cov=nipanel --junitxml=test_results/nipanel-${{ matrix.os }}-py${{ matrix.python-version }}.xml
- name: Upload test results
Expand Down
11 changes: 4 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ See [GitHub's official documentation](https://help.github.com/articles/using-pul

# Getting Started

This is the command to generate the files in /src/ni/panels/v1/:
`poetry run python -m grpc_tools.protoc --proto_path=protos --python_out=src/ --grpc_python_out=src/ --mypy_out=src/ --mypy_grpc_out=src/ ni/panels/v1/panel_service.proto ni/panels/v1/panel_types.proto ni/panels/v1/streamlit_panel_configuration.proto`

# Testing

## Simple development loop
Expand All @@ -34,17 +31,17 @@ git fetch
git switch --create users/{username}/{branch-purpose} origin/main

# Install the project dependencies
poetry install --with docs
poetry install --extras docs

# ✍ Make source changes

# Run the analyzers -- see files in .github/workflows for details
poetry run nps lint
poetry run ni-python-styleguide lint
poetry run mypy
poetry run bandit -c pyproject.toml -r src/nipanel

# Apply safe fixes
poetry run nps fix
poetry run ni-python-styleguide fix

# Run the tests
poetry run pytest -v
Expand All @@ -57,7 +54,7 @@ start docs\_build\index.html
## Running examples

1. Run the **PythonPanelService** (not part of this repo, provided seperately)
2. `poetry install --with examples` to get the dependencies needed for the examples
2. `poetry install --extras examples` to get the dependencies needed for the examples
3. Run the examples with these command(s):
- `poetry run python examples/hello/hello.py`
- `poetry run python examples/all_types/all_types.py`
Expand Down
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
proj_config = toml.loads(pyproj_file.read_text())


project = proj_config["tool"]["poetry"]["name"]
project = proj_config["project"]["name"]
company = "National Instruments"
copyright = f"2025-%Y, {company}"
if datetime.datetime.now().year == 2025:
Expand All @@ -34,9 +34,9 @@
# |version| and |release|, also used in various other places throughout the
# built documents.
#
version = proj_config["tool"]["poetry"]["version"]
version = proj_config["project"]["version"]
release = ".".join(version.split(".")[:2])
description = proj_config["tool"]["poetry"]["description"]
description = proj_config["project"]["description"]


htmlhelp_basename = f"{project}doc"
Expand Down
2 changes: 1 addition & 1 deletion examples/all_types/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ This is an example for `nipanel` that demonstrates all supported data types.
### Usage

```pwsh
poetry install --with examples
poetry install --extras examples
poetry run python examples/all_types/all_types.py
```
2 changes: 1 addition & 1 deletion examples/hello/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ This is a simple `nipanel` example that displays a Streamlit app.
### Usage

```pwsh
poetry install --with examples
poetry install --extras examples
poetry run python examples/hello/hello.py
```
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Script demonstrates analog input data getting continuously acquired, and being f
### Usage

```pwsh
poetry install --with examples
poetry install --extras examples
poetry run python examples\nidaqmx\nidaqmx_analog_input_filtering\nidaqmx_analog_input_filtering.py
```

2 changes: 1 addition & 1 deletion examples/nidaqmx/nidaqmx_analog_output_voltage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ This is a nipanel example that displays an interactive Streamlit app and updates
### Usage

```pwsh
poetry install --with examples
poetry install --extras examples
poetry run examples\nidaqmx\nidaqmx_analog_output_voltage\nidaqmx_analog_output_voltage.py
```
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ This is a nipanel example that displays an interactive Streamlit app and updates
### Usage

```pwsh
poetry install --with examples
poetry install --extras examples
poetry run examples\nidaqmx\nidaqmx_continuous_analog_input\nidaqmx_continuous_analog_input.py
```
2 changes: 1 addition & 1 deletion examples/niscope/nicope_ex_fetch_forever/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ Script demonstrates NIScope waveform data getting continuously acquired.
### Usage

```pwsh
poetry install --with examples
poetry install --extras examples
poetry run examples\niscope\niscope_ex_fetch_forever\niscope_ex_fetch_forever.py
```
2 changes: 1 addition & 1 deletion examples/niscope/niscope_binary_acquisition/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ Script demonstrates waveform data getting continuously acquired and being conver
### Usage

```pwsh
poetry install --with examples
poetry install --extras examples
poetry run examples\niscope\niscope_binary_acquisition\niscope_binary_acquisition.py
```
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ Script demonstrates how to configure vertical, horizontal, and triggering proper
### Usage

```pwsh
poetry install --with examples
poetry install --extras examples
poetry run examples\niscope\niscope_configured_acquisition\niscope_configured_acquisition.py
```
2 changes: 1 addition & 1 deletion examples/performance_checker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ This example measures the performance of a streamlit panel with a graph.
### Usage

```pwsh
poetry install --with examples
poetry install --extras examples
poetry run python examples/performance_checker/performance_checker.py
```
2 changes: 1 addition & 1 deletion examples/simple_graph/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ This example demonstrates using `nipanel` with Streamlit to display a dynamic si
### Usage

```pwsh
poetry install --with examples
poetry install --extras examples
poetry run python examples/simple_graph/simple_graph.py
```
Loading
Loading