Skip to content

Commit 7ed53fa

Browse files
mikeprosserniMike Prosser
andauthored
Update to Poetry 2.1.4 (#142)
* update to poetry 2.1.4 * update poetry install commands * CI needs to install lint deps * CI needs to install dev deps * CI needs to install test deps * Other CI also needs to install test deps * remove codegen deps --------- Co-authored-by: Mike Prosser <[email protected]>
1 parent 2e3ec2a commit 7ed53fa

File tree

17 files changed

+501
-405
lines changed

17 files changed

+501
-405
lines changed

.github/workflows/check_docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
path: .venv
2525
key: nipanel-with-docs-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
2626
- name: Install nipanel (with docs)
27-
run: poetry install -v --only main,docs
27+
run: poetry install -v --extras docs
2828
- name: Generate docs
2929
run: poetry run sphinx-build docs docs/_build -b html -W
3030
- name: Upload docs artifact

.github/workflows/check_nipanel.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
path: .venv
2525
key: nipanel-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
2626
- name: Install nipanel
27-
run: poetry install -v --with examples,docs
27+
run: poetry install -v --extras "dev docs examples lint test"
2828
- name: Lint
2929
run: poetry run ni-python-styleguide lint
3030
- name: Mypy static analysis (Linux)

.github/workflows/run_unit_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
path: .venv
3232
key: nipanel-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
3333
- name: Install nipanel
34-
run: poetry install -v
34+
run: poetry install -v --extras test
3535
- name: Run unit tests and code coverage
3636
run: poetry run pytest ./tests/unit -v --cov=nipanel --junitxml=test_results/nipanel-${{ matrix.os }}-py${{ matrix.python-version }}.xml
3737
- name: Upload test results

CONTRIBUTING.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ See [GitHub's official documentation](https://help.github.com/articles/using-pul
2121

2222
# Getting Started
2323

24-
This is the command to generate the files in /src/ni/panels/v1/:
25-
`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`
26-
2724
# Testing
2825

2926
## Simple development loop
@@ -34,17 +31,17 @@ git fetch
3431
git switch --create users/{username}/{branch-purpose} origin/main
3532
3633
# Install the project dependencies
37-
poetry install --with docs
34+
poetry install --extras docs
3835
3936
# ✍ Make source changes
4037
4138
# Run the analyzers -- see files in .github/workflows for details
42-
poetry run nps lint
39+
poetry run ni-python-styleguide lint
4340
poetry run mypy
4441
poetry run bandit -c pyproject.toml -r src/nipanel
4542
4643
# Apply safe fixes
47-
poetry run nps fix
44+
poetry run ni-python-styleguide fix
4845
4946
# Run the tests
5047
poetry run pytest -v
@@ -57,7 +54,7 @@ start docs\_build\index.html
5754
## Running examples
5855

5956
1. Run the **PythonPanelService** (not part of this repo, provided seperately)
60-
2. `poetry install --with examples` to get the dependencies needed for the examples
57+
2. `poetry install --extras examples` to get the dependencies needed for the examples
6158
3. Run the examples with these command(s):
6259
- `poetry run python examples/hello/hello.py`
6360
- `poetry run python examples/all_types/all_types.py`

docs/conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
proj_config = toml.loads(pyproj_file.read_text())
2424

2525

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

4141

4242
htmlhelp_basename = f"{project}doc"

examples/all_types/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ This is an example for `nipanel` that demonstrates all supported data types.
1313
### Usage
1414

1515
```pwsh
16-
poetry install --with examples
16+
poetry install --extras examples
1717
poetry run python examples/all_types/all_types.py
1818
```

examples/hello/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ This is a simple `nipanel` example that displays a Streamlit app.
1313
### Usage
1414

1515
```pwsh
16-
poetry install --with examples
16+
poetry install --extras examples
1717
poetry run python examples/hello/hello.py
1818
```

examples/nidaqmx/nidaqmx_analog_input_filtering/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Script demonstrates analog input data getting continuously acquired, and being f
1717
### Usage
1818

1919
```pwsh
20-
poetry install --with examples
20+
poetry install --extras examples
2121
poetry run python examples\nidaqmx\nidaqmx_analog_input_filtering\nidaqmx_analog_input_filtering.py
2222
```
2323

examples/nidaqmx/nidaqmx_analog_output_voltage/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ This is a nipanel example that displays an interactive Streamlit app and updates
1717
### Usage
1818

1919
```pwsh
20-
poetry install --with examples
20+
poetry install --extras examples
2121
poetry run examples\nidaqmx\nidaqmx_analog_output_voltage\nidaqmx_analog_output_voltage.py
2222
```

examples/nidaqmx/nidaqmx_continuous_analog_input/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ This is a nipanel example that displays an interactive Streamlit app and updates
1717
### Usage
1818

1919
```pwsh
20-
poetry install --with examples
20+
poetry install --extras examples
2121
poetry run examples\nidaqmx\nidaqmx_continuous_analog_input\nidaqmx_continuous_analog_input.py
2222
```

0 commit comments

Comments
 (0)