Skip to content

Commit

Permalink
update tox.ini's update-requirements (#104)
Browse files Browse the repository at this point in the history
* update tox.ini's update-requirements

Updates tox.ini's `update-requirements` as described in canonical/argo-operators#100
  • Loading branch information
ca-scribner authored Aug 3, 2023
1 parent 787015d commit a98e3ac
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
11 changes: 6 additions & 5 deletions charms/katib-controller/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ allowlist_externals =
find
pip-compile
xargs
commands =
; uses 'bash -c' because piping didn't work in regular tox commands
pip-compile requirements-fmt.in
bash -c 'find . -type f -name "requirements*.in" | xargs --replace=\{\} pip-compile --resolver=legacy \{\}'
commands =
; we must preserve the order of compilation, since each *.in file depends on some *.txt file.
; For example, requirements-unit.in depends on requirements.txt and we must compile first
; requirements.txt to ensure that requirements-unit.txt get the same dependency as the requirements.txt
bash -c 'for pattern in "requirements.in" "requirements-fmt.in" "requirements*.in"; do find . -type f -name "$pattern" -exec bash -c "cd \$(dirname "{}") && pip-compile --resolver=backtracking \$(basename "{}")" \;; done'
deps =
pip-tools
description = Update requirements files by executing pip-compile on all requirements*.in files, including those in subdirs.
Expand Down Expand Up @@ -68,4 +69,4 @@ commands =
pytest -v --tb native --asyncio-mode=auto {[vars]tst_path}integration/test_charm.py --log-cli-level=INFO -s {posargs}
deps =
-r requirements-integration.txt
description = Run integration tests
description = Run integration tests
11 changes: 6 additions & 5 deletions charms/katib-db-manager/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ allowlist_externals =
find
pip-compile
xargs
commands =
; uses 'bash -c' because piping didn't work in regular tox commands
pip-compile requirements-fmt.in
bash -c 'find . -type f -name "requirements*.in" | xargs --replace=\{\} pip-compile --resolver=legacy \{\}'
commands =
; we must preserve the order of compilation, since each *.in file depends on some *.txt file.
; For example, requirements-unit.in depends on requirements.txt and we must compile first
; requirements.txt to ensure that requirements-unit.txt get the same dependency as the requirements.txt
bash -c 'for pattern in "requirements.in" "requirements-fmt.in" "requirements*.in"; do find . -type f -name "$pattern" -exec bash -c "cd \$(dirname "{}") && pip-compile --resolver=backtracking \$(basename "{}")" \;; done'
deps =
pip-tools
description = Update requirements files by executing pip-compile on all requirements*.in files, including those in subdirs.
Expand Down Expand Up @@ -76,4 +77,4 @@ description = Run unit tests
commands = pytest -v --tb native --asyncio-mode=auto {[vars]tst_path}integration --log-cli-level=INFO -s {posargs}
deps =
-r requirements-integration.txt
description = Run integration tests
description = Run integration tests
11 changes: 6 additions & 5 deletions charms/katib-ui/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ allowlist_externals =
find
pip-compile
xargs
commands =
; uses 'bash -c' because piping didn't work in regular tox commands
pip-compile requirements-fmt.in
bash -c 'find . -type f -name "requirements*.in" | xargs --replace=\{\} pip-compile --resolver=legacy \{\}'
commands =
; we must preserve the order of compilation, since each *.in file depends on some *.txt file.
; For example, requirements-unit.in depends on requirements.txt and we must compile first
; requirements.txt to ensure that requirements-unit.txt get the same dependency as the requirements.txt
bash -c 'for pattern in "requirements.in" "requirements-fmt.in" "requirements*.in"; do find . -type f -name "$pattern" -exec bash -c "cd \$(dirname "{}") && pip-compile --resolver=backtracking \$(basename "{}")" \;; done'
deps =
pip-tools
description = Update requirements files by executing pip-compile on all requirements*.in files, including those in subdirs.
Expand All @@ -60,4 +61,4 @@ commands =
black --check --diff {[vars]all_path}
deps =
-r requirements-lint.txt
description = Check code against coding style standards
description = Check code against coding style standards

0 comments on commit a98e3ac

Please sign in to comment.