diff --git a/.config/constraints.txt b/.config/constraints.txt index a32cb6a836..9caa915ad5 100644 --- a/.config/constraints.txt +++ b/.config/constraints.txt @@ -1,127 +1,123 @@ -# -# This file is autogenerated by pip-compile with Python 3.10 -# by the following command: -# -# pip-compile --all-extras --no-annotate --output-file=.config/constraints.txt --strip-extras --unsafe-package=resolvelib --unsafe-package=ruamel-yaml-clib --unsafe-package=wcmatch pyproject.toml -# -ansible-compat==24.9.1 -ansible-core==2.17.6 -astroid==3.3.5 -attrs==24.2.0 -babel==2.16.0 -beautifulsoup4==4.12.3 -black==24.10.0 -boolean-py==4.0 -bracex==2.5.post1 -cachetools==5.5.0 -cairocffi==1.7.1 -cairosvg==2.7.1 -certifi==2024.8.30 -cffi==1.17.1 -chardet==5.2.0 -charset-normalizer==3.4.0 -click==8.1.7 -colorama==0.4.6 -coverage==7.6.4 -coverage-enable-subprocess==1.0 -cryptography==43.0.3 -csscompressor==0.9.5 -cssselect2==0.7.0 -defusedxml==0.7.1 -dill==0.3.9 -distlib==0.3.9 -dnspython==2.7.0 -exceptiongroup==1.2.2 -execnet==2.1.1 -filelock==3.16.1 -ghp-import==2.1.0 -griffe==1.5.1 -hjson==3.1.0 -htmlmin2==0.1.13 -idna==3.10 -importlib-metadata==8.5.0 -iniconfig==2.0.0 -isort==5.13.2 -jinja2==3.1.4 -jmespath==1.0.1 -jsmin==3.0.1 -jsonschema==4.23.0 -jsonschema-specifications==2024.10.1 -license-expression==30.4.0 -linkchecker==10.5.0 -markdown==3.7 -markdown-exec==1.9.3 -markdown-include==0.8.1 -markdown-it-py==3.0.0 -markupsafe==3.0.2 -mccabe==0.7.0 -mdurl==0.1.2 -mergedeep==1.3.4 -mkdocs==1.6.1 -mkdocs-ansible==24.3.1 -mkdocs-autorefs==1.2.0 -mkdocs-gen-files==0.5.0 -mkdocs-get-deps==0.2.0 -mkdocs-htmlproofer-plugin==1.3.0 -mkdocs-macros-plugin==1.3.7 -mkdocs-material==9.5.43 -mkdocs-material-extensions==1.3.1 -mkdocs-minify-plugin==0.8.0 -mkdocs-monorepo-plugin==1.1.0 -mkdocstrings==0.26.2 -mkdocstrings-python==1.12.2 -mypy==1.13.0 -mypy-extensions==1.0.0 -netaddr==1.3.0 -packaging==24.1 -paginate==0.5.7 -pathspec==0.12.1 -pillow==11.0.0 -pip==24.3.1 -pipdeptree==2.23.4 -platformdirs==4.3.6 -pluggy==1.5.0 -psutil==6.1.0 -pycparser==2.22 -pygments==2.18.0 -pylint==3.3.1 -pymdown-extensions==10.12 -pyproject-api==1.8.0 -pytest==8.3.3 -pytest-mock==3.14.0 -pytest-plus==0.7.0 -pytest-xdist==3.6.1 -python-dateutil==2.9.0.post0 -python-slugify==8.0.4 -pyyaml==6.0.2 -pyyaml-env-tag==0.1 -referencing==0.35.1 -regex==2024.9.11 -requests==2.32.3 -rich==13.9.4 -rpds-py==0.20.1 -ruamel-yaml==0.18.6 -six==1.16.0 -soupsieve==2.6 -subprocess-tee==0.4.2 -super-collections==0.5.3 -termcolor==2.5.0 -text-unidecode==1.3 -tinycss2==1.4.0 -tomli==2.0.2 -tomlkit==0.13.2 -tox==4.23.2 -types-jsonschema==4.23.0.20240813 -types-pyyaml==6.0.12.20240917 -typing-extensions==4.12.2 -urllib3==2.2.3 -virtualenv==20.27.1 -watchdog==6.0.0 -webencodings==0.5.1 -yamllint==1.35.1 -zipp==3.20.2 +# This file was autogenerated by uv via the following command: +# tox run deps +ansible-compat==24.9.1 # via ansible-lint (pyproject.toml) +astroid==3.3.5 # via pylint +attrs==24.2.0 # via jsonschema, referencing +babel==2.16.0 # via mkdocs-material +beautifulsoup4==4.12.3 # via linkchecker, mkdocs-htmlproofer-plugin +black==24.10.0 # via ansible-lint (pyproject.toml) +boolean-py==4.0 # via license-expression +bracex==2.5.post1 # via wcmatch +cachetools==5.5.0 # via tox +cairocffi==1.7.1 # via cairosvg +cairosvg==2.7.1 # via mkdocs-ansible +certifi==2024.8.30 # via requests +cffi==1.17.1 # via cairocffi, cryptography +chardet==5.2.0 # via tox +charset-normalizer==3.4.0 # via requests +click==8.1.7 # via black, mkdocs, mkdocstrings +colorama==0.4.6 # via griffe, mkdocs-material, tox +coverage==7.6.4 # via coverage-enable-subprocess, ansible-lint (pyproject.toml) +coverage-enable-subprocess==1.0 # via ansible-lint (pyproject.toml) +cryptography==43.0.3 # via ansible-core +csscompressor==0.9.5 # via mkdocs-minify-plugin +cssselect2==0.7.0 # via cairosvg +defusedxml==0.7.1 # via cairosvg +dill==0.3.9 # via pylint +distlib==0.3.9 # via virtualenv +dnspython==2.7.0 # via linkchecker +exceptiongroup==1.2.2 # via pytest +execnet==2.1.1 # via pytest-xdist +filelock==3.16.1 # via tox, virtualenv, ansible-lint (pyproject.toml) +ghp-import==2.1.0 # via mkdocs +griffe==1.5.1 # via mkdocstrings-python +hjson==3.1.0 # via mkdocs-macros-plugin, super-collections +htmlmin2==0.1.13 # via mkdocs-minify-plugin +idna==3.10 # via requests +importlib-metadata==8.5.0 # via ansible-lint (pyproject.toml) +iniconfig==2.0.0 # via pytest +isort==5.13.2 # via pylint +jinja2==3.1.4 # via ansible-core, mkdocs, mkdocs-macros-plugin, mkdocs-material, mkdocstrings +jmespath==1.0.1 # via ansible-lint (pyproject.toml) +jsmin==3.0.1 # via mkdocs-minify-plugin +jsonschema==4.23.0 # via ansible-compat, ansible-lint (pyproject.toml) +jsonschema-specifications==2024.10.1 # via jsonschema +license-expression==30.4.0 # via ansible-lint (pyproject.toml) +linkchecker==10.5.0 # via mkdocs-ansible +markdown==3.7 # via markdown-include, mkdocs, mkdocs-autorefs, mkdocs-htmlproofer-plugin, mkdocs-material, mkdocstrings, pymdown-extensions +markdown-exec==1.9.3 # via mkdocs-ansible +markdown-include==0.8.1 # via mkdocs-ansible +markdown-it-py==3.0.0 # via rich +markupsafe==3.0.2 # via jinja2, mkdocs, mkdocs-autorefs, mkdocstrings +mccabe==0.7.0 # via pylint +mdurl==0.1.2 # via markdown-it-py +mergedeep==1.3.4 # via mkdocs, mkdocs-get-deps +mkdocs==1.6.1 # via mkdocs-ansible, mkdocs-autorefs, mkdocs-gen-files, mkdocs-htmlproofer-plugin, mkdocs-macros-plugin, mkdocs-material, mkdocs-minify-plugin, mkdocs-monorepo-plugin, mkdocstrings +mkdocs-ansible==24.3.1 # via ansible-lint (pyproject.toml) +mkdocs-autorefs==1.2.0 # via mkdocstrings, mkdocstrings-python +mkdocs-gen-files==0.5.0 # via mkdocs-ansible +mkdocs-get-deps==0.2.0 # via mkdocs +mkdocs-htmlproofer-plugin==1.3.0 # via mkdocs-ansible +mkdocs-macros-plugin==1.3.7 # via mkdocs-ansible +mkdocs-material==9.5.44 # via mkdocs-ansible +mkdocs-material-extensions==1.3.1 # via mkdocs-ansible, mkdocs-material +mkdocs-minify-plugin==0.8.0 # via mkdocs-ansible +mkdocs-monorepo-plugin==1.1.0 # via mkdocs-ansible +mkdocstrings==0.26.2 # via mkdocs-ansible, mkdocstrings-python +mkdocstrings-python==1.12.2 # via mkdocs-ansible +mypy==1.13.0 # via ansible-lint (pyproject.toml) +mypy-extensions==1.0.0 # via black, mypy +netaddr==1.3.0 # via ansible-lint (pyproject.toml) +packaging==24.2 # via ansible-compat, ansible-core, black, mkdocs, mkdocs-macros-plugin, pipdeptree, pyproject-api, pytest, tox, ansible-lint (pyproject.toml) +paginate==0.5.7 # via mkdocs-material +pathspec==0.12.1 # via black, mkdocs, mkdocs-macros-plugin, yamllint, ansible-lint (pyproject.toml) +pillow==11.0.0 # via cairosvg, mkdocs-ansible +pipdeptree==2.23.4 # via mkdocs-ansible, ansible-lint (pyproject.toml) +platformdirs==4.3.6 # via black, mkdocs-get-deps, mkdocstrings, pylint, tox, virtualenv +pluggy==1.5.0 # via pytest, tox +psutil==6.1.0 # via ansible-lint (pyproject.toml) +pycparser==2.22 # via cffi +pygments==2.18.0 # via mkdocs-material, rich +pylint==3.3.1 # via ansible-lint (pyproject.toml) +pymdown-extensions==10.12 # via markdown-exec, mkdocs-ansible, mkdocs-material, mkdocstrings +pyproject-api==1.8.0 # via tox +pytest==8.3.3 # via pytest-mock, pytest-plus, pytest-xdist, ansible-lint (pyproject.toml) +pytest-mock==3.14.0 # via ansible-lint (pyproject.toml) +pytest-plus==0.7.0 # via ansible-lint (pyproject.toml) +pytest-xdist==3.6.1 # via ansible-lint (pyproject.toml) +python-dateutil==2.9.0.post0 # via ghp-import, mkdocs-macros-plugin +python-slugify==8.0.4 # via mkdocs-monorepo-plugin +pyyaml==6.0.2 # via ansible-compat, ansible-core, mkdocs, mkdocs-get-deps, mkdocs-macros-plugin, pymdown-extensions, pyyaml-env-tag, yamllint, ansible-lint (pyproject.toml) +pyyaml-env-tag==0.1 # via mkdocs +referencing==0.35.1 # via jsonschema, jsonschema-specifications, types-jsonschema +regex==2024.11.6 # via mkdocs-material +requests==2.32.3 # via linkchecker, mkdocs-htmlproofer-plugin, mkdocs-material +rich==13.9.4 # via ansible-lint (pyproject.toml) +rpds-py==0.21.0 # via jsonschema, referencing +ruamel-yaml==0.18.6 # via ansible-lint (pyproject.toml) +ruamel-yaml-clib==0.2.12 # via ruamel-yaml, ansible-lint (pyproject.toml) +six==1.16.0 # via python-dateutil +soupsieve==2.6 # via beautifulsoup4 +subprocess-tee==0.4.2 # via ansible-compat, ansible-lint (pyproject.toml) +super-collections==0.5.3 # via mkdocs-macros-plugin +termcolor==2.5.0 # via mkdocs-macros-plugin +text-unidecode==1.3 # via python-slugify +tinycss2==1.4.0 # via cairosvg, cssselect2 +tomli==2.0.2 # via black, coverage, mypy, pylint, pyproject-api, pytest, tox +tomlkit==0.13.2 # via pylint +tox==4.23.2 # via ansible-lint (pyproject.toml) +types-jsonschema==4.23.0.20240813 # via ansible-lint (pyproject.toml) +types-pyyaml==6.0.12.20240917 # via ansible-lint (pyproject.toml) +urllib3==2.2.3 # via requests +virtualenv==20.27.1 # via tox +watchdog==6.0.0 # via mkdocs +wcmatch==10.0 # via ansible-lint (pyproject.toml) +webencodings==0.5.1 # via cssselect2, tinycss2 +yamllint==1.35.1 # via ansible-lint (pyproject.toml) +zipp==3.20.2 # via importlib-metadata -# The following packages are considered to be unsafe in a requirements file: +# The following packages were excluded from the output: +# ansible-core +# pip # resolvelib -# ruamel-yaml-clib -# wcmatch +# typing-extensions diff --git a/.config/requirements-lock.txt b/.config/requirements-lock.txt index 26f56e0c36..dbfc887ed6 100644 --- a/.config/requirements-lock.txt +++ b/.config/requirements-lock.txt @@ -1,43 +1,39 @@ -# -# This file is autogenerated by pip-compile with Python 3.10 -# by the following command: -# -# pip-compile --no-annotate --output-file=.config/requirements-lock.txt --strip-extras --unsafe-package=resolvelib --unsafe-package=ruamel-yaml-clib pyproject.toml -# -ansible-compat==24.9.1 -ansible-core==2.17.6 -attrs==24.2.0 -black==24.10.0 -bracex==2.5.post1 -cffi==1.17.1 -click==8.1.7 -cryptography==43.0.3 -filelock==3.16.1 -importlib-metadata==8.5.0 -jinja2==3.1.4 -jsonschema==4.23.0 -jsonschema-specifications==2024.10.1 -markdown-it-py==3.0.0 -markupsafe==3.0.2 -mdurl==0.1.2 -mypy-extensions==1.0.0 -packaging==24.1 -pathspec==0.12.1 -platformdirs==4.3.6 -pycparser==2.22 -pygments==2.18.0 -pyyaml==6.0.2 -referencing==0.35.1 -rich==13.9.4 -rpds-py==0.20.1 -ruamel-yaml==0.18.6 -subprocess-tee==0.4.2 -tomli==2.0.2 -typing-extensions==4.12.2 -wcmatch==10.0 ; python_version < "3.12" -yamllint==1.35.1 -zipp==3.20.2 +# This file was autogenerated by uv via the following command: +# tox run deps +ansible-compat==24.9.1 # via ansible-lint (pyproject.toml) +attrs==24.2.0 # via jsonschema, referencing +black==24.10.0 # via ansible-lint (pyproject.toml) +bracex==2.5.post1 # via wcmatch +cffi==1.17.1 # via cryptography +click==8.1.7 # via black +cryptography==43.0.3 # via ansible-core +filelock==3.16.1 # via ansible-lint (pyproject.toml) +importlib-metadata==8.5.0 # via ansible-lint (pyproject.toml) +jinja2==3.1.4 # via ansible-core +jsonschema==4.23.0 # via ansible-compat, ansible-lint (pyproject.toml) +jsonschema-specifications==2024.10.1 # via jsonschema +markdown-it-py==3.0.0 # via rich +markupsafe==3.0.2 # via jinja2 +mdurl==0.1.2 # via markdown-it-py +mypy-extensions==1.0.0 # via black +packaging==24.2 # via ansible-compat, ansible-core, black, ansible-lint (pyproject.toml) +pathspec==0.12.1 # via black, yamllint, ansible-lint (pyproject.toml) +platformdirs==4.3.6 # via black +pycparser==2.22 # via cffi +pygments==2.18.0 # via rich +pyyaml==6.0.2 # via ansible-compat, ansible-core, yamllint, ansible-lint (pyproject.toml) +referencing==0.35.1 # via jsonschema, jsonschema-specifications +rich==13.9.4 # via ansible-lint (pyproject.toml) +rpds-py==0.21.0 # via jsonschema, referencing +ruamel-yaml==0.18.6 # via ansible-lint (pyproject.toml) +ruamel-yaml-clib==0.2.12 # via ruamel-yaml +subprocess-tee==0.4.2 # via ansible-compat, ansible-lint (pyproject.toml) +tomli==2.0.2 # via black +wcmatch==10.0 # via ansible-lint (pyproject.toml) +yamllint==1.35.1 # via ansible-lint (pyproject.toml) +zipp==3.20.2 # via importlib-metadata -# The following packages are considered to be unsafe in a requirements file: +# The following packages were excluded from the output: +# ansible-core # resolvelib -# ruamel-yaml-clib +# typing-extensions diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e4acfd40d2..191a6eba6d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -70,7 +70,7 @@ repos: - prettier-plugin-toml@2.0.1 - prettier-plugin-sort-json@3.1.0 - repo: https://github.com/streetsidesoftware/cspell-cli - rev: v8.15.2 + rev: v8.15.3 hooks: - id: cspell # entry: codespell --relative @@ -137,7 +137,7 @@ repos: types: [file, yaml] entry: yamllint --strict - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.7.2" + rev: "v0.7.3" hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -202,50 +202,45 @@ repos: - typing_extensions - wcmatch - yamllint - - repo: https://github.com/jazzband/pip-tools - rev: 7.4.1 + - # keep at bottom as these are slower + repo: local hooks: - - id: pip-compile - name: lock - alias: lock + - id: schemas + name: update json schemas + entry: python3 src/ansiblelint/schemas/__main__.py + language: python + pass_filenames: false always_run: true - entry: pip-compile --upgrade --no-annotate --output-file=.config/requirements-lock.txt pyproject.toml --strip-extras --unsafe-package ruamel-yaml-clib --unsafe-package resolvelib - files: ^.config\/.*requirements.*$ + # stages: [manual] + - id: deps + name: Upgrade constraints files and requirements + files: ^(pyproject\.toml|requirements\.txt)$ language: python language_version: "3.10" # minimal we support officially + entry: python3 -m uv pip compile -q --all-extras --output-file=.config/constraints.txt pyproject.toml --upgrade pass_filenames: false - stages: [manual] + stages: + - manual additional_dependencies: - - pip>=22.3.1 + - uv>=0.4.3 - id: pip-compile - name: deps - alias: deps - always_run: true - entry: pip-compile --no-annotate --output-file=.config/constraints.txt pyproject.toml --all-extras --strip-extras --unsafe-package wcmatch --unsafe-package ruamel-yaml-clib --unsafe-package resolvelib - files: ^.config\/.*requirements.*$ + name: Check constraints files and requirements + files: ^(pyproject\.toml|requirements\.txt)$ language: python language_version: "3.10" # minimal we support officially + entry: python3 -m uv pip compile -q --all-extras --output-file=.config/constraints.txt pyproject.toml pass_filenames: false additional_dependencies: - - pip>=22.3.1 - - id: pip-compile - entry: pip-compile -v --no-annotate --output-file=.config/constraints.txt pyproject.toml --all-extras --strip-extras --unsafe-package wcmatch --unsafe-package ruamel-yaml-clib --unsafe-package resolvelib --upgrade - language: python + - uv>=0.4.3 + - id: lock + name: Update requirements-lock.txt + alias: lock always_run: true - pass_filenames: false + entry: python3 -m uv pip compile -q --upgrade --output-file=.config/requirements-lock.txt pyproject.toml --strip-extras files: ^.config\/.*requirements.*$ - alias: up - stages: [manual] - language_version: "3.10" # minimal we support officially - additional_dependencies: - - pip>=22.3.1 - - # keep at bottom as these are slower - repo: local - hooks: - - id: schemas - name: update json schemas - entry: python3 src/ansiblelint/schemas/__main__.py language: python + language_version: "3.10" # minimal we support officially pass_filenames: false - always_run: true - # stages: [manual] + stages: [manual] + additional_dependencies: + - uv>=0.4.3 diff --git a/pyproject.toml b/pyproject.toml index 1221d7e32e..949763fe6d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -300,3 +300,8 @@ git_describe_command = [ "--match", "v*.*", ] + +[tool.uv.pip] +annotation-style = "line" +no-emit-package = ["ansible-core", "pip", "resolvelib", "typing_extensions", "uv"] +custom-compile-command = "tox run deps" diff --git a/src/ansiblelint/schemas/__store__.json b/src/ansiblelint/schemas/__store__.json index ef7937b297..de6ba932cc 100644 --- a/src/ansiblelint/schemas/__store__.json +++ b/src/ansiblelint/schemas/__store__.json @@ -16,7 +16,7 @@ "url": "https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/execution-environment.json" }, "galaxy": { - "etag": "4224ac235cc5657bf77b5834cea48b4d573cc8b666694f788590e213adfb8113", + "etag": "375cc008961f341f5165fc43977a4f4e7c0aedfa3cb08965fc95b6d5e5dad0bf", "url": "https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/galaxy.json" }, "inventory": { diff --git a/test/schemas/package-lock.json b/test/schemas/package-lock.json index 788e3af3f7..3a8547f4c0 100644 --- a/test/schemas/package-lock.json +++ b/test/schemas/package-lock.json @@ -16,7 +16,7 @@ "@types/js-yaml": "^4.0.9", "@types/minimatch": "^5.1.2", "@types/mocha": "^10.0.9", - "@types/node": "^22.8.6", + "@types/node": "^22.9.0", "chai": "^5.1.2", "minimatch": "^10.0.1", "mocha": "^10.8.2", @@ -113,9 +113,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.8.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.8.6.tgz", - "integrity": "sha512-tosuJYKrIqjQIlVCM4PEGxOmyg3FCPa/fViuJChnGeEIhjA46oy8FMVoF9su1/v8PNs2a8Q0iFNyOx0uOF91nw==", + "version": "22.9.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.0.tgz", + "integrity": "sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ==", "license": "MIT", "dependencies": { "undici-types": "~6.19.8" @@ -1374,9 +1374,9 @@ "dev": true }, "@types/node": { - "version": "22.8.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.8.6.tgz", - "integrity": "sha512-tosuJYKrIqjQIlVCM4PEGxOmyg3FCPa/fViuJChnGeEIhjA46oy8FMVoF9su1/v8PNs2a8Q0iFNyOx0uOF91nw==", + "version": "22.9.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.0.tgz", + "integrity": "sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ==", "requires": { "undici-types": "~6.19.8" } diff --git a/test/schemas/package.json b/test/schemas/package.json index 037f940769..1149d12f32 100644 --- a/test/schemas/package.json +++ b/test/schemas/package.json @@ -16,7 +16,7 @@ "@types/js-yaml": "^4.0.9", "@types/minimatch": "^5.1.2", "@types/mocha": "^10.0.9", - "@types/node": "^22.8.6", + "@types/node": "^22.9.0", "chai": "^5.1.2", "minimatch": "^10.0.1", "mocha": "^10.8.2", diff --git a/tox.ini b/tox.ini index ee82993570..bae58b10df 100644 --- a/tox.ini +++ b/tox.ini @@ -141,7 +141,7 @@ setenv = commands_pre = commands = -pre-commit run --all-files --show-diff-on-failure --hook-stage manual lock - -pre-commit run --all-files --show-diff-on-failure --hook-stage manual up + -pre-commit run --all-files --show-diff-on-failure --hook-stage manual deps # Update pre-commit hooks -pre-commit autoupdate # Update npm deps