From 62b5f724c9485764d2ee82755e927582b9c5c439 Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Wed, 10 Jan 2024 14:03:50 +0000 Subject: [PATCH] Added missing ansible-compat runtime dependency (#246) --- .config/constraints.txt | 89 ++++++++++++++++++++++++++++++++++ .config/lock-requirements.txt | 8 ++- .config/requirements.in | 3 -- .config/requirements.txt | 91 ++--------------------------------- .config/test-requirements.txt | 2 +- .pre-commit-config.yaml | 12 ++--- .vscode/settings.json | 2 +- pyproject.toml | 2 +- tox.ini | 8 ++- 9 files changed, 116 insertions(+), 101 deletions(-) create mode 100644 .config/constraints.txt delete mode 100644 .config/requirements.in diff --git a/.config/constraints.txt b/.config/constraints.txt new file mode 100644 index 00000000..4da6ea9a --- /dev/null +++ b/.config/constraints.txt @@ -0,0 +1,89 @@ +# +# This file is autogenerated by pip-compile with Python 3.10 +# by the following command: +# +# pip-compile --extra=docs --extra=test --no-annotate --output-file=.config/constraints.txt --strip-extras --unsafe-package=ruamel-yaml-clib pyproject.toml +# +ansible-compat==4.1.11 +ansible-core==2.16.2 +attrs==23.2.0 +babel==2.14.0 +beautifulsoup4==4.12.2 +bracex==2.4 +cairocffi==1.6.1 +cairosvg==2.7.1 +certifi==2023.11.17 +cffi==1.16.0 +charset-normalizer==3.3.2 +click==8.1.7 +click-help-colors==0.9.4 +colorama==0.4.6 +coverage==7.4.0 +cryptography==41.0.7 +csscompressor==0.9.5 +cssselect2==0.7.0 +defusedxml==0.7.1 +dnspython==2.4.2 +enrich==1.2.7 +exceptiongroup==1.2.0 +ghp-import==2.1.0 +griffe==0.38.1 +htmlmin2==0.1.13 +idna==3.6 +iniconfig==2.0.0 +jinja2==3.1.2 +jsmin==3.0.1 +jsonschema==4.20.0 +jsonschema-specifications==2023.12.1 +linkchecker==10.4.0 +markdown==3.5.1 +markdown-exec==1.8.0 +markdown-include==0.8.1 +markdown-it-py==3.0.0 +markupsafe==2.1.3 +mdurl==0.1.2 +mergedeep==1.3.4 +mkdocs==1.5.3 +mkdocs-ansible==0.2.1 +mkdocs-autorefs==0.5.0 +mkdocs-gen-files==0.5.0 +mkdocs-htmlproofer-plugin==1.0.0 +mkdocs-material==9.5.3 +mkdocs-material-extensions==1.3.1 +mkdocs-minify-plugin==0.7.2 +mkdocs-monorepo-plugin==1.1.0 +mkdocstrings==0.24.0 +mkdocstrings-python==1.8.0 +molecule==6.0.3 +packaging==23.2 +paginate==0.5.6 +pathspec==0.12.1 +pillow==10.2.0 +pipdeptree==2.13.1 +platformdirs==4.1.0 +pluggy==1.3.0 +pycparser==2.21 +pygments==2.17.2 +pymdown-extensions==10.7 +pytest==7.4.4 +pytest-plus==0.6.1 +python-dateutil==2.8.2 +python-slugify==8.0.1 +pyyaml==6.0.1 +pyyaml-env-tag==0.1 +referencing==0.32.1 +regex==2023.12.25 +requests==2.31.0 +resolvelib==1.0.1 +rich==13.7.0 +rpds-py==0.16.2 +six==1.16.0 +soupsieve==2.5 +subprocess-tee==0.4.1 +text-unidecode==1.3 +tinycss2==1.2.1 +tomli==2.0.1 +urllib3==2.1.0 +watchdog==3.0.0 +wcmatch==8.5 +webencodings==0.5.1 diff --git a/.config/lock-requirements.txt b/.config/lock-requirements.txt index bef592fe..aad6fe7a 100644 --- a/.config/lock-requirements.txt +++ b/.config/lock-requirements.txt @@ -4,18 +4,24 @@ # # pip-compile --no-annotate --output-file=.config/lock-requirements.txt --strip-extras --unsafe-package=ruamel-yaml-clib pyproject.toml # +ansible-compat==4.1.11 ansible-core==2.16.2 +attrs==23.2.0 cffi==1.16.0 cryptography==41.0.7 exceptiongroup==1.2.0 -importlib-resources==6.1.1 iniconfig==2.0.0 jinja2==3.1.2 +jsonschema==4.20.0 +jsonschema-specifications==2023.12.1 markupsafe==2.1.3 packaging==23.2 pluggy==1.3.0 pycparser==2.21 pytest==7.4.4 pyyaml==6.0.1 +referencing==0.32.1 resolvelib==1.0.1 +rpds-py==0.16.2 +subprocess-tee==0.4.1 tomli==2.0.1 diff --git a/.config/requirements.in b/.config/requirements.in deleted file mode 100644 index f2d267d7..00000000 --- a/.config/requirements.in +++ /dev/null @@ -1,3 +0,0 @@ -ansible-core>=2.14 -pytest>=6,<8.0.0 -packaging diff --git a/.config/requirements.txt b/.config/requirements.txt index 1b39bc3c..ffd2234b 100644 --- a/.config/requirements.txt +++ b/.config/requirements.txt @@ -1,87 +1,4 @@ -# -# This file is autogenerated by pip-compile with Python 3.10 -# by the following command: -# -# pip-compile --extra=docs --extra=test --no-annotate --output-file=.config/requirements.txt --strip-extras --unsafe-package=ruamel-yaml-clib pyproject.toml -# -ansible-compat==4.1.10 -ansible-core==2.16.2 -attrs==23.2.0 -babel==2.14.0 -beautifulsoup4==4.12.2 -bracex==2.4 -cairocffi==1.6.1 -cairosvg==2.7.1 -certifi==2023.11.17 -cffi==1.16.0 -charset-normalizer==3.3.2 -click==8.1.7 -click-help-colors==0.9.4 -colorama==0.4.6 -coverage==7.4.0 -cryptography==41.0.7 -csscompressor==0.9.5 -cssselect2==0.7.0 -defusedxml==0.7.1 -enrich==1.2.7 -exceptiongroup==1.2.0 -ghp-import==2.1.0 -griffe==0.38.1 -htmlmin2==0.1.13 -idna==3.6 -iniconfig==2.0.0 -jinja2==3.1.2 -jsmin==3.0.1 -jsonschema==4.20.0 -jsonschema-specifications==2023.12.1 -markdown==3.5.1 -markdown-exec==1.8.0 -markdown-include==0.8.1 -markdown-it-py==3.0.0 -markupsafe==2.1.3 -mdurl==0.1.2 -mergedeep==1.3.4 -mkdocs==1.5.3 -mkdocs-ansible==0.2.0 -mkdocs-autorefs==0.5.0 -mkdocs-gen-files==0.5.0 -mkdocs-htmlproofer-plugin==1.0.0 -mkdocs-material==9.5.3 -mkdocs-material-extensions==1.3.1 -mkdocs-minify-plugin==0.7.2 -mkdocs-monorepo-plugin==1.1.0 -mkdocstrings==0.24.0 -mkdocstrings-python==1.7.5 -molecule==6.0.3 -packaging==23.2 -paginate==0.5.6 -pathspec==0.12.1 -pillow==10.2.0 -pipdeptree==2.13.1 -platformdirs==4.1.0 -pluggy==1.3.0 -pycparser==2.21 -pygments==2.17.2 -pymdown-extensions==10.7 -pytest==7.4.4 -pytest-plus==0.6.0 -python-dateutil==2.8.2 -python-slugify==8.0.1 -pyyaml==6.0.1 -pyyaml-env-tag==0.1 -referencing==0.32.1 -regex==2023.12.25 -requests==2.31.0 -resolvelib==1.0.1 -rich==13.7.0 -rpds-py==0.16.2 -six==1.16.0 -soupsieve==2.5 -subprocess-tee==0.4.1 -text-unidecode==1.3 -tinycss2==1.2.1 -tomli==2.0.1 -urllib3==2.1.0 -watchdog==3.0.0 -wcmatch==8.5 -webencodings==0.5.1 +ansible-core>=2.14 +ansible-compat>=4.1.11 +pytest>=6 +packaging diff --git a/.config/test-requirements.txt b/.config/test-requirements.txt index fc756702..ce5b10e4 100644 --- a/.config/test-requirements.txt +++ b/.config/test-requirements.txt @@ -1,4 +1,4 @@ ansible-core coverage molecule -pytest-plus>=0.6.0 +pytest-plus>=0.6.1 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3a0eb37e..4e5e0c27 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -31,7 +31,7 @@ repos: hooks: - id: remove-tabs - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.1.9" + rev: "v0.1.11" hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -51,7 +51,7 @@ repos: - id: black language_version: python3 - repo: https://github.com/streetsidesoftware/cspell-cli - rev: v8.2.1 + rev: v8.3.0 hooks: - id: cspell name: Spell check with cspell @@ -104,19 +104,19 @@ repos: name: deps alias: deps always_run: true - entry: pip-compile --resolver=backtracking -q --no-annotate --output-file=.config/requirements.txt pyproject.toml --extra docs --extra test --strip-extras --unsafe-package ruamel-yaml-clib - files: ^.config\/.*requirements.*$ + entry: pip-compile --resolver=backtracking -q --no-annotate --output-file=.config/constraints.txt pyproject.toml --extra docs --extra test --strip-extras --unsafe-package ruamel-yaml-clib + files: ^.config\/.*(requirements|constraints).*$ language: python language_version: "3.10" # minimal we support officially pass_filenames: false additional_dependencies: - pip>=22.3.1 - id: pip-compile - entry: pip-compile --resolver=backtracking -q --no-annotate --output-file=.config/requirements.txt pyproject.toml --extra docs --extra test --strip-extras --unsafe-package ruamel-yaml-clib --upgrade + entry: pip-compile --resolver=backtracking -q --no-annotate --output-file=.config/constraints.txt pyproject.toml --extra docs --extra test --strip-extras --unsafe-package ruamel-yaml-clib --upgrade language: python always_run: true pass_filenames: false - files: ^.config\/.*requirements.*$ + files: ^.config\/.*(requirements|constraints).*$ alias: up stages: [manual] language_version: "3.10" # minimal we support officially diff --git a/.vscode/settings.json b/.vscode/settings.json index 8ae02717..b82bf2ea 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,7 @@ { "[python]": { "editor.codeActionsOnSave": { - "source.organizeImports": true + "source.organizeImports": "explicit" } }, "editor.formatOnSave": true, diff --git a/pyproject.toml b/pyproject.toml index d1bcab1d..1a29f8f4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -169,7 +169,7 @@ lines-between-types = 1 # Separate import/from with 1 line optional-dependencies.docs = { file = [".config/docs-requirements.txt"] } optional-dependencies.test = { file = [".config/test-requirements.txt"] } optional-dependencies.lock = { file = [".config/lock-requirements.txt"] } -dependencies = { file = [".config/requirements.in"] } +dependencies = { file = [".config/requirements.txt"] } [tool.setuptools_scm] local_scheme = "no-local-version" diff --git a/tox.ini b/tox.ini index 54fa8e41..d8881049 100644 --- a/tox.ini +++ b/tox.ini @@ -38,7 +38,7 @@ setenv = COVERAGE_FILE = {env:COVERAGE_FILE:{toxworkdir}/.coverage.{envname}} COVERAGE_PROCESS_START={toxinidir}/pyproject.toml FORCE_COLOR = 1 - PIP_CONSTRAINT = {toxinidir}/.config/requirements.txt + PIP_CONSTRAINT = {toxinidir}/.config/constraints.txt devel: PIP_CONSTRAINT = /dev/null extras = test @@ -105,6 +105,12 @@ commands = {toxinidir} # metadata validation sh -c "python -m twine check --strict {toxinidir}/dist/*" + # testing installation of the wheel + sh -c 'python3 -m pip install "pytest-ansible @ file://$(echo {toxinidir}/dist/*.whl)"' + # minimal test that pytest finds the plugin: + pytest --inventory=/dev/null --version + # testing uninstallation + python3 -m pip uninstall -y pytest-ansible [testenv:coverage] description = Combines and displays coverage results