From 4c1ed7793bf7c9ad9462072c8b988bcfd0f78ea3 Mon Sep 17 00:00:00 2001 From: per1234 Date: Sat, 30 Aug 2025 21:22:03 -0700 Subject: [PATCH 1/3] Move comment to appropriate location The "Check Prettier Formatting" workflow is configured to only run when relevant files are modified by the use of path filters. Due to Prettier being a general purpose formatting tool with coverage for an array of languages, and due to the fact that multiple file extensions may be used for files of a given language, the paths filter is extensive. It is based on the code Prettier uses to identify files. In order to facilitate maintenance of the workflow, a comment was added to document the source upon which the paths filter is based. The paths filter must be defined redundantly for both the `push` and `pull_request` event triggers. The decision was made to only add the comment to one instance of the code. Somehow it ended up being added to the second instance, where the maintainer is less likely to see it. It is hereby moved to the first instance. --- .github/workflows/check-prettier-formatting-task.yml | 5 +++-- workflow-templates/check-prettier-formatting-task.yml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check-prettier-formatting-task.yml b/.github/workflows/check-prettier-formatting-task.yml index 05712981..782d3131 100644 --- a/.github/workflows/check-prettier-formatting-task.yml +++ b/.github/workflows/check-prettier-formatting-task.yml @@ -11,6 +11,9 @@ on: - "Taskfile.ya?ml" - "**/.prettierignore" - "**/.prettierrc*" + # Prettier-covered file patterns are defined by: + # https://github.com/github-linguist/linguist/blob/main/lib/linguist/languages.yml + # # CSS - "**.css" - "**.wxss" @@ -115,8 +118,6 @@ on: - "Taskfile.ya?ml" - "**/.prettierignore" - "**/.prettierrc*" - # Prettier-covered file patterns are defined by: - # https://github.com/github-linguist/linguist/blob/main/lib/linguist/languages.yml # CSS - "**.css" - "**.wxss" diff --git a/workflow-templates/check-prettier-formatting-task.yml b/workflow-templates/check-prettier-formatting-task.yml index 05712981..782d3131 100644 --- a/workflow-templates/check-prettier-formatting-task.yml +++ b/workflow-templates/check-prettier-formatting-task.yml @@ -11,6 +11,9 @@ on: - "Taskfile.ya?ml" - "**/.prettierignore" - "**/.prettierrc*" + # Prettier-covered file patterns are defined by: + # https://github.com/github-linguist/linguist/blob/main/lib/linguist/languages.yml + # # CSS - "**.css" - "**.wxss" @@ -115,8 +118,6 @@ on: - "Taskfile.ya?ml" - "**/.prettierignore" - "**/.prettierrc*" - # Prettier-covered file patterns are defined by: - # https://github.com/github-linguist/linguist/blob/main/lib/linguist/languages.yml # CSS - "**.css" - "**.wxss" From 16772696b690a4ab93d2254d788a8a258da4e37d Mon Sep 17 00:00:00 2001 From: per1234 Date: Sat, 30 Aug 2025 21:57:31 -0700 Subject: [PATCH 2/3] Add source comment to project's copies of assets These comments ensure the "upstream" source of the asset is known, in order to facilitate syncing changes. --- Taskfile.yml | 3 +++ pyproject.toml | 1 + 2 files changed, 4 insertions(+) diff --git a/Taskfile.yml b/Taskfile.yml index 6d920f59..42c43e0e 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -712,6 +712,7 @@ tasks: -s "{{.SCHEMA_PATH}}" \ -d "{{.DATA_PATH}}" + # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-javascript-task/Taskfile.yml js:fix: desc: Fix JavaScript code linting violations deps: @@ -724,6 +725,7 @@ tasks: --fix \ . + # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-javascript-task/Taskfile.yml js:lint: desc: Lint JavaScript code deps: @@ -1083,6 +1085,7 @@ tasks: flake8 \ --show-source + # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/test-python-poetry-task/Taskfile.yml python:test: desc: Run Python tests deps: diff --git a/pyproject.toml b/pyproject.toml index 96f34503..dfc2b8f1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,4 @@ +# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/poetry/pyproject.toml [tool.black] line-length = 120 From 48f46133350f72df64c82efd2ecf4b66edac72c8 Mon Sep 17 00:00:00 2001 From: per1234 Date: Sat, 30 Aug 2025 21:58:08 -0700 Subject: [PATCH 3/3] Sync project infrastructure with assets --- .codespellrc | 2 +- .github/workflows/check-files-task.yml | 2 +- .github/workflows/check-workflows-task.yml | 4 ++++ Taskfile.yml | 4 +++- .../deploy-mkdocs-versioned/siteversion/tests/__init__.py | 3 ++- 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.codespellrc b/.codespellrc index 2885449e..0adba8b1 100644 --- a/.codespellrc +++ b/.codespellrc @@ -3,7 +3,7 @@ [codespell] # In the event of a false positive, add the problematic word, in all lowercase, to a comma-separated list here: ignore-words-list = ba,licence,ot -skip = .git,./.licenses,__pycache__,node_modules,./other/clang-format-configuration/testdata/input/samples,./other/clang-format-configuration/testdata/golden,./other/clang-format-configuration/.clang-format,go.mod,go.sum,package-lock.json,poetry.lock,yarn.lock +skip = ./.licenses,.git,__pycache__,node_modules,./other/clang-format-configuration/testdata/input/samples,./other/clang-format-configuration/testdata/golden,./other/clang-format-configuration/.clang-format,go.mod,go.sum,package-lock.json,poetry.lock,yarn.lock builtin = clear,informal,en-GB_to_en-US check-filenames = check-hidden = diff --git a/.github/workflows/check-files-task.yml b/.github/workflows/check-files-task.yml index e737c6f6..9e795315 100644 --- a/.github/workflows/check-files-task.yml +++ b/.github/workflows/check-files-task.yml @@ -15,9 +15,9 @@ on: jobs: run-determination: runs-on: ubuntu-latest + permissions: {} outputs: result: ${{ steps.determination.outputs.result }} - permissions: {} steps: - name: Determine if the rest of the workflow should run id: determination diff --git a/.github/workflows/check-workflows-task.yml b/.github/workflows/check-workflows-task.yml index 43012cef..a8dd76c2 100644 --- a/.github/workflows/check-workflows-task.yml +++ b/.github/workflows/check-workflows-task.yml @@ -7,12 +7,16 @@ on: paths: - ".github/workflows/*.ya?ml" - ".npmrc" + - "package.json" + - "package-lock.json" - "Taskfile.ya?ml" - "workflow-templates/*.ya?ml" pull_request: paths: - ".github/workflows/*.ya?ml" - ".npmrc" + - "package.json" + - "package-lock.json" - "Taskfile.ya?ml" - "workflow-templates/*.ya?ml" schedule: diff --git a/Taskfile.yml b/Taskfile.yml index 42c43e0e..d183e273 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -462,6 +462,7 @@ tasks: docs:generate: desc: Create all generated documentation content + run: when_changed # This is an "umbrella" task used to call any documentation generation processes the project has. # It can be left empty if there are none. @@ -586,7 +587,8 @@ tasks: ! which ec \ &>/dev/null then - echo "ec not found or not in PATH. Please install: https://github.com/editorconfig-checker/editorconfig-checker#installation" + echo "ec not found or not in PATH." + echo "Please install: https://github.com/editorconfig-checker/editorconfig-checker#installation" exit 1 fi - ec diff --git a/workflow-templates/assets/deploy-mkdocs-versioned/siteversion/tests/__init__.py b/workflow-templates/assets/deploy-mkdocs-versioned/siteversion/tests/__init__.py index 205ce526..c17f72d1 100644 --- a/workflow-templates/assets/deploy-mkdocs-versioned/siteversion/tests/__init__.py +++ b/workflow-templates/assets/deploy-mkdocs-versioned/siteversion/tests/__init__.py @@ -1,4 +1,5 @@ -# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/test-python/__init__.py +# Source: +# https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/test-python/__init__.py # Copyright 2021 ARDUINO SA (http://www.arduino.cc/) # # This software is released under the GNU General Public License version 3,