From 028218cdd311f5f81702575056fefa4b6ecc8507 Mon Sep 17 00:00:00 2001 From: mshafer-NI Date: Fri, 17 May 2024 16:00:53 -0500 Subject: [PATCH 01/19] add a pip install and lint to the PR build to validate install time deps without the lock --- .github/workflows/PR.yml | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/PR.yml b/.github/workflows/PR.yml index 1d796b1..0c2813f 100644 --- a/.github/workflows/PR.yml +++ b/.github/workflows/PR.yml @@ -43,13 +43,25 @@ jobs: uses: ni/python-actions/setup-python@9768589f3e50672173dad75a6fc181e4a85d33fa # v0.7.0 with: python-version: ${{ matrix.python-version }} - - name: Set up Poetry - uses: ni/python-actions/setup-poetry@9768589f3e50672173dad75a6fc181e4a85d33fa # v0.7.0 - - name: Cache virtualenv - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 + + - name: Create a venv + run: python -m venv ~/venv/.cache + - name: Install the package + run: ~/venv/.cache/bin/pip install . + - name: Check that it runs + run: ~/venv/.cache/bin/nps lint + + - uses: Gr1N/setup-poetry@v8 + with: + poetry-version: ${{ env.POETRY_VERSION }} + - uses: actions/cache@v4 + with: + path: ~/.cache/pypoetry/virtualenvs + key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }} + - uses: actions/cache@v2 with: - path: .venv - key: nps-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }} + path: ~/venv/.cache + key: ${{ runner.os }}-venv-${{ hashFiles('poetry.lock') }} - name: Install the Package run: poetry install -v - name: Run tests From 35483edb74f0b2b087ebc640234ca8ebf10a0056 Mon Sep 17 00:00:00 2001 From: mshafer-NI <23644905+mshafer-NI@users.noreply.github.com> Date: Tue, 9 Dec 2025 14:01:06 -0600 Subject: [PATCH 02/19] reset to main --- .github/workflows/PR.yml | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/.github/workflows/PR.yml b/.github/workflows/PR.yml index 0c2813f..1d796b1 100644 --- a/.github/workflows/PR.yml +++ b/.github/workflows/PR.yml @@ -43,25 +43,13 @@ jobs: uses: ni/python-actions/setup-python@9768589f3e50672173dad75a6fc181e4a85d33fa # v0.7.0 with: python-version: ${{ matrix.python-version }} - - - name: Create a venv - run: python -m venv ~/venv/.cache - - name: Install the package - run: ~/venv/.cache/bin/pip install . - - name: Check that it runs - run: ~/venv/.cache/bin/nps lint - - - uses: Gr1N/setup-poetry@v8 - with: - poetry-version: ${{ env.POETRY_VERSION }} - - uses: actions/cache@v4 - with: - path: ~/.cache/pypoetry/virtualenvs - key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }} - - uses: actions/cache@v2 + - name: Set up Poetry + uses: ni/python-actions/setup-poetry@9768589f3e50672173dad75a6fc181e4a85d33fa # v0.7.0 + - name: Cache virtualenv + uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 with: - path: ~/venv/.cache - key: ${{ runner.os }}-venv-${{ hashFiles('poetry.lock') }} + path: .venv + key: nps-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }} - name: Install the Package run: poetry install -v - name: Run tests From ffaedddbe6eb75085e63a1da9c5b6ba56fb60606 Mon Sep 17 00:00:00 2001 From: mshafer-NI <23644905+mshafer-NI@users.noreply.github.com> Date: Tue, 9 Dec 2025 14:04:59 -0600 Subject: [PATCH 03/19] re-add installing package non-editable and then linting ourselves --- .github/workflows/PR.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/PR.yml b/.github/workflows/PR.yml index 1d796b1..a9841d5 100644 --- a/.github/workflows/PR.yml +++ b/.github/workflows/PR.yml @@ -54,3 +54,12 @@ jobs: run: poetry install -v - name: Run tests run: poetry run pytest -v + - name: Install package into separate venv + run: | + python3 -m venv test_venv + source test_venv/bin/activate || test_venv\Scripts\activate + pip install . + - name: Lint our own pakage + run: | + source test_venv/bin/activate || test_venv\Scripts\activate + nps lint . From 43bd7996e68756256f1b3c1b4175940e00341305 Mon Sep 17 00:00:00 2001 From: mshafer-NI <23644905+mshafer-NI@users.noreply.github.com> Date: Tue, 9 Dec 2025 14:09:48 -0600 Subject: [PATCH 04/19] try this syntax --- .github/workflows/PR.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/PR.yml b/.github/workflows/PR.yml index a9841d5..67889b4 100644 --- a/.github/workflows/PR.yml +++ b/.github/workflows/PR.yml @@ -57,9 +57,9 @@ jobs: - name: Install package into separate venv run: | python3 -m venv test_venv - source test_venv/bin/activate || test_venv\Scripts\activate + . test_venv/bin/activate || call test_venv\Scripts\activate pip install . - name: Lint our own pakage run: | - source test_venv/bin/activate || test_venv\Scripts\activate + . test_venv/bin/activate || call test_venv\Scripts\activate nps lint . From a69e1102dac44128af65938ccc8e9f0098d12d41 Mon Sep 17 00:00:00 2001 From: mshafer-NI <23644905+mshafer-NI@users.noreply.github.com> Date: Tue, 9 Dec 2025 14:12:55 -0600 Subject: [PATCH 05/19] explicitly run this step in Git bash --- .github/workflows/PR.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/PR.yml b/.github/workflows/PR.yml index 67889b4..3008ca7 100644 --- a/.github/workflows/PR.yml +++ b/.github/workflows/PR.yml @@ -55,11 +55,13 @@ jobs: - name: Run tests run: poetry run pytest -v - name: Install package into separate venv + shell: bash run: | python3 -m venv test_venv . test_venv/bin/activate || call test_venv\Scripts\activate pip install . - name: Lint our own pakage + shell: bash run: | . test_venv/bin/activate || call test_venv\Scripts\activate nps lint . From 0713e44181626c2bed7d961dc32d5b8e4c0efbe6 Mon Sep 17 00:00:00 2001 From: mshafer-NI <23644905+mshafer-NI@users.noreply.github.com> Date: Tue, 9 Dec 2025 14:17:35 -0600 Subject: [PATCH 06/19] try source --- .github/workflows/PR.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/PR.yml b/.github/workflows/PR.yml index 3008ca7..ce0ea9f 100644 --- a/.github/workflows/PR.yml +++ b/.github/workflows/PR.yml @@ -58,10 +58,10 @@ jobs: shell: bash run: | python3 -m venv test_venv - . test_venv/bin/activate || call test_venv\Scripts\activate + source test_venv/bin/activate || call test_venv\Scripts\activate pip install . - name: Lint our own pakage shell: bash run: | - . test_venv/bin/activate || call test_venv\Scripts\activate + source test_venv/bin/activate || call test_venv\Scripts\activate nps lint . From 2de476dc9ba42b0f87dd96397e369c311f97a823 Mon Sep 17 00:00:00 2001 From: mshafer-NI <23644905+mshafer-NI@users.noreply.github.com> Date: Tue, 9 Dec 2025 14:20:01 -0600 Subject: [PATCH 07/19] ok, let's debug --- .github/workflows/PR.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/PR.yml b/.github/workflows/PR.yml index ce0ea9f..d66623a 100644 --- a/.github/workflows/PR.yml +++ b/.github/workflows/PR.yml @@ -33,8 +33,13 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-latest, windows-latest, ubuntu-latest] - python-version: [3.9, '3.10', 3.11, 3.12, 3.13, 3.14, 3.14t] + os: + - ubuntu-latest + python-version: [ + # 3.9, '3.10', 3.11, 3.12, 3.13, + 3.14, + # 3.14t + ] steps: - name: Check out repo uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 @@ -58,6 +63,7 @@ jobs: shell: bash run: | python3 -m venv test_venv + find -type f test_venv source test_venv/bin/activate || call test_venv\Scripts\activate pip install . - name: Lint our own pakage From 2ab98208a1ee55103b45a9c3eba43d28f857e833 Mon Sep 17 00:00:00 2001 From: mshafer-NI <23644905+mshafer-NI@users.noreply.github.com> Date: Tue, 9 Dec 2025 14:33:53 -0600 Subject: [PATCH 08/19] use a var --- .github/workflows/PR.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/PR.yml b/.github/workflows/PR.yml index d66623a..9cfb120 100644 --- a/.github/workflows/PR.yml +++ b/.github/workflows/PR.yml @@ -62,12 +62,16 @@ jobs: - name: Install package into separate venv shell: bash run: | - python3 -m venv test_venv - find -type f test_venv - source test_venv/bin/activate || call test_venv\Scripts\activate - pip install . + venv_dir="$RUNNER_TEMP/dog_food_venv" + python3 -m venv "${venv_dir}" + if [[ "$RUNNER_OS" == "Windows" ]]; then + binary_folder_name="Scripts" + else + binary_folder_name="bin" + fi + echo "DOG_FOOD_VENV_BIN=${venv_dir}/${binary_folder_name}" >> "$GITHUB_ENV" + ${DOG_FOOD_VENV_BIN}/pip install . - name: Lint our own pakage shell: bash run: | - source test_venv/bin/activate || call test_venv\Scripts\activate - nps lint . + ${DOG_FOOD_VENV_BIN}/nps lint . From cc425dfaf47f49c714309c968b57f09bbb106315 Mon Sep 17 00:00:00 2001 From: mshafer-NI <23644905+mshafer-NI@users.noreply.github.com> Date: Tue, 9 Dec 2025 14:36:25 -0600 Subject: [PATCH 09/19] fix spelling --- .github/workflows/PR.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/PR.yml b/.github/workflows/PR.yml index 9cfb120..aad3d57 100644 --- a/.github/workflows/PR.yml +++ b/.github/workflows/PR.yml @@ -71,7 +71,7 @@ jobs: fi echo "DOG_FOOD_VENV_BIN=${venv_dir}/${binary_folder_name}" >> "$GITHUB_ENV" ${DOG_FOOD_VENV_BIN}/pip install . - - name: Lint our own pakage + - name: Lint our own package shell: bash run: | ${DOG_FOOD_VENV_BIN}/nps lint . From a6efaa1266511aefeb67aeb8d3ce583152276f48 Mon Sep 17 00:00:00 2001 From: mshafer-NI <23644905+mshafer-NI@users.noreply.github.com> Date: Tue, 9 Dec 2025 14:36:36 -0600 Subject: [PATCH 10/19] set it in this script too --- .github/workflows/PR.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/PR.yml b/.github/workflows/PR.yml index aad3d57..680a55a 100644 --- a/.github/workflows/PR.yml +++ b/.github/workflows/PR.yml @@ -69,6 +69,7 @@ jobs: else binary_folder_name="bin" fi + DOG_FOOD_VENV_BIN="${venv_dir}/${binary_folder_name}" echo "DOG_FOOD_VENV_BIN=${venv_dir}/${binary_folder_name}" >> "$GITHUB_ENV" ${DOG_FOOD_VENV_BIN}/pip install . - name: Lint our own package From f5056165f587083fdf0df4be79370b1cd52d606b Mon Sep 17 00:00:00 2001 From: mshafer-NI <23644905+mshafer-NI@users.noreply.github.com> Date: Tue, 9 Dec 2025 14:43:56 -0600 Subject: [PATCH 11/19] fix black syntax --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 6ee4937..b38dc52 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,6 +60,7 @@ nps = 'ni_python_styleguide._cli:main' [tool.black] +extend-exclude = ".*__snapshots/.*\\.py" line-length = 100 From 49ac47028380fb0482a3ed0e779a2e3df72c50bd Mon Sep 17 00:00:00 2001 From: mshafer-NI <23644905+mshafer-NI@users.noreply.github.com> Date: Tue, 9 Dec 2025 14:45:51 -0600 Subject: [PATCH 12/19] is this a line ending problem? --- .github/workflows/PR.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/PR.yml b/.github/workflows/PR.yml index 680a55a..53f5068 100644 --- a/.github/workflows/PR.yml +++ b/.github/workflows/PR.yml @@ -34,7 +34,7 @@ jobs: strategy: matrix: os: - - ubuntu-latest + - windows-latest python-version: [ # 3.9, '3.10', 3.11, 3.12, 3.13, 3.14, From 79d5a678189d40e82068b744ff0f7d11e224bceb Mon Sep 17 00:00:00 2001 From: mshafer-NI <23644905+mshafer-NI@users.noreply.github.com> Date: Tue, 9 Dec 2025 14:51:20 -0600 Subject: [PATCH 13/19] add debug output --- .github/workflows/PR.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/PR.yml b/.github/workflows/PR.yml index 53f5068..ead9850 100644 --- a/.github/workflows/PR.yml +++ b/.github/workflows/PR.yml @@ -75,4 +75,6 @@ jobs: - name: Lint our own package shell: bash run: | - ${DOG_FOOD_VENV_BIN}/nps lint . + pwd + ls + ${DOG_FOOD_VENV_BIN}/nps -vv lint . From 2900c469620ae878a9a0cc28f8bc1cd3a6d1edb2 Mon Sep 17 00:00:00 2001 From: mshafer-NI <23644905+mshafer-NI@users.noreply.github.com> Date: Tue, 9 Dec 2025 14:59:05 -0600 Subject: [PATCH 14/19] ok, that was too much output --- .github/workflows/PR.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/PR.yml b/.github/workflows/PR.yml index ead9850..daa1b95 100644 --- a/.github/workflows/PR.yml +++ b/.github/workflows/PR.yml @@ -76,5 +76,4 @@ jobs: shell: bash run: | pwd - ls - ${DOG_FOOD_VENV_BIN}/nps -vv lint . + ${DOG_FOOD_VENV_BIN}/nps lint . From 501e124a6d0aec641e1791f916d31d7fcf21a3b3 Mon Sep 17 00:00:00 2001 From: mshafer-NI <23644905+mshafer-NI@users.noreply.github.com> Date: Tue, 9 Dec 2025 15:02:18 -0600 Subject: [PATCH 15/19] black, just ignore inputs --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b38dc52..9db40c4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,7 @@ nps = 'ni_python_styleguide._cli:main' [tool.black] -extend-exclude = ".*__snapshots/.*\\.py" +extend-exclude = ".*__snapshots/.*/input\\.py" line-length = 100 From da20da8d9ca80d31b0769ba87bec12171a6ef6c4 Mon Sep 17 00:00:00 2001 From: mshafer-NI <23644905+mshafer-NI@users.noreply.github.com> Date: Tue, 9 Dec 2025 15:11:43 -0600 Subject: [PATCH 16/19] update black, flake8-black, and tomli to get a set of deps that works like current latest --- poetry.lock | 125 ++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 92 insertions(+), 33 deletions(-) diff --git a/poetry.lock b/poetry.lock index 1511f72..9e3916d 100644 --- a/poetry.lock +++ b/poetry.lock @@ -13,33 +13,37 @@ files = [ [[package]] name = "black" -version = "24.8.0" +version = "25.11.0" description = "The uncompromising code formatter." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "black-24.8.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:09cdeb74d494ec023ded657f7092ba518e8cf78fa8386155e4a03fdcc44679e6"}, - {file = "black-24.8.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:81c6742da39f33b08e791da38410f32e27d632260e599df7245cccee2064afeb"}, - {file = "black-24.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:707a1ca89221bc8a1a64fb5e15ef39cd755633daa672a9db7498d1c19de66a42"}, - {file = "black-24.8.0-cp310-cp310-win_amd64.whl", hash = "sha256:d6417535d99c37cee4091a2f24eb2b6d5ec42b144d50f1f2e436d9fe1916fe1a"}, - {file = "black-24.8.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:fb6e2c0b86bbd43dee042e48059c9ad7830abd5c94b0bc518c0eeec57c3eddc1"}, - {file = "black-24.8.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:837fd281f1908d0076844bc2b801ad2d369c78c45cf800cad7b61686051041af"}, - {file = "black-24.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:62e8730977f0b77998029da7971fa896ceefa2c4c4933fcd593fa599ecbf97a4"}, - {file = "black-24.8.0-cp311-cp311-win_amd64.whl", hash = "sha256:72901b4913cbac8972ad911dc4098d5753704d1f3c56e44ae8dce99eecb0e3af"}, - {file = "black-24.8.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:7c046c1d1eeb7aea9335da62472481d3bbf3fd986e093cffd35f4385c94ae368"}, - {file = "black-24.8.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:649f6d84ccbae73ab767e206772cc2d7a393a001070a4c814a546afd0d423aed"}, - {file = "black-24.8.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2b59b250fdba5f9a9cd9d0ece6e6d993d91ce877d121d161e4698af3eb9c1018"}, - {file = "black-24.8.0-cp312-cp312-win_amd64.whl", hash = "sha256:6e55d30d44bed36593c3163b9bc63bf58b3b30e4611e4d88a0c3c239930ed5b2"}, - {file = "black-24.8.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:505289f17ceda596658ae81b61ebbe2d9b25aa78067035184ed0a9d855d18afd"}, - {file = "black-24.8.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b19c9ad992c7883ad84c9b22aaa73562a16b819c1d8db7a1a1a49fb7ec13c7d2"}, - {file = "black-24.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1f13f7f386f86f8121d76599114bb8c17b69d962137fc70efe56137727c7047e"}, - {file = "black-24.8.0-cp38-cp38-win_amd64.whl", hash = "sha256:f490dbd59680d809ca31efdae20e634f3fae27fba3ce0ba3208333b713bc3920"}, - {file = "black-24.8.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:eab4dd44ce80dea27dc69db40dab62d4ca96112f87996bca68cd75639aeb2e4c"}, - {file = "black-24.8.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3c4285573d4897a7610054af5a890bde7c65cb466040c5f0c8b732812d7f0e5e"}, - {file = "black-24.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9e84e33b37be070ba135176c123ae52a51f82306def9f7d063ee302ecab2cf47"}, - {file = "black-24.8.0-cp39-cp39-win_amd64.whl", hash = "sha256:73bbf84ed136e45d451a260c6b73ed674652f90a2b3211d6a35e78054563a9bb"}, - {file = "black-24.8.0-py3-none-any.whl", hash = "sha256:972085c618ee94f402da1af548a4f218c754ea7e5dc70acb168bfaca4c2542ed"}, - {file = "black-24.8.0.tar.gz", hash = "sha256:2500945420b6784c38b9ee885af039f5e7471ef284ab03fa35ecdde4688cd83f"}, + {file = "black-25.11.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ec311e22458eec32a807f029b2646f661e6859c3f61bc6d9ffb67958779f392e"}, + {file = "black-25.11.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1032639c90208c15711334d681de2e24821af0575573db2810b0763bcd62e0f0"}, + {file = "black-25.11.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0c0f7c461df55cf32929b002335883946a4893d759f2df343389c4396f3b6b37"}, + {file = "black-25.11.0-cp310-cp310-win_amd64.whl", hash = "sha256:f9786c24d8e9bd5f20dc7a7f0cdd742644656987f6ea6947629306f937726c03"}, + {file = "black-25.11.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:895571922a35434a9d8ca67ef926da6bc9ad464522a5fe0db99b394ef1c0675a"}, + {file = "black-25.11.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:cb4f4b65d717062191bdec8e4a442539a8ea065e6af1c4f4d36f0cdb5f71e170"}, + {file = "black-25.11.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d81a44cbc7e4f73a9d6ae449ec2317ad81512d1e7dce7d57f6333fd6259737bc"}, + {file = "black-25.11.0-cp311-cp311-win_amd64.whl", hash = "sha256:7eebd4744dfe92ef1ee349dc532defbf012a88b087bb7ddd688ff59a447b080e"}, + {file = "black-25.11.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:80e7486ad3535636657aa180ad32a7d67d7c273a80e12f1b4bfa0823d54e8fac"}, + {file = "black-25.11.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6cced12b747c4c76bc09b4db057c319d8545307266f41aaee665540bc0e04e96"}, + {file = "black-25.11.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6cb2d54a39e0ef021d6c5eef442e10fd71fcb491be6413d083a320ee768329dd"}, + {file = "black-25.11.0-cp312-cp312-win_amd64.whl", hash = "sha256:ae263af2f496940438e5be1a0c1020e13b09154f3af4df0835ea7f9fe7bfa409"}, + {file = "black-25.11.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:0a1d40348b6621cc20d3d7530a5b8d67e9714906dfd7346338249ad9c6cedf2b"}, + {file = "black-25.11.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:51c65d7d60bb25429ea2bf0731c32b2a2442eb4bd3b2afcb47830f0b13e58bfd"}, + {file = "black-25.11.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:936c4dd07669269f40b497440159a221ee435e3fddcf668e0c05244a9be71993"}, + {file = "black-25.11.0-cp313-cp313-win_amd64.whl", hash = "sha256:f42c0ea7f59994490f4dccd64e6b2dd49ac57c7c84f38b8faab50f8759db245c"}, + {file = "black-25.11.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:35690a383f22dd3e468c85dc4b915217f87667ad9cce781d7b42678ce63c4170"}, + {file = "black-25.11.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:dae49ef7369c6caa1a1833fd5efb7c3024bb7e4499bf64833f65ad27791b1545"}, + {file = "black-25.11.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5bd4a22a0b37401c8e492e994bce79e614f91b14d9ea911f44f36e262195fdda"}, + {file = "black-25.11.0-cp314-cp314-win_amd64.whl", hash = "sha256:aa211411e94fdf86519996b7f5f05e71ba34835d8f0c0f03c00a26271da02664"}, + {file = "black-25.11.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a3bb5ce32daa9ff0605d73b6f19da0b0e6c1f8f2d75594db539fdfed722f2b06"}, + {file = "black-25.11.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:9815ccee1e55717fe9a4b924cae1646ef7f54e0f990da39a34fc7b264fcf80a2"}, + {file = "black-25.11.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:92285c37b93a1698dcbc34581867b480f1ba3a7b92acf1fe0467b04d7a4da0dc"}, + {file = "black-25.11.0-cp39-cp39-win_amd64.whl", hash = "sha256:43945853a31099c7c0ff8dface53b4de56c41294fa6783c0441a8b1d9bf668bc"}, + {file = "black-25.11.0-py3-none-any.whl", hash = "sha256:e3f562da087791e96cefcd9dda058380a442ab322a02e222add53736451f604b"}, + {file = "black-25.11.0.tar.gz", hash = "sha256:9a323ac32f5dc75ce7470501b887250be5005a01602e931a15e45593f70f6e08"}, ] [package.dependencies] @@ -48,12 +52,13 @@ mypy-extensions = ">=0.4.3" packaging = ">=22.0" pathspec = ">=0.9.0" platformdirs = ">=2" +pytokens = ">=0.3.0" tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} typing-extensions = {version = ">=4.0.1", markers = "python_version < \"3.11\""} [package.extras] colorama = ["colorama (>=0.4.3)"] -d = ["aiohttp (>=3.7.4)", "aiohttp (>=3.7.4,!=3.9.0)"] +d = ["aiohttp (>=3.10)"] jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] uvloop = ["uvloop (>=0.15.2)"] @@ -130,13 +135,13 @@ pyflakes = ">=3.1.0,<3.2.0" [[package]] name = "flake8-black" -version = "0.3.6" +version = "0.4.0" description = "flake8 plugin to call black as a code style validator" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "flake8-black-0.3.6.tar.gz", hash = "sha256:0dfbca3274777792a5bcb2af887a4cad72c72d0e86c94e08e3a3de151bb41c34"}, - {file = "flake8_black-0.3.6-py3-none-any.whl", hash = "sha256:fe8ea2eca98d8a504f22040d9117347f6b367458366952862ac3586e7d4eeaca"}, + {file = "flake8_black-0.4.0-py3-none-any.whl", hash = "sha256:288762d0c9ea065782d87eeecbcc20c69079d17fe1d0f0445f0eb0b0ffb80c39"}, + {file = "flake8_black-0.4.0.tar.gz", hash = "sha256:bf226868f695dee48d55ff6d7747e900709bfd6f605b7a378c70e711e3fc26cb"}, ] [package.dependencies] @@ -419,6 +424,20 @@ files = [ [package.dependencies] pytest = ">=3.0.0" +[[package]] +name = "pytokens" +version = "0.3.0" +description = "A Fast, spec compliant Python 3.14+ tokenizer that runs on older Pythons." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pytokens-0.3.0-py3-none-any.whl", hash = "sha256:95b2b5eaf832e469d141a378872480ede3f251a5a5041b8ec6e581d3ac71bbf3"}, + {file = "pytokens-0.3.0.tar.gz", hash = "sha256:2f932b14ed08de5fcf0b391ace2642f858f1394c0857202959000b68ed7a458a"}, +] + +[package.extras] +dev = ["black", "build", "mypy", "pytest", "pytest-cov", "setuptools", "tox", "twine", "wheel"] + [[package]] name = "setuptools" version = "70.0.0" @@ -458,13 +477,53 @@ files = [ [[package]] name = "tomli" -version = "2.0.1" +version = "2.3.0" description = "A lil' TOML parser" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, - {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, + {file = "tomli-2.3.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:88bd15eb972f3664f5ed4b57c1634a97153b4bac4479dcb6a495f41921eb7f45"}, + {file = "tomli-2.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:883b1c0d6398a6a9d29b508c331fa56adbcdff647f6ace4dfca0f50e90dfd0ba"}, + {file = "tomli-2.3.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d1381caf13ab9f300e30dd8feadb3de072aeb86f1d34a8569453ff32a7dea4bf"}, + {file = "tomli-2.3.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a0e285d2649b78c0d9027570d4da3425bdb49830a6156121360b3f8511ea3441"}, + {file = "tomli-2.3.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0a154a9ae14bfcf5d8917a59b51ffd5a3ac1fd149b71b47a3a104ca4edcfa845"}, + {file = "tomli-2.3.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:74bf8464ff93e413514fefd2be591c3b0b23231a77f901db1eb30d6f712fc42c"}, + {file = "tomli-2.3.0-cp311-cp311-win32.whl", hash = "sha256:00b5f5d95bbfc7d12f91ad8c593a1659b6387b43f054104cda404be6bda62456"}, + {file = "tomli-2.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:4dc4ce8483a5d429ab602f111a93a6ab1ed425eae3122032db7e9acf449451be"}, + {file = "tomli-2.3.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d7d86942e56ded512a594786a5ba0a5e521d02529b3826e7761a05138341a2ac"}, + {file = "tomli-2.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:73ee0b47d4dad1c5e996e3cd33b8a76a50167ae5f96a2607cbe8cc773506ab22"}, + {file = "tomli-2.3.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:792262b94d5d0a466afb5bc63c7daa9d75520110971ee269152083270998316f"}, + {file = "tomli-2.3.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4f195fe57ecceac95a66a75ac24d9d5fbc98ef0962e09b2eddec5d39375aae52"}, + {file = "tomli-2.3.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e31d432427dcbf4d86958c184b9bfd1e96b5b71f8eb17e6d02531f434fd335b8"}, + {file = "tomli-2.3.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:7b0882799624980785240ab732537fcfc372601015c00f7fc367c55308c186f6"}, + {file = "tomli-2.3.0-cp312-cp312-win32.whl", hash = "sha256:ff72b71b5d10d22ecb084d345fc26f42b5143c5533db5e2eaba7d2d335358876"}, + {file = "tomli-2.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:1cb4ed918939151a03f33d4242ccd0aa5f11b3547d0cf30f7c74a408a5b99878"}, + {file = "tomli-2.3.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:5192f562738228945d7b13d4930baffda67b69425a7f0da96d360b0a3888136b"}, + {file = "tomli-2.3.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:be71c93a63d738597996be9528f4abe628d1adf5e6eb11607bc8fe1a510b5dae"}, + {file = "tomli-2.3.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c4665508bcbac83a31ff8ab08f424b665200c0e1e645d2bd9ab3d3e557b6185b"}, + {file = "tomli-2.3.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4021923f97266babc6ccab9f5068642a0095faa0a51a246a6a02fccbb3514eaf"}, + {file = "tomli-2.3.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a4ea38c40145a357d513bffad0ed869f13c1773716cf71ccaa83b0fa0cc4e42f"}, + {file = "tomli-2.3.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ad805ea85eda330dbad64c7ea7a4556259665bdf9d2672f5dccc740eb9d3ca05"}, + {file = "tomli-2.3.0-cp313-cp313-win32.whl", hash = "sha256:97d5eec30149fd3294270e889b4234023f2c69747e555a27bd708828353ab606"}, + {file = "tomli-2.3.0-cp313-cp313-win_amd64.whl", hash = "sha256:0c95ca56fbe89e065c6ead5b593ee64b84a26fca063b5d71a1122bf26e533999"}, + {file = "tomli-2.3.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:cebc6fe843e0733ee827a282aca4999b596241195f43b4cc371d64fc6639da9e"}, + {file = "tomli-2.3.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:4c2ef0244c75aba9355561272009d934953817c49f47d768070c3c94355c2aa3"}, + {file = "tomli-2.3.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c22a8bf253bacc0cf11f35ad9808b6cb75ada2631c2d97c971122583b129afbc"}, + {file = "tomli-2.3.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0eea8cc5c5e9f89c9b90c4896a8deefc74f518db5927d0e0e8d4a80953d774d0"}, + {file = "tomli-2.3.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:b74a0e59ec5d15127acdabd75ea17726ac4c5178ae51b85bfe39c4f8a278e879"}, + {file = "tomli-2.3.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:b5870b50c9db823c595983571d1296a6ff3e1b88f734a4c8f6fc6188397de005"}, + {file = "tomli-2.3.0-cp314-cp314-win32.whl", hash = "sha256:feb0dacc61170ed7ab602d3d972a58f14ee3ee60494292d384649a3dc38ef463"}, + {file = "tomli-2.3.0-cp314-cp314-win_amd64.whl", hash = "sha256:b273fcbd7fc64dc3600c098e39136522650c49bca95df2d11cf3b626422392c8"}, + {file = "tomli-2.3.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:940d56ee0410fa17ee1f12b817b37a4d4e4dc4d27340863cc67236c74f582e77"}, + {file = "tomli-2.3.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:f85209946d1fe94416debbb88d00eb92ce9cd5266775424ff81bc959e001acaf"}, + {file = "tomli-2.3.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a56212bdcce682e56b0aaf79e869ba5d15a6163f88d5451cbde388d48b13f530"}, + {file = "tomli-2.3.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c5f3ffd1e098dfc032d4d3af5c0ac64f6d286d98bc148698356847b80fa4de1b"}, + {file = "tomli-2.3.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:5e01decd096b1530d97d5d85cb4dff4af2d8347bd35686654a004f8dea20fc67"}, + {file = "tomli-2.3.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:8a35dd0e643bb2610f156cca8db95d213a90015c11fee76c946aa62b7ae7e02f"}, + {file = "tomli-2.3.0-cp314-cp314t-win32.whl", hash = "sha256:a1f7f282fe248311650081faafa5f4732bdbfef5d45fe3f2e702fbc6f2d496e0"}, + {file = "tomli-2.3.0-cp314-cp314t-win_amd64.whl", hash = "sha256:70a251f8d4ba2d9ac2542eecf008b3c8a9fc5c3f9f02c56a9d7952612be2fdba"}, + {file = "tomli-2.3.0-py3-none-any.whl", hash = "sha256:e95b1af3c5b07d9e643909b5abbec77cd9f1217e6d0bca72b0234736b9fb1f1b"}, + {file = "tomli-2.3.0.tar.gz", hash = "sha256:64be704a875d2a59753d80ee8a533c3fe183e3f06807ff7dc2232938ccb01549"}, ] [[package]] From 327ee617fcfc6d06953ec390dda11a62a43b78d5 Mon Sep 17 00:00:00 2001 From: mshafer-NI <23644905+mshafer-NI@users.noreply.github.com> Date: Tue, 9 Dec 2025 15:11:55 -0600 Subject: [PATCH 17/19] format test files --- .../function_signature_tests/output__aggressive.py | 3 +-- .../import_line_tests/output__aggressive.py | 5 ++--- .../structural_tests/output__aggressive.py | 3 +-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/tests/test_cli/acknowledge_existing_errors_test_cases__snapshots/function_signature_tests/output__aggressive.py b/tests/test_cli/acknowledge_existing_errors_test_cases__snapshots/function_signature_tests/output__aggressive.py index 197954f..4162150 100644 --- a/tests/test_cli/acknowledge_existing_errors_test_cases__snapshots/function_signature_tests/output__aggressive.py +++ b/tests/test_cli/acknowledge_existing_errors_test_cases__snapshots/function_signature_tests/output__aggressive.py @@ -1,5 +1,4 @@ -"""example of a python file with linter errors. -""" +"""example of a python file with linter errors.""" import os diff --git a/tests/test_cli/acknowledge_existing_errors_test_cases__snapshots/import_line_tests/output__aggressive.py b/tests/test_cli/acknowledge_existing_errors_test_cases__snapshots/import_line_tests/output__aggressive.py index 86fb736..068c91c 100644 --- a/tests/test_cli/acknowledge_existing_errors_test_cases__snapshots/import_line_tests/output__aggressive.py +++ b/tests/test_cli/acknowledge_existing_errors_test_cases__snapshots/import_line_tests/output__aggressive.py @@ -1,5 +1,4 @@ -"""example of a python file with linter errors. -""" +"""example of a python file with linter errors.""" import pathlib, glob # noqa: E401, F401 - multiple imports on one line (auto-generated noqa), 'glob' imported but unused (auto-generated noqa) import os # noqa: I100 - Import statements are in the wrong order. 'import os' should be before 'import pathlib, glob' (auto-generated noqa) @@ -24,7 +23,7 @@ def _test_os_name(): for ( - os # noqa: F402 - import 'os' from line 5 shadowed by loop variable (auto-generated noqa) + os # noqa: F402 - import 'os' from line 4 shadowed by loop variable (auto-generated noqa) ) in range(3): print(os) diff --git a/tests/test_cli/acknowledge_existing_errors_test_cases__snapshots/structural_tests/output__aggressive.py b/tests/test_cli/acknowledge_existing_errors_test_cases__snapshots/structural_tests/output__aggressive.py index 009d3a1..c3263ef 100644 --- a/tests/test_cli/acknowledge_existing_errors_test_cases__snapshots/structural_tests/output__aggressive.py +++ b/tests/test_cli/acknowledge_existing_errors_test_cases__snapshots/structural_tests/output__aggressive.py @@ -1,5 +1,4 @@ -"""example of a python file with linter errors in flow and structure of code. -""" +"""example of a python file with linter errors in flow and structure of code.""" l = 5 # noqa: E741 - ambiguous variable name 'l' (auto-generated noqa) y = False From 92c6a9b8d7640b21f02c70c1d5750668872ad95b Mon Sep 17 00:00:00 2001 From: mshafer-NI <23644905+mshafer-NI@users.noreply.github.com> Date: Tue, 9 Dec 2025 15:14:15 -0600 Subject: [PATCH 18/19] restore test matrix --- .github/workflows/PR.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/PR.yml b/.github/workflows/PR.yml index daa1b95..a2e316c 100644 --- a/.github/workflows/PR.yml +++ b/.github/workflows/PR.yml @@ -33,13 +33,8 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: - - windows-latest - python-version: [ - # 3.9, '3.10', 3.11, 3.12, 3.13, - 3.14, - # 3.14t - ] + os: [macos-latest, windows-latest, ubuntu-latest] + python-version: [3.9, '3.10', 3.11, 3.12, 3.13, 3.14, 3.14t] steps: - name: Check out repo uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 From 38e85c90af81863e98e514141b48b0f264f35da1 Mon Sep 17 00:00:00 2001 From: mshafer-NI <23644905+mshafer-NI@users.noreply.github.com> Date: Tue, 9 Dec 2025 15:19:04 -0600 Subject: [PATCH 19/19] code cleanup --- .github/workflows/PR.yml | 1 - pyproject.toml | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/PR.yml b/.github/workflows/PR.yml index a2e316c..0403ca5 100644 --- a/.github/workflows/PR.yml +++ b/.github/workflows/PR.yml @@ -70,5 +70,4 @@ jobs: - name: Lint our own package shell: bash run: | - pwd ${DOG_FOOD_VENV_BIN}/nps lint . diff --git a/pyproject.toml b/pyproject.toml index 9db40c4..6ee4937 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,6 @@ nps = 'ni_python_styleguide._cli:main' [tool.black] -extend-exclude = ".*__snapshots/.*/input\\.py" line-length = 100