From 3a03455b2c588a5d23c2d386536120843fb6f231 Mon Sep 17 00:00:00 2001 From: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com> Date: Wed, 7 May 2025 15:50:06 -0500 Subject: [PATCH 1/6] Fix typo in _typing.py docstring Signed-off-by: Joe Friedrichsen --- src/nipanel/_typing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nipanel/_typing.py b/src/nipanel/_typing.py index 877f1ff..eea39ba 100644 --- a/src/nipanel/_typing.py +++ b/src/nipanel/_typing.py @@ -13,7 +13,7 @@ Do not add project-specific types to this submodule. -Many of these symbosl are references to `None` at run time. Clients of this submodule should use +Many of these symbols are references to `None` at run time. Clients of this submodule should use `from __future__ import annotations` to avoid parsing type hints at run time. """ From ca89d38f9df5bea42dfc2d0ac18033af2a2a708a Mon Sep 17 00:00:00 2001 From: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com> Date: Wed, 7 May 2025 17:07:47 -0500 Subject: [PATCH 2/6] Add section describing a local workflow Signed-off-by: Joe Friedrichsen --- CONTRIBUTING.md | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 43ce056..e18dcb1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,4 @@ -# Contributing to nipanel-python +# Contributing to nipanel-python Contributions to nipanel-python are welcome from all! @@ -26,7 +26,26 @@ This is the command to generate the files in /src/ni/pythonpanel/v1/: # Testing -- TODO: include testing steps here. +## Simple development loop + +``` +# Create a new branch +git fetch +git switch --create users/{username}/{branch-purpose} origin/main + +# Install the project dependencies +poetry install --sync + +# ✍ Make source changes + +# Run the analyzers -- see files in .github/workflows for details +poetry run ni-python-styleguide lint +poetry run mypy +poetry run bandit -c pyproject.toml -r src/nipanel + +# Run the tests +poetry run pytest -v +``` # Developer Certificate of Origin (DCO) @@ -59,4 +78,4 @@ This is the command to generate the files in /src/ni/pythonpanel/v1/: (taken from [developercertificate.org](https://developercertificate.org/)) See [LICENSE](https://github.com/ni//blob/main/LICENSE) -for details about how \ is licensed. \ No newline at end of file +for details about how \ is licensed. From c3cf8ccf8851140b8646a31b0e3006bcf48e5fad Mon Sep 17 00:00:00 2001 From: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com> Date: Thu, 8 May 2025 11:14:34 -0500 Subject: [PATCH 3/6] Use the alias when invoking ni-python-styleguide Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com> --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e18dcb1..9d3c915 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -39,7 +39,7 @@ poetry install --sync # ✍ Make source changes # Run the analyzers -- see files in .github/workflows for details -poetry run ni-python-styleguide lint +poetry run nps lint poetry run mypy poetry run bandit -c pyproject.toml -r src/nipanel From 23ac5fe8233b0181f366ea2adfe5aeff2c3ba895 Mon Sep 17 00:00:00 2001 From: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com> Date: Thu, 8 May 2025 12:45:43 -0500 Subject: [PATCH 4/6] Remove the --sync option Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com> --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9d3c915..8d6b090 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -34,7 +34,7 @@ git fetch git switch --create users/{username}/{branch-purpose} origin/main # Install the project dependencies -poetry install --sync +poetry install # ✍ Make source changes From 77181ebd1bd1b6efc9339c7de582b1b7f33ffe6c Mon Sep 17 00:00:00 2001 From: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com> Date: Thu, 8 May 2025 13:38:16 -0500 Subject: [PATCH 5/6] Add step for building the documentation bundle Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com> --- CONTRIBUTING.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8d6b090..25621eb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -34,7 +34,7 @@ git fetch git switch --create users/{username}/{branch-purpose} origin/main # Install the project dependencies -poetry install +poetry install --with docs # ✍ Make source changes @@ -45,6 +45,10 @@ poetry run bandit -c pyproject.toml -r src/nipanel # Run the tests poetry run pytest -v + +# Build and inspect the documentation +poetry run sphinx-build docs docs/_build --builder html --fail-on-warning +start docs\_build\index.html ``` # Developer Certificate of Origin (DCO) From 80bc26f535af92974037b47579b75a466392f11e Mon Sep 17 00:00:00 2001 From: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com> Date: Fri, 9 May 2025 10:56:31 -0500 Subject: [PATCH 6/6] Remove --keep-going from check_docs.yml because it is always enabled Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com> --- .github/workflows/check_docs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check_docs.yml b/.github/workflows/check_docs.yml index d0637e3..513cf59 100644 --- a/.github/workflows/check_docs.yml +++ b/.github/workflows/check_docs.yml @@ -34,9 +34,9 @@ jobs: - name: Install nipanel (with docs) run: poetry install -v --only main,docs - name: Generate docs - run: poetry run sphinx-build docs docs/_build -b html -W --keep-going + run: poetry run sphinx-build docs docs/_build -b html -W - name: Upload docs artifact uses: actions/upload-artifact@v4 with: name: nipanel-docs - path: docs/_build/ \ No newline at end of file + path: docs/_build/