From 4101ba12ef9c2dd1315a93b87f5c2be2a1233e61 Mon Sep 17 00:00:00 2001 From: Joseph Chiocchi Date: Fri, 21 Mar 2025 14:09:43 -0500 Subject: [PATCH 01/21] add pkg-fourth --- src/pkg-fourth/README.md | 3 +++ src/pkg-fourth/pkg_fourth/__init__.py | 5 +++++ src/pkg-fourth/pyproject.toml | 18 ++++++++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 src/pkg-fourth/README.md create mode 100644 src/pkg-fourth/pkg_fourth/__init__.py create mode 100644 src/pkg-fourth/pyproject.toml diff --git a/src/pkg-fourth/README.md b/src/pkg-fourth/README.md new file mode 100644 index 0000000..340b056 --- /dev/null +++ b/src/pkg-fourth/README.md @@ -0,0 +1,3 @@ +# pkg-second + +This is the second package. diff --git a/src/pkg-fourth/pkg_fourth/__init__.py b/src/pkg-fourth/pkg_fourth/__init__.py new file mode 100644 index 0000000..4671106 --- /dev/null +++ b/src/pkg-fourth/pkg_fourth/__init__.py @@ -0,0 +1,5 @@ +from art import text2art +from mycore import greet + +if __name__ == "__main__": + print(text2art(greet("Hello"))) diff --git a/src/pkg-fourth/pyproject.toml b/src/pkg-fourth/pyproject.toml new file mode 100644 index 0000000..07dc41c --- /dev/null +++ b/src/pkg-fourth/pyproject.toml @@ -0,0 +1,18 @@ +[project] +name = "pkg-fourth" +version = "0.1.0" +description = "Fourth package" +authors = [ + {name = "John Doe", email = "johndoe@example.org"}, +] +dependencies = [ + "pkg-core", + "art", +] +requires-python = ">=3.8" +readme = "README.md" +license = {text = "MIT"} + +[build-system] +requires = ["pdm-backend"] +build-backend = "pdm.backend" From cc6966719e916387c46c4bc3c80fbe65de5cec98 Mon Sep 17 00:00:00 2001 From: Joseph Chiocchi Date: Fri, 21 Mar 2025 14:18:02 -0500 Subject: [PATCH 02/21] update pre-commit-config --- .pre-commit-config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0c13175..b448fe5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,6 +8,7 @@ default_install_hook_types: default_stages: - manual - pre-push + - pre-commit repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v5.0.0 From 1e7e2886c7173c8eadd9044a348ef0b8fcafaff0 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 21 Mar 2025 19:19:34 +0000 Subject: [PATCH 03/21] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .pre-commit-config.yaml | 95 +++++++++++++++-------------- pyproject.toml | 6 +- src/pkg-core/pyproject.toml | 14 ++--- src/pkg-first/pyproject.toml | 12 ++-- src/pkg-fourth/pyproject.toml | 16 ++--- src/pkg-second/pyproject.toml | 12 ++-- src/pkg-third/pkg_third/__init__.py | 3 +- src/pkg-third/pyproject.toml | 16 ++--- src/precommit_ci_test/cli.py | 1 + src/precommit_ci_test/settings.py | 1 + tests/cli_test.py | 1 + tests/settings_test.py | 1 + 12 files changed, 91 insertions(+), 87 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b448fe5..dca5fdf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,53 @@ # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks + +# ci: {} + + # - repo: https://github.com/pre-commit/pre-commit-hooks + # rev: v4.5.0 + # hooks: + # - id: check-added-large-files + # - id: check-shebang-scripts-are-executable + # - id: check-symlinks + # - id: check-docstring-first + # - id: check-toml + # - id: check-yaml + # - id: destroyed-symlinks + # - id: end-of-file-fixer + # - id: forbid-new-submodules + # - id: trailing-whitespace + # - id: name-tests-test + # - id: sort-simple-yaml + # files: .pre-commit-config.yaml + # - repo: local + # hooks: + # - id: ruff-format + # name: ruff-format + # entry: pdm run python -m ruff format --force-exclude + # language: system + # types_or: + # - python + # - pyi + # require_serial: true + # - id: toml-sort + # name: toml-sort + # entry: pdm run toml-sort + # language: system + # types: + # - toml + # # - id: pdm-sync + # # name: pdm-sync + # # entry: pdm sync + # # language: python + # # stages: + # # - post-checkout + # # - post-merge + # # always_run: true + # # - id: submodule-fetch-and-update + # # name: submodule-fetch-and-update + # # entry: ./tasks/update_submodules.py + # # language: python + default_install_hook_types: - post-checkout - post-merge @@ -97,50 +145,3 @@ repos: entry: found Copier update rejection files; review them and remove them language: fail files: \.rej$ - - # - repo: https://github.com/pre-commit/pre-commit-hooks - # rev: v4.5.0 - # hooks: - # - id: check-added-large-files - # - id: check-shebang-scripts-are-executable - # - id: check-symlinks - # - id: check-docstring-first - # - id: check-toml - # - id: check-yaml - # - id: destroyed-symlinks - # - id: end-of-file-fixer - # - id: forbid-new-submodules - # - id: trailing-whitespace - # - id: name-tests-test - # - id: sort-simple-yaml - # files: .pre-commit-config.yaml - # - repo: local - # hooks: - # - id: ruff-format - # name: ruff-format - # entry: pdm run python -m ruff format --force-exclude - # language: system - # types_or: - # - python - # - pyi - # require_serial: true - # - id: toml-sort - # name: toml-sort - # entry: pdm run toml-sort - # language: system - # types: - # - toml - # # - id: pdm-sync - # # name: pdm-sync - # # entry: pdm sync - # # language: python - # # stages: - # # - post-checkout - # # - post-merge - # # always_run: true - # # - id: submodule-fetch-and-update - # # name: submodule-fetch-and-update - # # entry: ./tasks/update_submodules.py - # # language: python - -# ci: {} diff --git a/pyproject.toml b/pyproject.toml index 9c27ae0..b337a3d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -85,13 +85,13 @@ lint = [ "ruff", "toml-sort", ] +pre-commit = [ + "pre-commit", +] test = [ "coverage", "pytest", ] -pre-commit = [ - "pre-commit", -] [tool.pdm.version] source = "scm" diff --git a/src/pkg-core/pyproject.toml b/src/pkg-core/pyproject.toml index 4ae80d2..02513a1 100644 --- a/src/pkg-core/pyproject.toml +++ b/src/pkg-core/pyproject.toml @@ -1,17 +1,17 @@ [project] name = "pkg-core" -version = "0.1.0" -description = "Core utilities" authors = [ - {name = "John Doe", email = "johndoe@example.org"}, + {email = "johndoe@example.org", name = "John Doe"}, ] dependencies = [ - "click", + "click", ] -requires-python = ">=3.8" -readme = "README.md" +description = "Core utilities" license = {text = "MIT"} +readme = "README.md" +requires-python = ">=3.8" +version = "0.1.0" [build-system] -requires = ["pdm-backend"] build-backend = "pdm.backend" +requires = ["pdm-backend"] diff --git a/src/pkg-first/pyproject.toml b/src/pkg-first/pyproject.toml index 9f51919..b47d54d 100644 --- a/src/pkg-first/pyproject.toml +++ b/src/pkg-first/pyproject.toml @@ -1,15 +1,15 @@ [project] name = "pkg-first" -version = "0.1.0" -description = "First package" authors = [ - {name = "John Doe", email = "johndoe@example.org"}, + {email = "johndoe@example.org", name = "John Doe"}, ] dependencies = ["pkg-core"] -requires-python = ">=3.8" -readme = "README.md" +description = "First package" license = {text = "MIT"} +readme = "README.md" +requires-python = ">=3.8" +version = "0.1.0" [build-system] -requires = ["pdm-backend"] build-backend = "pdm.backend" +requires = ["pdm-backend"] diff --git a/src/pkg-fourth/pyproject.toml b/src/pkg-fourth/pyproject.toml index 07dc41c..f098bdd 100644 --- a/src/pkg-fourth/pyproject.toml +++ b/src/pkg-fourth/pyproject.toml @@ -1,18 +1,18 @@ [project] name = "pkg-fourth" -version = "0.1.0" -description = "Fourth package" authors = [ - {name = "John Doe", email = "johndoe@example.org"}, + {email = "johndoe@example.org", name = "John Doe"}, ] dependencies = [ - "pkg-core", - "art", + "art", + "pkg-core", ] -requires-python = ">=3.8" -readme = "README.md" +description = "Fourth package" license = {text = "MIT"} +readme = "README.md" +requires-python = ">=3.8" +version = "0.1.0" [build-system] -requires = ["pdm-backend"] build-backend = "pdm.backend" +requires = ["pdm-backend"] diff --git a/src/pkg-second/pyproject.toml b/src/pkg-second/pyproject.toml index 5a9c60a..e571163 100644 --- a/src/pkg-second/pyproject.toml +++ b/src/pkg-second/pyproject.toml @@ -1,15 +1,15 @@ [project] name = "pkg-second" -version = "0.1.0" -description = "Second package" authors = [ - {name = "John Doe", email = "johndoe@example.org"}, + {email = "johndoe@example.org", name = "John Doe"}, ] dependencies = ["pkg-core"] -requires-python = ">=3.8" -readme = "README.md" +description = "Second package" license = {text = "MIT"} +readme = "README.md" +requires-python = ">=3.8" +version = "0.1.0" [build-system] -requires = ["pdm-backend"] build-backend = "pdm.backend" +requires = ["pdm-backend"] diff --git a/src/pkg-third/pkg_third/__init__.py b/src/pkg-third/pkg_third/__init__.py index 835c9fb..4671106 100644 --- a/src/pkg-third/pkg_third/__init__.py +++ b/src/pkg-third/pkg_third/__init__.py @@ -1,6 +1,5 @@ -from mycore import greet - from art import text2art +from mycore import greet if __name__ == "__main__": print(text2art(greet("Hello"))) diff --git a/src/pkg-third/pyproject.toml b/src/pkg-third/pyproject.toml index b23f36b..25a3c9c 100644 --- a/src/pkg-third/pyproject.toml +++ b/src/pkg-third/pyproject.toml @@ -1,18 +1,18 @@ [project] name = "pkg-third" -version = "0.1.0" -description = "Third package" authors = [ - {name = "John Doe", email = "johndoe@example.org"}, + {email = "johndoe@example.org", name = "John Doe"}, ] dependencies = [ - "pkg-core", - "art", + "art", + "pkg-core", ] -requires-python = ">=3.8" -readme = "README.md" +description = "Third package" license = {text = "MIT"} +readme = "README.md" +requires-python = ">=3.8" +version = "0.1.0" [build-system] -requires = ["pdm-backend"] build-backend = "pdm.backend" +requires = ["pdm-backend"] diff --git a/src/precommit_ci_test/cli.py b/src/precommit_ci_test/cli.py index 658f6ce..2d210d0 100644 --- a/src/precommit_ci_test/cli.py +++ b/src/precommit_ci_test/cli.py @@ -1,4 +1,5 @@ """Command Line Interface.""" + import typer app = typer.Typer() diff --git a/src/precommit_ci_test/settings.py b/src/precommit_ci_test/settings.py index 8ac1ad6..6303f6e 100644 --- a/src/precommit_ci_test/settings.py +++ b/src/precommit_ci_test/settings.py @@ -1,4 +1,5 @@ """Settings Module.""" + import logging from logging import getLevelName diff --git a/tests/cli_test.py b/tests/cli_test.py index 507dc25..315673b 100644 --- a/tests/cli_test.py +++ b/tests/cli_test.py @@ -1,4 +1,5 @@ """Test for cli.""" + from typer.testing import CliRunner from precommit_ci_test.cli import app diff --git a/tests/settings_test.py b/tests/settings_test.py index 0fc6828..34dc929 100644 --- a/tests/settings_test.py +++ b/tests/settings_test.py @@ -1,4 +1,5 @@ """Test for settings.""" + import os from precommit_ci_test.settings import global_settings, settings From 5b9948a6152114058eab86052ddf660d476b5956 Mon Sep 17 00:00:00 2001 From: Joseph Chiocchi Date: Fri, 21 Mar 2025 14:21:57 -0500 Subject: [PATCH 04/21] update .pre-commit-config.yaml --- .pre-commit-config.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dca5fdf..c697067 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -93,6 +93,11 @@ repos: - id: ruff-format # Avoid running on jypter notebooks types_or: [ python, pyi ] + - repo: https://github.com/pdm-project/pdm + rev: 2.22.3 + hooks: + - id: pdm-sync + - id: pdm-lock-check - repo: local hooks: - id: pdm-sync From 72ff0d9eb941571c5efb12fc588f48c763c11b21 Mon Sep 17 00:00:00 2001 From: Joseph Chiocchi Date: Fri, 21 Mar 2025 14:22:48 -0500 Subject: [PATCH 05/21] update .pre-commit-config.yaml --- .pre-commit-config.yaml | 62 ++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c697067..7ce8271 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -100,37 +100,37 @@ repos: - id: pdm-lock-check - repo: local hooks: - - id: pdm-sync - name: pdm-sync - entry: pdm sync - language: python - stages: - - post-checkout - - post-merge - always_run: true - pass_filenames: false - - id: pdm-lock-check - name: pdm-lock-check - entry: pdm lock --check - language: python - files: ^pyproject.toml$ - pass_filenames: false - - id: mypy - name: mypy - entry: pdm run python -m mypy - language: system - types_or: - - python - - pyi - require_serial: true - - id: ruff - name: ruff - entry: pdm run python -m ruff check --force-exclude - language: system - types_or: - - python - - pyi - require_serial: true + # - id: pdm-sync + # name: pdm-sync + # entry: pdm sync + # language: python + # stages: + # - post-checkout + # - post-merge + # always_run: true + # pass_filenames: false + # - id: pdm-lock-check + # name: pdm-lock-check + # entry: pdm lock --check + # language: python + # files: ^pyproject.toml$ + # pass_filenames: false + # - id: mypy + # name: mypy + # entry: pdm run python -m mypy + # language: system + # types_or: + # - python + # - pyi + # require_serial: true + # - id: ruff + # name: ruff + # entry: pdm run python -m ruff check --force-exclude + # language: system + # types_or: + # - python + # - pyi + # require_serial: true # - id: ruff-format # name: ruff-format # entry: pdm run python -m ruff format --force-exclude From 0a82ebf40f85bd21534903baf05d500e49523a0e Mon Sep 17 00:00:00 2001 From: Joseph Chiocchi Date: Fri, 21 Mar 2025 14:24:37 -0500 Subject: [PATCH 06/21] update precommit, relock --- .pre-commit-config.yaml | 2 +- pdm.lock | 90 ++++++++++++----------------------------- 2 files changed, 26 insertions(+), 66 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7ce8271..eb12852 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -94,7 +94,7 @@ repos: # Avoid running on jypter notebooks types_or: [ python, pyi ] - repo: https://github.com/pdm-project/pdm - rev: 2.22.3 + rev: 2.22.4 hooks: - id: pdm-sync - id: pdm-lock-check diff --git a/pdm.lock b/pdm.lock index 22201da..64dbb1c 100644 --- a/pdm.lock +++ b/pdm.lock @@ -4,8 +4,11 @@ [metadata] groups = ["default", "doc", "lint", "pre-commit", "test"] strategy = ["cross_platform", "inherit_metadata"] -lock_version = "4.4.1" -content_hash = "sha256:7b31370285f715eb38e4de2fadddafd6985bffc4bbaa7ba129a475f817e34d0f" +lock_version = "4.5.0" +content_hash = "sha256:326248fc3f7ccb731842feb1ea263aef28fee9749e532f6761b504f708bbc360" + +[[metadata.targets]] +requires_python = ">=3.12" [[package]] name = "alabaster" @@ -24,6 +27,9 @@ version = "0.7.0" requires_python = ">=3.8" summary = "Reusable constraint types to use with typing.Annotated" groups = ["default", "doc"] +dependencies = [ + "typing-extensions>=4.0.0; python_version < \"3.9\"", +] files = [ {file = "annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53"}, {file = "annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89"}, @@ -36,6 +42,7 @@ requires_python = ">=3.9" summary = "High level compatibility layer for multiple asynchronous event loop implementations" groups = ["doc"] dependencies = [ + "exceptiongroup>=1.0.2; python_version < \"3.11\"", "idna>=2.8", "sniffio>=1.1", "typing-extensions>=4.5; python_version < \"3.13\"", @@ -63,6 +70,7 @@ summary = "Seamlessly integrate pydantic models in your Sphinx documentation." groups = ["doc"] dependencies = [ "Sphinx>=4.0", + "importlib-metadata>1; python_version <= \"3.8\"", "pydantic-settings<3.0.0,>=2.0", "pydantic<3.0.0,>=2.0", ] @@ -76,6 +84,9 @@ version = "2.17.0" requires_python = ">=3.8" summary = "Internationalization utilities" groups = ["doc"] +dependencies = [ + "pytz>=2015.7; python_version < \"3.9\"", +] files = [ {file = "babel-2.17.0-py3-none-any.whl", hash = "sha256:4d0b53093fdfb4b21c92b5213dba5a1b23885afa8383709427046b21c366e5f2"}, {file = "babel-2.17.0.tar.gz", hash = "sha256:0c54cffb19f690cdcc52a3b50bcbf71e07a808d1c80d549f2459b9d2cf0afb9d"}, @@ -163,6 +174,7 @@ summary = "Composable command line interface toolkit" groups = ["default", "doc"] dependencies = [ "colorama; platform_system == \"Windows\"", + "importlib-metadata; python_version < \"3.8\"", ] files = [ {file = "click-8.1.8-py3-none-any.whl", hash = "sha256:63c132bbbed01578a06712a2d1f497bb62d9c1c0d329b7903a866228027263b2"}, @@ -217,7 +229,6 @@ files = [ {file = "coverage-7.7.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:7e688010581dbac9cab72800e9076e16f7cccd0d89af5785b70daa11174e94de"}, {file = "coverage-7.7.1-cp313-cp313t-win32.whl", hash = "sha256:e52eb31ae3afacdacfe50705a15b75ded67935770c460d88c215a9c0c40d0e9c"}, {file = "coverage-7.7.1-cp313-cp313t-win_amd64.whl", hash = "sha256:a6b6b3bd121ee2ec4bd35039319f3423d0be282b9752a5ae9f18724bc93ebe7c"}, - {file = "coverage-7.7.1-pp39.pp310.pp311-none-any.whl", hash = "sha256:5b7b02e50d54be6114cc4f6a3222fec83164f7c42772ba03b520138859b5fde1"}, {file = "coverage-7.7.1-py3-none-any.whl", hash = "sha256:822fa99dd1ac686061e1219b67868e25d9757989cf2259f735a4802497d6da31"}, {file = "coverage-7.7.1.tar.gz", hash = "sha256:199a1272e642266b90c9f40dec7fd3d307b51bf639fa0d15980dc0b3246c1393"}, ] @@ -282,6 +293,7 @@ dependencies = [ "appdirs>=1.4", "packaging>=24.0", "semver>=2.13", + "tomli>=2.0; python_version < \"3.11\"", "typing-extensions>=4.9; python_version < \"3.13\"", ] files = [ @@ -295,6 +307,9 @@ version = "0.14.0" requires_python = ">=3.7" summary = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" groups = ["doc"] +dependencies = [ + "typing-extensions; python_version < \"3.8\"", +] files = [ {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"}, {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, @@ -399,30 +414,6 @@ files = [ {file = "lxml-5.3.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:dbf7bebc2275016cddf3c997bf8a0f7044160714c64a9b83975670a04e6d2252"}, {file = "lxml-5.3.1-cp313-cp313-win32.whl", hash = "sha256:d0751528b97d2b19a388b302be2a0ee05817097bab46ff0ed76feeec24951f78"}, {file = "lxml-5.3.1-cp313-cp313-win_amd64.whl", hash = "sha256:91fb6a43d72b4f8863d21f347a9163eecbf36e76e2f51068d59cd004c506f332"}, - {file = "lxml-5.3.1-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:afa578b6524ff85fb365f454cf61683771d0170470c48ad9d170c48075f86725"}, - {file = "lxml-5.3.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:67f5e80adf0aafc7b5454f2c1cb0cde920c9b1f2cbd0485f07cc1d0497c35c5d"}, - {file = "lxml-5.3.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2dd0b80ac2d8f13ffc906123a6f20b459cb50a99222d0da492360512f3e50f84"}, - {file = "lxml-5.3.1-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:422c179022ecdedbe58b0e242607198580804253da220e9454ffe848daa1cfd2"}, - {file = "lxml-5.3.1-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:524ccfded8989a6595dbdda80d779fb977dbc9a7bc458864fc9a0c2fc15dc877"}, - {file = "lxml-5.3.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:48fd46bf7155def2e15287c6f2b133a2f78e2d22cdf55647269977b873c65499"}, - {file = "lxml-5.3.1-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:05123fad495a429f123307ac6d8fd6f977b71e9a0b6d9aeeb8f80c017cb17131"}, - {file = "lxml-5.3.1-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a243132767150a44e6a93cd1dde41010036e1cbc63cc3e9fe1712b277d926ce3"}, - {file = "lxml-5.3.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c92ea6d9dd84a750b2bae72ff5e8cf5fdd13e58dda79c33e057862c29a8d5b50"}, - {file = "lxml-5.3.1-pp37-pypy37_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:2f1be45d4c15f237209bbf123a0e05b5d630c8717c42f59f31ea9eae2ad89394"}, - {file = "lxml-5.3.1-pp37-pypy37_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:a83d3adea1e0ee36dac34627f78ddd7f093bb9cfc0a8e97f1572a949b695cb98"}, - {file = "lxml-5.3.1-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:3edbb9c9130bac05d8c3fe150c51c337a471cc7fdb6d2a0a7d3a88e88a829314"}, - {file = "lxml-5.3.1-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:2f23cf50eccb3255b6e913188291af0150d89dab44137a69e14e4dcb7be981f1"}, - {file = "lxml-5.3.1-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:df7e5edac4778127f2bf452e0721a58a1cfa4d1d9eac63bdd650535eb8543615"}, - {file = "lxml-5.3.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:094b28ed8a8a072b9e9e2113a81fda668d2053f2ca9f2d202c2c8c7c2d6516b1"}, - {file = "lxml-5.3.1-pp38-pypy38_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:514fe78fc4b87e7a7601c92492210b20a1b0c6ab20e71e81307d9c2e377c64de"}, - {file = "lxml-5.3.1-pp38-pypy38_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:8fffc08de02071c37865a155e5ea5fce0282e1546fd5bde7f6149fcaa32558ac"}, - {file = "lxml-5.3.1-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:4b0d5cdba1b655d5b18042ac9c9ff50bda33568eb80feaaca4fc237b9c4fbfde"}, - {file = "lxml-5.3.1-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:3031e4c16b59424e8d78522c69b062d301d951dc55ad8685736c3335a97fc270"}, - {file = "lxml-5.3.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cb659702a45136c743bc130760c6f137870d4df3a9e14386478b8a0511abcfca"}, - {file = "lxml-5.3.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5a11b16a33656ffc43c92a5343a28dc71eefe460bcc2a4923a96f292692709f6"}, - {file = "lxml-5.3.1-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:c5ae125276f254b01daa73e2c103363d3e99e3e10505686ac7d9d2442dd4627a"}, - {file = "lxml-5.3.1-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:c76722b5ed4a31ba103e0dc77ab869222ec36efe1a614e42e9bcea88a36186fe"}, - {file = "lxml-5.3.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:33e06717c00c788ab4e79bc4726ecc50c54b9bfb55355eae21473c145d83c2d2"}, {file = "lxml-5.3.1.tar.gz", hash = "sha256:106b7b5d2977b339f1e97efe2778e2ab20e99994cbb0ec5e55771ed0795920c8"}, ] @@ -513,6 +504,7 @@ summary = "Optional static typing for Python" groups = ["doc", "lint"] dependencies = [ "mypy-extensions>=1.0.0", + "tomli>=1.1.0; python_version < \"3.11\"", "typing-extensions>=4.6.0", ] files = [ @@ -706,24 +698,6 @@ files = [ {file = "pydantic_core-2.27.2-cp313-cp313-win32.whl", hash = "sha256:1ebaf1d0481914d004a573394f4be3a7616334be70261007e47c2a6fe7e50130"}, {file = "pydantic_core-2.27.2-cp313-cp313-win_amd64.whl", hash = "sha256:953101387ecf2f5652883208769a79e48db18c6df442568a0b5ccd8c2723abee"}, {file = "pydantic_core-2.27.2-cp313-cp313-win_arm64.whl", hash = "sha256:ac4dbfd1691affb8f48c2c13241a2e3b60ff23247cbcf981759c768b6633cf8b"}, - {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:2bf14caea37e91198329b828eae1618c068dfb8ef17bb33287a7ad4b61ac314e"}, - {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:b0cb791f5b45307caae8810c2023a184c74605ec3bcbb67d13846c28ff731ff8"}, - {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:688d3fd9fcb71f41c4c015c023d12a79d1c4c0732ec9eb35d96e3388a120dcf3"}, - {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d591580c34f4d731592f0e9fe40f9cc1b430d297eecc70b962e93c5c668f15f"}, - {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:82f986faf4e644ffc189a7f1aafc86e46ef70372bb153e7001e8afccc6e54133"}, - {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:bec317a27290e2537f922639cafd54990551725fc844249e64c523301d0822fc"}, - {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:0296abcb83a797db256b773f45773da397da75a08f5fcaef41f2044adec05f50"}, - {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:0d75070718e369e452075a6017fbf187f788e17ed67a3abd47fa934d001863d9"}, - {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:7e17b560be3c98a8e3aa66ce828bdebb9e9ac6ad5466fba92eb74c4c95cb1151"}, - {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:c33939a82924da9ed65dab5a65d427205a73181d8098e79b6b426bdf8ad4e656"}, - {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:00bad2484fa6bda1e216e7345a798bd37c68fb2d97558edd584942aa41b7d278"}, - {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c817e2b40aba42bac6f457498dacabc568c3b7a986fc9ba7c8d9d260b71485fb"}, - {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:251136cdad0cb722e93732cb45ca5299fb56e1344a833640bf93b2803f8d1bfd"}, - {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d2088237af596f0a524d3afc39ab3b036e8adb054ee57cbb1dcf8e09da5b29cc"}, - {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:d4041c0b966a84b4ae7a09832eb691a35aec90910cd2dbe7a208de59be77965b"}, - {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:8083d4e875ebe0b864ffef72a4304827015cff328a1be6e22cc850753bfb122b"}, - {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f141ee28a0ad2123b6611b6ceff018039df17f32ada8b534e6aa039545a3efb2"}, - {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:7d0c8399fcc1848491f00e0314bd59fb34a9c008761bcb422a057670c3f65e35"}, {file = "pydantic_core-2.27.2.tar.gz", hash = "sha256:eb026e5a4c1fee05726072337ff51d1efb6f59090b7da90d30ea58625b1ffb39"}, ] @@ -761,9 +735,11 @@ summary = "pytest: simple powerful testing with Python" groups = ["doc", "test"] dependencies = [ "colorama; sys_platform == \"win32\"", + "exceptiongroup>=1.0.0rc8; python_version < \"3.11\"", "iniconfig", "packaging", "pluggy<2,>=1.5", + "tomli>=1; python_version < \"3.11\"", ] files = [ {file = "pytest-8.3.5-py3-none-any.whl", hash = "sha256:c69214aa47deac29fad6c2a4f590b9c4a9fdb16a403176fe154b79c0b4d4d820"}, @@ -835,6 +811,7 @@ groups = ["default"] dependencies = [ "markdown-it-py>=2.2.0", "pygments<3.0.0,>=2.13.0", + "typing-extensions<5.0,>=4.0.0; python_version < \"3.11\"", ] files = [ {file = "rich-13.9.4-py3-none-any.whl", hash = "sha256:6049d5e6ec054bf2779ab3358186963bac2ea89175919d699e378b99738c2a90"}, @@ -1127,6 +1104,7 @@ summary = "The little ASGI library that shines." groups = ["doc"] dependencies = [ "anyio<5,>=3.6.2", + "typing-extensions>=3.10.0; python_version < \"3.10\"", ] files = [ {file = "starlette-0.46.1-py3-none-any.whl", hash = "sha256:77c74ed9d2720138b25875133f3a2dae6d854af2ec37dceb56aef370c1d8a227"}, @@ -1221,6 +1199,7 @@ groups = ["doc"] dependencies = [ "click>=7.0", "h11>=0.8", + "typing-extensions>=4.0; python_version < \"3.11\"", ] files = [ {file = "uvicorn-0.34.0-py3-none-any.whl", hash = "sha256:023dc038422502fa28a09c7a30bf2b6991512da7dcdb8fd35fe57cfc154126f4"}, @@ -1236,6 +1215,7 @@ groups = ["pre-commit"] dependencies = [ "distlib<1,>=0.3.7", "filelock<4,>=3.12.2", + "importlib-metadata>=6.6; python_version < \"3.8\"", "platformdirs<5,>=3.9.1", ] files = [ @@ -1278,14 +1258,6 @@ files = [ {file = "watchfiles-1.0.4-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:308ac265c56f936636e3b0e3f59e059a40003c655228c131e1ad439957592303"}, {file = "watchfiles-1.0.4-cp313-cp313-win32.whl", hash = "sha256:aee397456a29b492c20fda2d8961e1ffb266223625346ace14e4b6d861ba9c80"}, {file = "watchfiles-1.0.4-cp313-cp313-win_amd64.whl", hash = "sha256:d6097538b0ae5c1b88c3b55afa245a66793a8fec7ada6755322e465fb1a0e8cc"}, - {file = "watchfiles-1.0.4-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:cdcc92daeae268de1acf5b7befcd6cfffd9a047098199056c72e4623f531de18"}, - {file = "watchfiles-1.0.4-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:d8d3d9203705b5797f0af7e7e5baa17c8588030aaadb7f6a86107b7247303817"}, - {file = "watchfiles-1.0.4-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bdef5a1be32d0b07dcea3318a0be95d42c98ece24177820226b56276e06b63b0"}, - {file = "watchfiles-1.0.4-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:342622287b5604ddf0ed2d085f3a589099c9ae8b7331df3ae9845571586c4f3d"}, - {file = "watchfiles-1.0.4-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:9fe37a2de80aa785d340f2980276b17ef697ab8db6019b07ee4fd28a8359d2f3"}, - {file = "watchfiles-1.0.4-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:9d1ef56b56ed7e8f312c934436dea93bfa3e7368adfcf3df4c0da6d4de959a1e"}, - {file = "watchfiles-1.0.4-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:95b42cac65beae3a362629950c444077d1b44f1790ea2772beaea95451c086bb"}, - {file = "watchfiles-1.0.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5e0227b8ed9074c6172cf55d85b5670199c99ab11fd27d2c473aa30aec67ee42"}, {file = "watchfiles-1.0.4.tar.gz", hash = "sha256:6ba473efd11062d73e4f00c2b730255f9c1bdd73cd5f9fe5b5da8dbd4a717205"}, ] @@ -1318,18 +1290,6 @@ files = [ {file = "websockets-15.0.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:558d023b3df0bffe50a04e710bc87742de35060580a293c2a984299ed83bc4e4"}, {file = "websockets-15.0.1-cp313-cp313-win32.whl", hash = "sha256:ba9e56e8ceeeedb2e080147ba85ffcd5cd0711b89576b83784d8605a7df455fa"}, {file = "websockets-15.0.1-cp313-cp313-win_amd64.whl", hash = "sha256:e09473f095a819042ecb2ab9465aee615bd9c2028e4ef7d933600a8401c79561"}, - {file = "websockets-15.0.1-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:0c9e74d766f2818bb95f84c25be4dea09841ac0f734d1966f415e4edfc4ef1c3"}, - {file = "websockets-15.0.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:1009ee0c7739c08a0cd59de430d6de452a55e42d6b522de7aa15e6f67db0b8e1"}, - {file = "websockets-15.0.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:76d1f20b1c7a2fa82367e04982e708723ba0e7b8d43aa643d3dcd404d74f1475"}, - {file = "websockets-15.0.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f29d80eb9a9263b8d109135351caf568cc3f80b9928bccde535c235de55c22d9"}, - {file = "websockets-15.0.1-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b359ed09954d7c18bbc1680f380c7301f92c60bf924171629c5db97febb12f04"}, - {file = "websockets-15.0.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:cad21560da69f4ce7658ca2cb83138fb4cf695a2ba3e475e0559e05991aa8122"}, - {file = "websockets-15.0.1-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:7f493881579c90fc262d9cdbaa05a6b54b3811c2f300766748db79f098db9940"}, - {file = "websockets-15.0.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:47b099e1f4fbc95b701b6e85768e1fcdaf1630f3cbe4765fa216596f12310e2e"}, - {file = "websockets-15.0.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:67f2b6de947f8c757db2db9c71527933ad0019737ec374a8a6be9a956786aaf9"}, - {file = "websockets-15.0.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d08eb4c2b7d6c41da6ca0600c077e93f5adcfd979cd777d747e9ee624556da4b"}, - {file = "websockets-15.0.1-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4b826973a4a2ae47ba357e4e82fa44a463b8f168e1ca775ac64521442b19e87f"}, - {file = "websockets-15.0.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:21c1fa28a6a7e3cbdc171c694398b6df4744613ce9b36b1a498e816787e28123"}, {file = "websockets-15.0.1-py3-none-any.whl", hash = "sha256:f7a866fbc1e97b5c617ee4116daaa09b722101d4a3c170c787450ba409f9736f"}, {file = "websockets-15.0.1.tar.gz", hash = "sha256:82544de02076bafba038ce055ee6412d68da13ab47f0c60cab827346de828dee"}, ] From 45801827e2088ffd6da037e048736df215a23296 Mon Sep 17 00:00:00 2001 From: Joseph Chiocchi Date: Fri, 21 Mar 2025 14:28:48 -0500 Subject: [PATCH 07/21] update functions for docstrings --- src/pkg-core/mycore/__init__.py | 5 +++++ src/pkg-first/myfirst/__init__.py | 1 + src/pkg-second/mysecond/__init__.py | 1 + src/pkg-third/pkg_third/__init__.py | 1 + src/precommit_ci_test/settings.py | 1 + 5 files changed, 9 insertions(+) diff --git a/src/pkg-core/mycore/__init__.py b/src/pkg-core/mycore/__init__.py index 5e725d2..8f3047b 100644 --- a/src/pkg-core/mycore/__init__.py +++ b/src/pkg-core/mycore/__init__.py @@ -1,8 +1,13 @@ +"""Core package.""" + + def greet(name: str) -> str: + """Greet function.""" return f"Hello {name}!" def fib(n: int) -> int: + """Fib function.""" if n < 2: return n return fib(n - 1) + fib(n - 2) diff --git a/src/pkg-first/myfirst/__init__.py b/src/pkg-first/myfirst/__init__.py index 1f41c1d..962f7e4 100644 --- a/src/pkg-first/myfirst/__init__.py +++ b/src/pkg-first/myfirst/__init__.py @@ -1,3 +1,4 @@ +"""Package first.""" from mycore import greet if __name__ == "__main__": diff --git a/src/pkg-second/mysecond/__init__.py b/src/pkg-second/mysecond/__init__.py index 1decd02..05f7a10 100644 --- a/src/pkg-second/mysecond/__init__.py +++ b/src/pkg-second/mysecond/__init__.py @@ -1,3 +1,4 @@ +"""Package second.""" from mycore import greet if __name__ == "__main__": diff --git a/src/pkg-third/pkg_third/__init__.py b/src/pkg-third/pkg_third/__init__.py index 4671106..2c9a7d9 100644 --- a/src/pkg-third/pkg_third/__init__.py +++ b/src/pkg-third/pkg_third/__init__.py @@ -1,3 +1,4 @@ +"""Package Third.""" from art import text2art from mycore import greet diff --git a/src/precommit_ci_test/settings.py b/src/precommit_ci_test/settings.py index 6303f6e..2a009e6 100644 --- a/src/precommit_ci_test/settings.py +++ b/src/precommit_ci_test/settings.py @@ -2,6 +2,7 @@ import logging from logging import getLevelName +from typing import Optional from pydantic_settings import BaseSettings, SettingsConfigDict From d44c25c8de99bbaccfccda60f73f6f11a20eba0d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 21 Mar 2025 19:29:28 +0000 Subject: [PATCH 08/21] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/pkg-first/myfirst/__init__.py | 1 + src/pkg-second/mysecond/__init__.py | 1 + src/pkg-third/pkg_third/__init__.py | 1 + src/precommit_ci_test/settings.py | 3 +-- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pkg-first/myfirst/__init__.py b/src/pkg-first/myfirst/__init__.py index 962f7e4..bf13da2 100644 --- a/src/pkg-first/myfirst/__init__.py +++ b/src/pkg-first/myfirst/__init__.py @@ -1,4 +1,5 @@ """Package first.""" + from mycore import greet if __name__ == "__main__": diff --git a/src/pkg-second/mysecond/__init__.py b/src/pkg-second/mysecond/__init__.py index 05f7a10..0d7eddb 100644 --- a/src/pkg-second/mysecond/__init__.py +++ b/src/pkg-second/mysecond/__init__.py @@ -1,4 +1,5 @@ """Package second.""" + from mycore import greet if __name__ == "__main__": diff --git a/src/pkg-third/pkg_third/__init__.py b/src/pkg-third/pkg_third/__init__.py index 2c9a7d9..9cf6cb6 100644 --- a/src/pkg-third/pkg_third/__init__.py +++ b/src/pkg-third/pkg_third/__init__.py @@ -1,4 +1,5 @@ """Package Third.""" + from art import text2art from mycore import greet diff --git a/src/precommit_ci_test/settings.py b/src/precommit_ci_test/settings.py index 2a009e6..7189bca 100644 --- a/src/precommit_ci_test/settings.py +++ b/src/precommit_ci_test/settings.py @@ -2,7 +2,6 @@ import logging from logging import getLevelName -from typing import Optional from pydantic_settings import BaseSettings, SettingsConfigDict @@ -17,7 +16,7 @@ class GlobalSettings(BaseSettings): class Settings(BaseSettings): """Project specific settings.""" - logging_level: Optional[str] = getLevelName(logging.INFO) + logging_level: str | None = getLevelName(logging.INFO) """Default logging level for the project.""" model_config = SettingsConfigDict( From b5fe6e005b6db8fa6303aae39ef4cd0d73c02977 Mon Sep 17 00:00:00 2001 From: Joseph Chiocchi Date: Fri, 21 Mar 2025 14:30:50 -0500 Subject: [PATCH 09/21] add docstring, intentional malformat --- src/pkg-fourth/pkg_fourth/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pkg-fourth/pkg_fourth/__init__.py b/src/pkg-fourth/pkg_fourth/__init__.py index 4671106..3c1bef5 100644 --- a/src/pkg-fourth/pkg_fourth/__init__.py +++ b/src/pkg-fourth/pkg_fourth/__init__.py @@ -1,3 +1,4 @@ +"""Package fourth.""" from art import text2art from mycore import greet From 2d8282782c7868228cae5f3314e4dc52ceea9173 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 21 Mar 2025 19:31:26 +0000 Subject: [PATCH 10/21] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/pkg-fourth/pkg_fourth/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pkg-fourth/pkg_fourth/__init__.py b/src/pkg-fourth/pkg_fourth/__init__.py index 3c1bef5..be68fc0 100644 --- a/src/pkg-fourth/pkg_fourth/__init__.py +++ b/src/pkg-fourth/pkg_fourth/__init__.py @@ -1,4 +1,5 @@ """Package fourth.""" + from art import text2art from mycore import greet From 56e2a764433b0f4bdc89ed19bc25e327dca9635f Mon Sep 17 00:00:00 2001 From: Joseph Chiocchi Date: Mon, 24 Mar 2025 13:39:59 -0500 Subject: [PATCH 11/21] Revert "[pre-commit.ci] auto fixes from pre-commit.com hooks" for testing This reverts commit d44c25c8de99bbaccfccda60f73f6f11a20eba0d. --- src/pkg-first/myfirst/__init__.py | 1 - src/pkg-second/mysecond/__init__.py | 1 - src/pkg-third/pkg_third/__init__.py | 1 - src/precommit_ci_test/settings.py | 3 ++- 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/pkg-first/myfirst/__init__.py b/src/pkg-first/myfirst/__init__.py index bf13da2..962f7e4 100644 --- a/src/pkg-first/myfirst/__init__.py +++ b/src/pkg-first/myfirst/__init__.py @@ -1,5 +1,4 @@ """Package first.""" - from mycore import greet if __name__ == "__main__": diff --git a/src/pkg-second/mysecond/__init__.py b/src/pkg-second/mysecond/__init__.py index 0d7eddb..05f7a10 100644 --- a/src/pkg-second/mysecond/__init__.py +++ b/src/pkg-second/mysecond/__init__.py @@ -1,5 +1,4 @@ """Package second.""" - from mycore import greet if __name__ == "__main__": diff --git a/src/pkg-third/pkg_third/__init__.py b/src/pkg-third/pkg_third/__init__.py index 9cf6cb6..2c9a7d9 100644 --- a/src/pkg-third/pkg_third/__init__.py +++ b/src/pkg-third/pkg_third/__init__.py @@ -1,5 +1,4 @@ """Package Third.""" - from art import text2art from mycore import greet diff --git a/src/precommit_ci_test/settings.py b/src/precommit_ci_test/settings.py index 7189bca..2a009e6 100644 --- a/src/precommit_ci_test/settings.py +++ b/src/precommit_ci_test/settings.py @@ -2,6 +2,7 @@ import logging from logging import getLevelName +from typing import Optional from pydantic_settings import BaseSettings, SettingsConfigDict @@ -16,7 +17,7 @@ class GlobalSettings(BaseSettings): class Settings(BaseSettings): """Project specific settings.""" - logging_level: str | None = getLevelName(logging.INFO) + logging_level: Optional[str] = getLevelName(logging.INFO) """Default logging level for the project.""" model_config = SettingsConfigDict( From a839ac5910ba0a800efd007b08c312f90b0d679a Mon Sep 17 00:00:00 2001 From: Joseph Chiocchi Date: Mon, 24 Mar 2025 13:40:27 -0500 Subject: [PATCH 12/21] update .pre-commit-config, see if pre-commit default install required --- .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 eb12852..fd50ebc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -51,7 +51,7 @@ default_install_hook_types: - post-checkout - post-merge - - pre-commit + # - pre-commit - pre-push default_stages: - manual From 4bfb5a349ee3810ad588cea7efa75413fd403d5a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 24 Mar 2025 18:41:29 +0000 Subject: [PATCH 13/21] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/pkg-first/myfirst/__init__.py | 1 + src/pkg-second/mysecond/__init__.py | 1 + src/pkg-third/pkg_third/__init__.py | 1 + src/precommit_ci_test/settings.py | 3 +-- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pkg-first/myfirst/__init__.py b/src/pkg-first/myfirst/__init__.py index 962f7e4..bf13da2 100644 --- a/src/pkg-first/myfirst/__init__.py +++ b/src/pkg-first/myfirst/__init__.py @@ -1,4 +1,5 @@ """Package first.""" + from mycore import greet if __name__ == "__main__": diff --git a/src/pkg-second/mysecond/__init__.py b/src/pkg-second/mysecond/__init__.py index 05f7a10..0d7eddb 100644 --- a/src/pkg-second/mysecond/__init__.py +++ b/src/pkg-second/mysecond/__init__.py @@ -1,4 +1,5 @@ """Package second.""" + from mycore import greet if __name__ == "__main__": diff --git a/src/pkg-third/pkg_third/__init__.py b/src/pkg-third/pkg_third/__init__.py index 2c9a7d9..9cf6cb6 100644 --- a/src/pkg-third/pkg_third/__init__.py +++ b/src/pkg-third/pkg_third/__init__.py @@ -1,4 +1,5 @@ """Package Third.""" + from art import text2art from mycore import greet diff --git a/src/precommit_ci_test/settings.py b/src/precommit_ci_test/settings.py index 2a009e6..7189bca 100644 --- a/src/precommit_ci_test/settings.py +++ b/src/precommit_ci_test/settings.py @@ -2,7 +2,6 @@ import logging from logging import getLevelName -from typing import Optional from pydantic_settings import BaseSettings, SettingsConfigDict @@ -17,7 +16,7 @@ class GlobalSettings(BaseSettings): class Settings(BaseSettings): """Project specific settings.""" - logging_level: Optional[str] = getLevelName(logging.INFO) + logging_level: str | None = getLevelName(logging.INFO) """Default logging level for the project.""" model_config = SettingsConfigDict( From e589efeab842928fe1943eda1b5b16f9c670962a Mon Sep 17 00:00:00 2001 From: Joseph Chiocchi Date: Mon, 24 Mar 2025 13:51:17 -0500 Subject: [PATCH 14/21] test local task --- .github/CODEOWNERS | 7 +++++++ .pre-commit-config.yaml | 7 +++++++ tasks/codeowners_sort.py | 41 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 .github/CODEOWNERS create mode 100755 tasks/codeowners_sort.py diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..734aa5f --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,7 @@ +z +d +f +g +a +b +c diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fd50ebc..58c7a6b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -98,8 +98,15 @@ repos: hooks: - id: pdm-sync - id: pdm-lock-check + - repo: local hooks: + - id: codeowners-sort + name: codeowners-sort + language: python + entry: ./tasks/codeowners_sort.py + pass_filenames: false + files: ".github/CODEOWNERS" # - id: pdm-sync # name: pdm-sync # entry: pdm sync diff --git a/tasks/codeowners_sort.py b/tasks/codeowners_sort.py new file mode 100755 index 0000000..fe225aa --- /dev/null +++ b/tasks/codeowners_sort.py @@ -0,0 +1,41 @@ +#!/usr/bin/env python +"""Sort the CODEOWNERS file for lexicographic order. + +Usage: + + pdm run codeowners_sort +""" + +import os + +from pathlib import Path + + +PROJECT_ROOT = Path(os.getenv("PDM_PROJECT_ROOT", ".")) + +if __name__ == "__main__": + # We can leverage PDM_PROJECT_ROOT here. + codeowners_file = PROJECT_ROOT / Path(".github/CODEOWNERS") + content = codeowners_file.read_text() + new_content = [] + for line in content.splitlines(): + # Ignore commented lines + if line.startswith("#"): + new_content.append(line) + continue + # Ignore blank lines + if len(line) == 0: + new_content.append(line) + continue + # The path is the rule at the first field, members are everything after + rule, *members = line.split() + # Remake the line with the rule and the sorted members + new_line = " ".join([rule, *sorted(members)]) + new_content.append(new_line) + # Rejoin all the lines, separated by newlines that were stripped + new_text = "\n".join(new_content) + # Add new line at end of file if it doesn't exist + if not new_text.endswith("\n"): + new_text += "\n" + # Finally write the file. + codeowners_file.write_text(new_text) From 7a61be8e3498a963f401dfad99e1ce664e101619 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 24 Mar 2025 18:51:41 +0000 Subject: [PATCH 15/21] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .pre-commit-config.yaml | 102 +++++++++++++++++++-------------------- tasks/codeowners_sort.py | 2 - 2 files changed, 51 insertions(+), 53 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 58c7a6b..f152a64 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -48,57 +48,6 @@ # # entry: ./tasks/update_submodules.py # # language: python -default_install_hook_types: - - post-checkout - - post-merge - # - pre-commit - - pre-push -default_stages: - - manual - - pre-push - - pre-commit -repos: - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 - hooks: - - id: check-added-large-files - - id: check-docstring-first - - id: check-merge-conflict - args: - - '--assume-in-merge' - - id: check-toml - - id: check-xml - - id: check-yaml - - id: end-of-file-fixer - - id: forbid-new-submodules - - id: mixed-line-ending - - id: name-tests-test - - id: no-commit-to-branch - stages: - - pre-push - - id: sort-simple-yaml - files: .pre-commit-config.yaml - - id: trailing-whitespace - - repo: https://github.com/pappasam/toml-sort - rev: v0.24.2 - hooks: - - id: toml-sort-fix - - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.11.2 - hooks: - - id: ruff - args: [ --fix ] - # Avoid running on jypter notebooks - types_or: [ python, pyi ] - - id: ruff-format - # Avoid running on jypter notebooks - types_or: [ python, pyi ] - - repo: https://github.com/pdm-project/pdm - rev: 2.22.4 - hooks: - - id: pdm-sync - - id: pdm-lock-check - - repo: local hooks: - id: codeowners-sort @@ -157,3 +106,54 @@ repos: entry: found Copier update rejection files; review them and remove them language: fail files: \.rej$ + +default_install_hook_types: + - post-checkout + - post-merge + # - pre-commit + - pre-push +default_stages: + - manual + - pre-push + - pre-commit +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v5.0.0 + hooks: + - id: check-added-large-files + - id: check-docstring-first + - id: check-merge-conflict + args: + - '--assume-in-merge' + - id: check-toml + - id: check-xml + - id: check-yaml + - id: end-of-file-fixer + - id: forbid-new-submodules + - id: mixed-line-ending + - id: name-tests-test + - id: no-commit-to-branch + stages: + - pre-push + - id: sort-simple-yaml + files: .pre-commit-config.yaml + - id: trailing-whitespace + - repo: https://github.com/pappasam/toml-sort + rev: v0.24.2 + hooks: + - id: toml-sort-fix + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.11.2 + hooks: + - id: ruff + args: [ --fix ] + # Avoid running on jypter notebooks + types_or: [ python, pyi ] + - id: ruff-format + # Avoid running on jypter notebooks + types_or: [ python, pyi ] + - repo: https://github.com/pdm-project/pdm + rev: 2.22.4 + hooks: + - id: pdm-sync + - id: pdm-lock-check diff --git a/tasks/codeowners_sort.py b/tasks/codeowners_sort.py index fe225aa..5f2ebb2 100755 --- a/tasks/codeowners_sort.py +++ b/tasks/codeowners_sort.py @@ -7,10 +7,8 @@ """ import os - from pathlib import Path - PROJECT_ROOT = Path(os.getenv("PDM_PROJECT_ROOT", ".")) if __name__ == "__main__": From 0324466508e81cf1c9d62028617fc9e3cf4706dc Mon Sep 17 00:00:00 2001 From: Joseph Chiocchi Date: Mon, 24 Mar 2025 13:53:25 -0500 Subject: [PATCH 16/21] update .pre-commit config --- .pre-commit-config.yaml | 102 ++++++++++++++++++++-------------------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f152a64..a3be1dd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -48,6 +48,57 @@ # # entry: ./tasks/update_submodules.py # # language: python + +default_install_hook_types: + - post-checkout + - post-merge + # - pre-commit + - pre-push +default_stages: + - manual + - pre-push + - pre-commit +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v5.0.0 + hooks: + - id: check-added-large-files + - id: check-docstring-first + - id: check-merge-conflict + args: + - '--assume-in-merge' + - id: check-toml + - id: check-xml + - id: check-yaml + - id: end-of-file-fixer + - id: forbid-new-submodules + - id: mixed-line-ending + - id: name-tests-test + - id: no-commit-to-branch + stages: + - pre-push + - id: sort-simple-yaml + files: .pre-commit-config.yaml + - id: trailing-whitespace + - repo: https://github.com/pappasam/toml-sort + rev: v0.24.2 + hooks: + - id: toml-sort-fix + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.11.2 + hooks: + - id: ruff + args: [ --fix ] + # Avoid running on jypter notebooks + types_or: [ python, pyi ] + - id: ruff-format + # Avoid running on jypter notebooks + types_or: [ python, pyi ] + - repo: https://github.com/pdm-project/pdm + rev: 2.22.4 + hooks: + - id: pdm-sync + - id: pdm-lock-check - repo: local hooks: - id: codeowners-sort @@ -106,54 +157,3 @@ entry: found Copier update rejection files; review them and remove them language: fail files: \.rej$ - -default_install_hook_types: - - post-checkout - - post-merge - # - pre-commit - - pre-push -default_stages: - - manual - - pre-push - - pre-commit -repos: - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 - hooks: - - id: check-added-large-files - - id: check-docstring-first - - id: check-merge-conflict - args: - - '--assume-in-merge' - - id: check-toml - - id: check-xml - - id: check-yaml - - id: end-of-file-fixer - - id: forbid-new-submodules - - id: mixed-line-ending - - id: name-tests-test - - id: no-commit-to-branch - stages: - - pre-push - - id: sort-simple-yaml - files: .pre-commit-config.yaml - - id: trailing-whitespace - - repo: https://github.com/pappasam/toml-sort - rev: v0.24.2 - hooks: - - id: toml-sort-fix - - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.11.2 - hooks: - - id: ruff - args: [ --fix ] - # Avoid running on jypter notebooks - types_or: [ python, pyi ] - - id: ruff-format - # Avoid running on jypter notebooks - types_or: [ python, pyi ] - - repo: https://github.com/pdm-project/pdm - rev: 2.22.4 - hooks: - - id: pdm-sync - - id: pdm-lock-check From 938bf387b99fd6e9b6e8056ca3da279f0d3d4cec Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 24 Mar 2025 18:53:38 +0000 Subject: [PATCH 17/21] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .pre-commit-config.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a3be1dd..62422f5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -48,7 +48,6 @@ # # entry: ./tasks/update_submodules.py # # language: python - default_install_hook_types: - post-checkout - post-merge From 0b0e61d98ccefc61247bef805de643d287319c9c Mon Sep 17 00:00:00 2001 From: Joseph Chiocchi Date: Mon, 24 Mar 2025 13:54:40 -0500 Subject: [PATCH 18/21] update CODEOWNERS --- .github/CODEOWNERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 734aa5f..3242ac7 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,7 +1,7 @@ z d -f +f apple cat g -a +a cat apple b c From 0f6b41823314ce52baba6938e1ffc13b976b712e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 24 Mar 2025 18:55:07 +0000 Subject: [PATCH 19/21] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 3242ac7..365d5fc 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -2,6 +2,6 @@ z d f apple cat g -a cat apple +a apple cat b c From d83c8425a879febd33583f9d9c898097212cfc13 Mon Sep 17 00:00:00 2001 From: Joseph Chiocchi Date: Tue, 25 Mar 2025 12:48:23 -0500 Subject: [PATCH 20/21] intentional unsort --- pyproject.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index b337a3d..4e49705 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,13 +69,13 @@ distribution = true doc = [ "Sphinx", "autodoc-pydantic", + "myst-parser", + "pytest", + "sphinx-autobuild", "coverage", "furo", "git-changelog", "mypy[reports]", - "myst-parser", - "pytest", - "sphinx-autobuild", "sphinx-click", "sphinx-design", "sphinx-togglebutton", From 3cc647c769649db4deca11d931681529e5ba24fd Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 25 Mar 2025 17:48:39 +0000 Subject: [PATCH 21/21] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pyproject.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4e49705..b337a3d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,13 +69,13 @@ distribution = true doc = [ "Sphinx", "autodoc-pydantic", - "myst-parser", - "pytest", - "sphinx-autobuild", "coverage", "furo", "git-changelog", "mypy[reports]", + "myst-parser", + "pytest", + "sphinx-autobuild", "sphinx-click", "sphinx-design", "sphinx-togglebutton",