From afaf427eb4bcb6b885993bb78ddf3ca7289b06ee Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2024 22:22:14 +0000 Subject: [PATCH 01/10] chore(pre-commit-deps): pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/renovatebot/pre-commit-hooks: 22ca1b965b7ec0d21bd316d8de38c735f2e035b3 → db75e17671397199275beeb5c4e7fbe203969769](https://github.com/renovatebot/pre-commit-hooks/compare/22ca1b965b7ec0d21bd316d8de38c735f2e035b3...db75e17671397199275beeb5c4e7fbe203969769) - [github.com/astral-sh/ruff-pre-commit: 8b76f04e7e5a9cd259e9d1db7799599355f97cdf → fc6ef5d0dd21a2a98a7fc6956e4f16166cb6562a](https://github.com/astral-sh/ruff-pre-commit/compare/8b76f04e7e5a9cd259e9d1db7799599355f97cdf...fc6ef5d0dd21a2a98a7fc6956e4f16166cb6562a) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4703a5c..5993b89 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -40,7 +40,7 @@ repos: - id: remove-tabs - id: forbid-tabs - repo: https://github.com/renovatebot/pre-commit-hooks - rev: 22ca1b965b7ec0d21bd316d8de38c735f2e035b3 # frozen: 39.59.0 + rev: db75e17671397199275beeb5c4e7fbe203969769 # frozen: 39.69.4 hooks: - id: renovate-config-validator language_version: 20.18.0 # TODO: remove this line once https://github.com/renovatebot/pre-commit-hooks/issues/2460 is resolved @@ -137,7 +137,7 @@ repos: always_run: true args: [audit, --json, --ignore-code=CVE-2019-8341] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 8b76f04e7e5a9cd259e9d1db7799599355f97cdf # frozen: v0.8.2 + rev: fc6ef5d0dd21a2a98a7fc6956e4f16166cb6562a # frozen: v0.8.3 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] From a6af1310197d562bb59f3d50410319e4765a4d80 Mon Sep 17 00:00:00 2001 From: "Felt, Nicholas" Date: Thu, 19 Dec 2024 12:36:18 -0800 Subject: [PATCH 02/10] chore: pre-commit autoupdate --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5993b89..164ce72 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -40,7 +40,7 @@ repos: - id: remove-tabs - id: forbid-tabs - repo: https://github.com/renovatebot/pre-commit-hooks - rev: db75e17671397199275beeb5c4e7fbe203969769 # frozen: 39.69.4 + rev: 5f5318567fe9cd1f1265dde94b8d9d72a25cda52 # frozen: 39.75.1 hooks: - id: renovate-config-validator language_version: 20.18.0 # TODO: remove this line once https://github.com/renovatebot/pre-commit-hooks/issues/2460 is resolved @@ -137,7 +137,7 @@ repos: always_run: true args: [audit, --json, --ignore-code=CVE-2019-8341] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: fc6ef5d0dd21a2a98a7fc6956e4f16166cb6562a # frozen: v0.8.3 + rev: f0b5944bef86f50d875305821a0ab0d8c601e465 # frozen: v0.8.4 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] From ec02f922ef4e3c8c6fb09fc1afc970f4f011d601 Mon Sep 17 00:00:00 2001 From: "Felt, Nicholas" Date: Thu, 19 Dec 2024 12:51:05 -0800 Subject: [PATCH 03/10] chore: pre-commit autoupdate --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 164ce72..eae06e5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -80,7 +80,7 @@ repos: - id: hadolint args: [--ignore=DL3008, --ignore=DL3018] - repo: https://github.com/executablebooks/mdformat - rev: 00812cd1850e41aae5c0916645b4b7404f538e8c # frozen: 0.7.19 + rev: e20b1ac5acb8aba0b49d3a9109c6e6b58684ee83 # frozen: 0.7.21 hooks: - id: mdformat args: [--number, --end-of-line, keep] From 61fc6bb961adb9c7df46dc4e27eb92c15f0ab1ba Mon Sep 17 00:00:00 2001 From: "Felt, Nicholas" Date: Thu, 19 Dec 2024 13:09:18 -0800 Subject: [PATCH 04/10] chore: Debug failing pre-commit hook --- pyproject.toml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 40e37ff..6518dcc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -276,12 +276,27 @@ python = install_command = python -I -m pip install --upgrade --upgrade-strategy=eager {opts} {packages} deps = poetry + setuptools + mdformat-admon + mdformat-beautysh + mdformat-footnote + mdformat-frontmatter + mdformat-gfm + mdformat-gfm-alerts + mdformat-mkdocs + mdformat-shfmt + mdformat-simple-breaks + mdformat-tables + mdformat-toc + mdformat-web + mdformat-wikilink setenv = # Skip pre-commit checks that are not needed SKIP = file-contents-sorter commands_pre = python -m poetry install --sync commands = + !tests: mdformat --check --number --end-of-line keep . !tests: pre-commit run --all-files pytest -vv -k "not test_docs" --showlocals --cov --junitxml={tox_root}/.results_{envname}/results.xml --cov-report=term --cov-report=xml:{tox_root}/.coverage_{envname}.xml --cov-report=html:{tox_root}/.results_{envname}/html --self-contained-html --html={tox_root}/.results_{envname}/results.html From ba0b78525bc0b23f4ec97e35d2d224a0af8cc581 Mon Sep 17 00:00:00 2001 From: "Felt, Nicholas" Date: Thu, 19 Dec 2024 13:12:34 -0800 Subject: [PATCH 05/10] chore: Debug failing pre-commit hook --- pyproject.toml | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 6518dcc..ba2d8e0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,6 +50,19 @@ toml-sort = "0.24.2" yamlfix = "1.17.0" [tool.poetry.group.dev.dependencies] +mdformat-admon = "*" +mdformat-beautysh = "*" +mdformat-footnote = "*" +mdformat-frontmatter = "*" +mdformat-gfm = "*" +mdformat-gfm-alerts = "*" +mdformat-mkdocs = "*" +mdformat-shfmt = "*" +mdformat-simple-breaks = "*" +mdformat-tables = "*" +mdformat-toc = "*" +mdformat-web = "*" +mdformat-wikilink = "*" pip = "^24.0" poetry-audit-plugin = "^0.4.0" poetry-plugin-export = "1.8.0" @@ -276,20 +289,6 @@ python = install_command = python -I -m pip install --upgrade --upgrade-strategy=eager {opts} {packages} deps = poetry - setuptools - mdformat-admon - mdformat-beautysh - mdformat-footnote - mdformat-frontmatter - mdformat-gfm - mdformat-gfm-alerts - mdformat-mkdocs - mdformat-shfmt - mdformat-simple-breaks - mdformat-tables - mdformat-toc - mdformat-web - mdformat-wikilink setenv = # Skip pre-commit checks that are not needed SKIP = file-contents-sorter From 039a05393872d455a214e995b9edf7babba12a25 Mon Sep 17 00:00:00 2001 From: "Felt, Nicholas" Date: Thu, 19 Dec 2024 13:16:22 -0800 Subject: [PATCH 06/10] chore: Debug failing pre-commit hook --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ba2d8e0..d901398 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -295,7 +295,7 @@ setenv = commands_pre = python -m poetry install --sync commands = - !tests: mdformat --check --number --end-of-line keep . + !tests: mdformat --exclude **/.tox/** --check --number --end-of-line keep . !tests: pre-commit run --all-files pytest -vv -k "not test_docs" --showlocals --cov --junitxml={tox_root}/.results_{envname}/results.xml --cov-report=term --cov-report=xml:{tox_root}/.coverage_{envname}.xml --cov-report=html:{tox_root}/.results_{envname}/html --self-contained-html --html={tox_root}/.results_{envname}/results.html From 35d0fd415c0869145f05b9d672b447c5e86cf2b0 Mon Sep 17 00:00:00 2001 From: "Felt, Nicholas" Date: Thu, 19 Dec 2024 13:18:12 -0800 Subject: [PATCH 07/10] chore: Debug failing pre-commit hook --- .pre-commit-config.yaml | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index eae06e5..16bcdfb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -83,7 +83,7 @@ repos: rev: e20b1ac5acb8aba0b49d3a9109c6e6b58684ee83 # frozen: 0.7.21 hooks: - id: mdformat - args: [--number, --end-of-line, keep] + args: [--number, --end-of-line, keep, --check] additional_dependencies: - setuptools # This is required since Python 3.12 no longer installs setuptools by default in virtual environments - mdformat-admon diff --git a/pyproject.toml b/pyproject.toml index d901398..ff5d3f1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -295,7 +295,7 @@ setenv = commands_pre = python -m poetry install --sync commands = - !tests: mdformat --exclude **/.tox/** --check --number --end-of-line keep . +# !tests: mdformat --exclude **/.tox/** --check --number --end-of-line keep . !tests: pre-commit run --all-files pytest -vv -k "not test_docs" --showlocals --cov --junitxml={tox_root}/.results_{envname}/results.xml --cov-report=term --cov-report=xml:{tox_root}/.coverage_{envname}.xml --cov-report=html:{tox_root}/.results_{envname}/html --self-contained-html --html={tox_root}/.results_{envname}/results.html From 951745e876f32c3be31bd8ffc5b7bd5f51e64af8 Mon Sep 17 00:00:00 2001 From: "Felt, Nicholas" Date: Thu, 19 Dec 2024 13:31:05 -0800 Subject: [PATCH 08/10] docs: Modify contributing guide to get pre-commit hook to pass --- .pre-commit-config.yaml | 2 +- CONTRIBUTING.md | 21 +++++---------------- pyproject.toml | 14 -------------- 3 files changed, 6 insertions(+), 31 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 16bcdfb..cebb9ad 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -79,7 +79,7 @@ repos: hooks: - id: hadolint args: [--ignore=DL3008, --ignore=DL3018] - - repo: https://github.com/executablebooks/mdformat + - repo: https://github.com/hukkin/mdformat rev: e20b1ac5acb8aba0b49d3a9109c6e6b58684ee83 # frozen: 0.7.21 hooks: - id: mdformat diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d27182d..27c7a91 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -38,11 +38,11 @@ If you are proposing a feature: Ready to contribute? Here's how to set up `python-package-ci-cd` for local development. -1. Set up commit signing, see [GitHub's documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification) for details. +> [!NOTE] +> All commits going into the main repository are required to be signed, so make sure +> to set up commit signing before starting to make changes. - !!! hint - All commits going into the main repository are required to be signed, so make sure - to set up commit signing before starting to make changes. +1. Set up commit signing, see [GitHub's documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification) for details. 2. Fork `python-package-ci-cd` into a new repository. @@ -68,18 +68,7 @@ Ready to contribute? Here's how to set up `python-package-ci-cd` for local devel 8. When you're done making changes, check that your changes conform to any code formatting requirements. - !!! note - Always remember to activate the virtual environment. - - ```console - # Linux - source .venv/bin/activate - - # Windows - .venv\Scripts\activate.bat - ``` - - - To run the pre-commit checks: + - To run the pre-commit checks (only after activating your virtual environment): ```console pre-commit run --all diff --git a/pyproject.toml b/pyproject.toml index ff5d3f1..40e37ff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,19 +50,6 @@ toml-sort = "0.24.2" yamlfix = "1.17.0" [tool.poetry.group.dev.dependencies] -mdformat-admon = "*" -mdformat-beautysh = "*" -mdformat-footnote = "*" -mdformat-frontmatter = "*" -mdformat-gfm = "*" -mdformat-gfm-alerts = "*" -mdformat-mkdocs = "*" -mdformat-shfmt = "*" -mdformat-simple-breaks = "*" -mdformat-tables = "*" -mdformat-toc = "*" -mdformat-web = "*" -mdformat-wikilink = "*" pip = "^24.0" poetry-audit-plugin = "^0.4.0" poetry-plugin-export = "1.8.0" @@ -295,7 +282,6 @@ setenv = commands_pre = python -m poetry install --sync commands = -# !tests: mdformat --exclude **/.tox/** --check --number --end-of-line keep . !tests: pre-commit run --all-files pytest -vv -k "not test_docs" --showlocals --cov --junitxml={tox_root}/.results_{envname}/results.xml --cov-report=term --cov-report=xml:{tox_root}/.coverage_{envname}.xml --cov-report=html:{tox_root}/.results_{envname}/html --self-contained-html --html={tox_root}/.results_{envname}/results.html From 1ffba33201da9a18764e3f6c3593028bc424feb9 Mon Sep 17 00:00:00 2001 From: "Felt, Nicholas" Date: Thu, 19 Dec 2024 13:35:50 -0800 Subject: [PATCH 09/10] chore: revert back mdformat args --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cebb9ad..0b64377 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -83,7 +83,7 @@ repos: rev: e20b1ac5acb8aba0b49d3a9109c6e6b58684ee83 # frozen: 0.7.21 hooks: - id: mdformat - args: [--number, --end-of-line, keep, --check] + args: [--number, --end-of-line, keep] additional_dependencies: - setuptools # This is required since Python 3.12 no longer installs setuptools by default in virtual environments - mdformat-admon From ec80665f468ae29d58c7f5436680f108914be35c Mon Sep 17 00:00:00 2001 From: "Felt, Nicholas" Date: Thu, 19 Dec 2024 13:37:01 -0800 Subject: [PATCH 10/10] docs: Change note importance --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 27c7a91..7b9f6f5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -38,7 +38,7 @@ If you are proposing a feature: Ready to contribute? Here's how to set up `python-package-ci-cd` for local development. -> [!NOTE] +> [!IMPORTANT] > All commits going into the main repository are required to be signed, so make sure > to set up commit signing before starting to make changes.