Skip to content

Commit 7596ff7

Browse files
committed
Replace pipdeptree and pip-tools with uv
1 parent 45db06d commit 7596ff7

7 files changed

+20
-28
lines changed

.config/constraints.txt

+9-16
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
# This file was autogenerated by uv via the following command:
22
# tox run -e deps
33
ansi2html==1.9.2 # via molecule (pyproject.toml)
4-
ansible-compat==25.1.0 # via ansible-lint, molecule (pyproject.toml)
5-
ansible-lint==25.1.0 # via molecule (pyproject.toml)
4+
ansible-compat==25.1.1 # via ansible-lint, molecule (pyproject.toml)
5+
ansible-lint==25.1.1 # via molecule (pyproject.toml)
66
astroid==3.3.8 # via pylint
77
attrs==25.1.0 # via jsonschema, referencing
88
babel==2.16.0 # via mkdocs-material
99
beautifulsoup4==4.12.3 # via linkchecker, mkdocs-htmlproofer-plugin
10-
black==24.10.0 # via ansible-lint, molecule (pyproject.toml)
10+
black==25.1.0 # via ansible-lint, molecule (pyproject.toml)
1111
bracex==2.5.post1 # via wcmatch
12-
build==1.2.2.post1 # via pip-tools
1312
cachetools==5.5.1 # via tox
1413
cairocffi==1.7.1 # via cairosvg
1514
cairosvg==2.7.1 # via mkdocs-ansible
@@ -18,7 +17,7 @@ cffi==1.17.1 # via cairocffi, cryptography
1817
cfgv==3.4.0 # via pre-commit
1918
chardet==5.2.0 # via tox
2019
charset-normalizer==3.4.1 # via requests
21-
click==8.1.8 # via black, click-help-colors, mkdocs, mkdocstrings, pip-tools, pydoclint, molecule (pyproject.toml)
20+
click==8.1.8 # via black, click-help-colors, mkdocs, mkdocstrings, pydoclint, molecule (pyproject.toml)
2221
click-help-colors==0.9.4 # via molecule (pyproject.toml)
2322
colorama==0.4.6 # via griffe, mkdocs-material, tox
2423
coverage==7.6.10 # via molecule (pyproject.toml)
@@ -43,7 +42,7 @@ identify==2.6.6 # via pre-commit
4342
idna==3.10 # via requests
4443
importlib-metadata==8.6.1 # via ansible-lint
4544
iniconfig==2.0.0 # via pytest
46-
isort==5.13.2 # via pylint
45+
isort==6.0.0 # via pylint
4746
jinja2==3.1.5 # via ansible-core, mkdocs, mkdocs-macros-plugin, mkdocs-material, mkdocstrings, molecule (pyproject.toml)
4847
jsmin==3.0.1 # via mkdocs-minify-plugin
4948
jsonschema==4.23.0 # via ansible-compat, ansible-lint, molecule (pyproject.toml)
@@ -73,24 +72,21 @@ mkdocstrings-python==1.13.0 # via mkdocs-ansible
7372
mypy==1.14.1 # via molecule (pyproject.toml)
7473
mypy-extensions==1.0.0 # via black, mypy
7574
nodeenv==1.9.1 # via pre-commit
76-
packaging==24.2 # via ansible-compat, ansible-core, ansible-lint, black, build, mkdocs, mkdocs-macros-plugin, pipdeptree, pyproject-api, pytest, tox, molecule (pyproject.toml)
75+
packaging==24.2 # via ansible-compat, ansible-core, ansible-lint, black, mkdocs, mkdocs-macros-plugin, pyproject-api, pytest, tox, molecule (pyproject.toml)
7776
paginate==0.5.7 # via mkdocs-material
7877
pathspec==0.12.1 # via ansible-lint, black, mkdocs, mkdocs-macros-plugin, yamllint
7978
pexpect==4.9.0 # via molecule (pyproject.toml)
8079
pillow==11.1.0 # via cairosvg, mkdocs-ansible
81-
pip-tools==7.4.1 # via molecule (pyproject.toml)
82-
pipdeptree==2.24.0 # via molecule (pyproject.toml)
8380
platformdirs==4.3.6 # via black, mkdocs-get-deps, mkdocstrings, pylint, tox, virtualenv
8481
pluggy==1.5.0 # via pytest, tox, molecule (pyproject.toml)
8582
pre-commit==4.1.0 # via molecule (pyproject.toml)
8683
ptyprocess==0.7.0 # via pexpect
8784
pycparser==2.22 # via cffi
8885
pydoclint==0.6.0 # via molecule (pyproject.toml)
8986
pygments==2.19.1 # via mkdocs-material, rich
90-
pylint==3.3.3 # via molecule (pyproject.toml)
91-
pymdown-extensions==10.14.1 # via markdown-exec, mkdocs-ansible, mkdocs-material, mkdocstrings
87+
pylint==3.3.4 # via molecule (pyproject.toml)
88+
pymdown-extensions==10.14.2 # via markdown-exec, mkdocs-ansible, mkdocs-material, mkdocstrings
9289
pyproject-api==1.9.0 # via tox
93-
pyproject-hooks==1.2.0 # via build, pip-tools
9490
pytest==8.3.4 # via pytest-instafail, pytest-mock, pytest-plus, pytest-testinfra, pytest-xdist, molecule (pyproject.toml)
9591
pytest-instafail==0.5.0 # via molecule (pyproject.toml)
9692
pytest-mock==3.14.0 # via molecule (pyproject.toml)
@@ -109,7 +105,6 @@ rpds-py==0.22.3 # via jsonschema, referencing
109105
ruamel-yaml==0.18.10 # via ansible-lint
110106
ruamel-yaml-clib==0.2.12 # via ruamel-yaml
111107
ruff==0.9.3 # via molecule (pyproject.toml)
112-
setuptools==75.8.0 # via pip-tools
113108
six==1.17.0 # via python-dateutil
114109
soupsieve==2.6 # via beautifulsoup4
115110
subprocess-tee==0.4.2 # via ansible-compat, ansible-lint
@@ -118,7 +113,7 @@ termcolor==2.5.0 # via mkdocs-macros-plugin
118113
text-unidecode==1.3 # via python-slugify
119114
tinycss2==1.4.0 # via cairosvg, cssselect2
120115
toml-sort==0.24.2 # via molecule (pyproject.toml)
121-
tomli==2.2.1 # via black, build, coverage, mypy, pip-tools, pydoclint, pylint, pyproject-api, pytest, tox
116+
tomli==2.2.1 # via black, coverage, mypy, pydoclint, pylint, pyproject-api, pytest, tox
122117
tomlkit==0.13.2 # via pylint, toml-sort
123118
tox==4.24.1 # via molecule (pyproject.toml)
124119
types-jsonschema==4.23.0.20241208 # via molecule (pyproject.toml)
@@ -129,12 +124,10 @@ virtualenv==20.29.1 # via pre-commit, tox
129124
watchdog==6.0.0 # via mkdocs
130125
wcmatch==10.0 # via ansible-lint, molecule (pyproject.toml)
131126
webencodings==0.5.1 # via cssselect2, tinycss2
132-
wheel==0.45.1 # via pip-tools
133127
yamllint==1.35.1 # via ansible-lint
134128
zipp==3.21.0 # via importlib-metadata
135129

136130
# The following packages were excluded from the output:
137131
# ansible-core
138-
# pip
139132
# resolvelib
140133
# typing-extensions

.config/requirements-docs.txt

-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
mkdocs-ansible>=24.3.0
2-
pipdeptree>=2.4.0
32
linkchecker>=10.4.0

.config/requirements-test.txt

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ docker >= 7.1.0 # testing
66
filelock >= 3.9.0
77
mypy
88
pexpect >= 4.9.0, < 5
9-
pip-tools
109
pre-commit
1110
pydoclint
1211
pylint

.pre-commit-config.yaml

+5-4
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ repos:
4747
- prettier-plugin-sort-json
4848

4949
- repo: https://github.com/psf/black
50-
rev: 24.10.0
50+
rev: 25.1.0
5151
hooks:
5252
- id: black
5353

@@ -83,7 +83,7 @@ repos:
8383
pass_filenames: false
8484

8585
- repo: https://github.com/pycqa/pylint.git
86-
rev: v3.3.3
86+
rev: v3.3.4
8787
hooks:
8888
- id: pylint
8989
args:
@@ -127,7 +127,8 @@ repos:
127127
- id: pip-compile-upgrade
128128
# To run it execute: `pre-commit run pip-compile-upgrade --hook-stage manual`
129129
name: Upgrade constraints files and requirements
130-
files: ^(pyproject\.toml|requirements\.txt)$
130+
files: ^(pyproject\.toml|.config/.*)$
131+
always_run: true
131132
language: python
132133
entry: python3 -m uv pip compile -q --all-extras --output-file=.config/constraints.txt pyproject.toml --upgrade
133134
pass_filenames: false
@@ -145,7 +146,7 @@ repos:
145146
additional_dependencies:
146147
- uv>=0.5.21
147148
- repo: https://github.com/ansible/ansible-lint
148-
rev: v25.1.0
149+
rev: v25.1.1
149150
hooks:
150151
- id: ansible-lint
151152
stages: [manual]

tests/unit/model/v2/test_provisioner_section.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def _model_provisioner_allows_ansible_section_data(): # type: ignore[no-untyped
8989

9090
@pytest.mark.parametrize(
9191
"config",
92-
[("_model_provisioner_allows_ansible_section_data")], # noqa: PT007
92+
["_model_provisioner_allows_ansible_section_data"], # noqa: PT007
9393
indirect=True,
9494
)
9595
def test_provisioner_allows_name(config): # type: ignore[no-untyped-def] # noqa: ANN201, D103

tools/smoketest.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
ANSIBLE=$(pipdeptree --reverse -p ansible)
3+
ANSIBLE=$(uv pip tree --invert --package ansible-core --strict)
44

55
if [ -z "$ANSIBLE" ]; then
66
echo "Ansible dependency not detected."

tox.ini

+4-4
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ deps =
6464
extras =
6565
commands_pre =
6666
commands =
67-
-pre-commit run --all-files --show-diff-on-failure --hook-stage manual deps
68-
-pre-commit autoupdate
67+
pre-commit run --all-files --show-diff-on-failure --hook-stage manual pip-compile-upgrade
68+
pre-commit autoupdate
6969
git diff --exit-code
7070
env_dir = {toxworkdir}/lint
7171

@@ -119,14 +119,14 @@ package = editable
119119
pip_pre = true
120120
deps =
121121
molecule-plugins[azure,containers,docker,ec2,gce,podman,vagrant]>=23
122-
pipdeptree>=2
123122
tox-ansible>=1.5.1
123+
uv
124124
extras =
125125
test
126126
commands_pre =
127127
commands =
128128
pip check
129-
pipdeptree --reverse -e pip,pbr,six,setuptools,toml,urllib3
129+
uv pip tree --invert
130130
molecule --version
131131
molecule drivers
132132
sh -c ./tools/smoketest.sh

0 commit comments

Comments
 (0)