Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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 examples docs lint"
- name: Lint
run: poetry run ni-python-styleguide lint
- name: Mypy static analysis (Linux)
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
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