From 2ece50c1e07d5b2c6155710749cb86081f884938 Mon Sep 17 00:00:00 2001 From: Maksim Beliaev Date: Thu, 27 Jul 2023 21:45:19 +0200 Subject: [PATCH 1/3] update reqs.txt --- charms/argo-controller/tox.ini | 10 +++++----- charms/argo-server/tox.ini | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/charms/argo-controller/tox.ini b/charms/argo-controller/tox.ini index 0725718..bc882ce 100644 --- a/charms/argo-controller/tox.ini +++ b/charms/argo-controller/tox.ini @@ -31,11 +31,11 @@ allowlist_externals = find pip-compile xargs -commands = -; uses 'bash -c' because piping didn't work in regular tox commands - pip-compile requirements.in - pip-compile requirements-fmt.in - bash -c 'find . -type f -name "requirements*.in" | xargs --replace=\{\} pip-compile --resolver=backtracking \{\}' +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. diff --git a/charms/argo-server/tox.ini b/charms/argo-server/tox.ini index 2f8ed28..d64d46d 100644 --- a/charms/argo-server/tox.ini +++ b/charms/argo-server/tox.ini @@ -31,11 +31,11 @@ allowlist_externals = find pip-compile xargs -commands = -; uses 'bash -c' because piping didn't work in regular tox commands - pip-compile requirements.in - pip-compile requirements-fmt.in - bash -c 'find . -type f -name "requirements*.in" | xargs --replace=\{\} pip-compile --resolver=backtracking \{\}' +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. From 96755a5611ac9f67dcfe1d56722ce8da06d34185 Mon Sep 17 00:00:00 2001 From: Maksim Beliaev Date: Thu, 27 Jul 2023 21:47:38 +0200 Subject: [PATCH 2/3] update reqs.txt --- charms/argo-controller/requirements-fmt.txt | 6 +++--- .../requirements-integration.txt | 14 ++++++------- charms/argo-controller/requirements-lint.txt | 20 +++++++++---------- charms/argo-controller/requirements-unit.txt | 20 +++++++++---------- charms/argo-controller/requirements.txt | 8 ++++---- charms/argo-server/requirements-fmt.txt | 6 +++--- charms/argo-server/requirements-lint.txt | 18 ++++++++--------- charms/argo-server/requirements-unit.txt | 18 ++++++++--------- charms/argo-server/requirements.txt | 6 +++--- 9 files changed, 58 insertions(+), 58 deletions(-) diff --git a/charms/argo-controller/requirements-fmt.txt b/charms/argo-controller/requirements-fmt.txt index 6e09e6b..d8cd11a 100644 --- a/charms/argo-controller/requirements-fmt.txt +++ b/charms/argo-controller/requirements-fmt.txt @@ -2,14 +2,14 @@ # This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile ./requirements-fmt.in +# pip-compile --resolver=backtracking requirements-fmt.in # black==23.7.0 - # via -r ./requirements-fmt.in + # via -r requirements-fmt.in click==8.1.6 # via black isort==5.12.0 - # via -r ./requirements-fmt.in + # via -r requirements-fmt.in mypy-extensions==1.0.0 # via black packaging==23.1 diff --git a/charms/argo-controller/requirements-integration.txt b/charms/argo-controller/requirements-integration.txt index dbcbbcf..1abd389 100644 --- a/charms/argo-controller/requirements-integration.txt +++ b/charms/argo-controller/requirements-integration.txt @@ -2,10 +2,10 @@ # This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile ./requirements-integration.in +# pip-compile --resolver=backtracking requirements-integration.in # aiohttp==3.8.5 - # via -r ./requirements-integration.in + # via -r requirements-integration.in aiosignal==1.3.1 # via aiohttp asttokens==2.2.1 @@ -62,11 +62,11 @@ jedi==0.18.2 # via ipython jinja2==3.1.2 # via - # -r ./requirements-integration.in + # -r requirements-integration.in # pytest-operator juju==2.9.44.0 # via - # -r ./requirements-integration.in + # -r requirements-integration.in # pytest-operator jujubundlelib==0.5.7 # via theblues @@ -139,7 +139,7 @@ pytest==7.4.0 pytest-asyncio==0.21.1 # via pytest-operator pytest-operator==0.28.0 - # via -r ./requirements-integration.in + # via -r requirements-integration.in python-dateutil==2.8.2 # via kubernetes pytz==2023.3 @@ -152,7 +152,7 @@ pyyaml==6.0.1 # pytest-operator requests==2.31.0 # via - # -r ./requirements-integration.in + # -r requirements-integration.in # kubernetes # macaroonbakery # requests-oauthlib @@ -173,7 +173,7 @@ six==1.16.0 stack-data==0.6.2 # via ipython tenacity==8.2.2 - # via -r ./requirements-integration.in + # via -r requirements-integration.in theblues==0.5.2 # via juju tomli==2.0.1 diff --git a/charms/argo-controller/requirements-lint.txt b/charms/argo-controller/requirements-lint.txt index 775c248..ee6dab5 100644 --- a/charms/argo-controller/requirements-lint.txt +++ b/charms/argo-controller/requirements-lint.txt @@ -2,28 +2,28 @@ # This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile ./requirements-lint.in +# pip-compile --resolver=backtracking requirements-lint.in # black==23.7.0 - # via -r ./requirements-lint.in + # via -r requirements-lint.in click==8.1.6 # via black codespell==2.2.5 - # via -r ./requirements-lint.in + # via -r requirements-lint.in colorama==0.4.6 - # via -r ./requirements-lint.in + # via -r requirements-lint.in flake8==6.0.0 # via - # -r ./requirements-lint.in + # -r requirements-lint.in # flake8-builtins # pep8-naming # pyproject-flake8 flake8-builtins==2.1.0 - # via -r ./requirements-lint.in + # via -r requirements-lint.in flake8-copyright==0.2.4 - # via -r ./requirements-lint.in + # via -r requirements-lint.in isort==5.12.0 - # via -r ./requirements-lint.in + # via -r requirements-lint.in mccabe==0.7.0 # via flake8 mypy-extensions==1.0.0 @@ -33,7 +33,7 @@ packaging==23.1 pathspec==0.11.1 # via black pep8-naming==0.13.3 - # via -r ./requirements-lint.in + # via -r requirements-lint.in platformdirs==3.9.1 # via black pycodestyle==2.10.0 @@ -41,7 +41,7 @@ pycodestyle==2.10.0 pyflakes==3.0.1 # via flake8 pyproject-flake8==6.0.0.post1 - # via -r ./requirements-lint.in + # via -r requirements-lint.in tomli==2.0.1 # via # black diff --git a/charms/argo-controller/requirements-unit.txt b/charms/argo-controller/requirements-unit.txt index e64c42a..160aa3b 100644 --- a/charms/argo-controller/requirements-unit.txt +++ b/charms/argo-controller/requirements-unit.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile ./requirements-unit.in +# pip-compile --resolver=backtracking requirements-unit.in # attrs==23.1.0 # via jsonschema @@ -11,7 +11,7 @@ certifi==2023.7.22 charset-normalizer==3.2.0 # via requests coverage==7.2.7 - # via -r ./requirements-unit.in + # via -r requirements-unit.in exceptiongroup==1.1.2 # via pytest idna==3.4 @@ -23,11 +23,11 @@ iniconfig==2.0.0 jsonschema==4.17.3 # via serialized-data-interface oci-image==1.0.0 - # via -r ./requirements.in + # via -r requirements.in ops==2.4.1 # via - # -r ./requirements-unit.in - # -r ./requirements.in + # -r requirements-unit.in + # -r requirements.in # serialized-data-interface packaging==23.1 # via pytest @@ -39,22 +39,22 @@ pyrsistent==0.19.3 # via jsonschema pytest==7.4.0 # via - # -r ./requirements-unit.in + # -r requirements-unit.in # pytest-lazy-fixture # pytest-mock pytest-lazy-fixture==0.6.3 - # via -r ./requirements-unit.in + # via -r requirements-unit.in pytest-mock==3.11.1 - # via -r ./requirements-unit.in + # via -r requirements-unit.in pyyaml==6.0.1 # via - # -r ./requirements-unit.in + # -r requirements-unit.in # ops # serialized-data-interface requests==2.31.0 # via serialized-data-interface serialized-data-interface==0.7.0 - # via -r ./requirements.in + # via -r requirements.in tomli==2.0.1 # via pytest urllib3==2.0.4 diff --git a/charms/argo-controller/requirements.txt b/charms/argo-controller/requirements.txt index be26a02..3f6533f 100644 --- a/charms/argo-controller/requirements.txt +++ b/charms/argo-controller/requirements.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile ./requirements.in +# pip-compile --resolver=backtracking requirements.in # attrs==23.1.0 # via jsonschema @@ -17,10 +17,10 @@ importlib-resources==6.0.0 jsonschema==4.17.3 # via serialized-data-interface oci-image==1.0.0 - # via -r ./requirements.in + # via -r requirements.in ops==2.4.1 # via - # -r ./requirements.in + # -r requirements.in # serialized-data-interface pkgutil-resolve-name==1.3.10 # via jsonschema @@ -33,7 +33,7 @@ pyyaml==6.0.1 requests==2.31.0 # via serialized-data-interface serialized-data-interface==0.7.0 - # via -r ./requirements.in + # via -r requirements.in urllib3==2.0.4 # via requests websocket-client==1.6.1 diff --git a/charms/argo-server/requirements-fmt.txt b/charms/argo-server/requirements-fmt.txt index 6e09e6b..d8cd11a 100644 --- a/charms/argo-server/requirements-fmt.txt +++ b/charms/argo-server/requirements-fmt.txt @@ -2,14 +2,14 @@ # This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile ./requirements-fmt.in +# pip-compile --resolver=backtracking requirements-fmt.in # black==23.7.0 - # via -r ./requirements-fmt.in + # via -r requirements-fmt.in click==8.1.6 # via black isort==5.12.0 - # via -r ./requirements-fmt.in + # via -r requirements-fmt.in mypy-extensions==1.0.0 # via black packaging==23.1 diff --git a/charms/argo-server/requirements-lint.txt b/charms/argo-server/requirements-lint.txt index d1814e0..8dcde12 100644 --- a/charms/argo-server/requirements-lint.txt +++ b/charms/argo-server/requirements-lint.txt @@ -2,26 +2,26 @@ # This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile ./requirements-lint.in +# pip-compile --resolver=backtracking requirements-lint.in # black==23.7.0 - # via -r ./requirements-lint.in + # via -r requirements-lint.in click==8.1.6 # via black codespell==2.2.5 - # via -r ./requirements-lint.in + # via -r requirements-lint.in flake8==6.0.0 # via - # -r ./requirements-lint.in + # -r requirements-lint.in # flake8-builtins # pep8-naming # pyproject-flake8 flake8-builtins==2.1.0 - # via -r ./requirements-lint.in + # via -r requirements-lint.in flake8-copyright==0.2.4 - # via -r ./requirements-lint.in + # via -r requirements-lint.in isort==5.12.0 - # via -r ./requirements-lint.in + # via -r requirements-lint.in mccabe==0.7.0 # via flake8 mypy-extensions==1.0.0 @@ -31,7 +31,7 @@ packaging==23.1 pathspec==0.11.1 # via black pep8-naming==0.13.3 - # via -r ./requirements-lint.in + # via -r requirements-lint.in platformdirs==3.9.1 # via black pycodestyle==2.10.0 @@ -39,7 +39,7 @@ pycodestyle==2.10.0 pyflakes==3.0.1 # via flake8 pyproject-flake8==6.0.0.post1 - # via -r ./requirements-lint.in + # via -r requirements-lint.in tomli==2.0.1 # via # black diff --git a/charms/argo-server/requirements-unit.txt b/charms/argo-server/requirements-unit.txt index 9a1a9ed..7b5e621 100644 --- a/charms/argo-server/requirements-unit.txt +++ b/charms/argo-server/requirements-unit.txt @@ -2,36 +2,36 @@ # This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile ./requirements-unit.in +# pip-compile --resolver=backtracking requirements-unit.in # coverage==7.2.7 - # via -r ./requirements-unit.in + # via -r requirements-unit.in exceptiongroup==1.1.2 # via pytest iniconfig==2.0.0 # via pytest oci-image==1.0.0 - # via -r ./requirements.in + # via -r requirements.in ops==2.4.1 # via - # -r ./requirements-unit.in - # -r ./requirements.in + # -r requirements-unit.in + # -r requirements.in packaging==23.1 # via pytest pluggy==1.2.0 # via pytest pytest==7.4.0 # via - # -r ./requirements-unit.in + # -r requirements-unit.in # pytest-lazy-fixture # pytest-mock pytest-lazy-fixture==0.6.3 - # via -r ./requirements-unit.in + # via -r requirements-unit.in pytest-mock==3.11.1 - # via -r ./requirements-unit.in + # via -r requirements-unit.in pyyaml==6.0.1 # via - # -r ./requirements-unit.in + # -r requirements-unit.in # ops tomli==2.0.1 # via pytest diff --git a/charms/argo-server/requirements.txt b/charms/argo-server/requirements.txt index ea57606..adfd925 100644 --- a/charms/argo-server/requirements.txt +++ b/charms/argo-server/requirements.txt @@ -2,12 +2,12 @@ # This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile ./requirements.in +# pip-compile --resolver=backtracking requirements.in # oci-image==1.0.0 - # via -r ./requirements.in + # via -r requirements.in ops==2.4.1 - # via -r ./requirements.in + # via -r requirements.in pyyaml==6.0.1 # via ops websocket-client==1.6.1 From 7e6813709755c98122d5bd7d5f00b37f912c8aeb Mon Sep 17 00:00:00 2001 From: Maksim Beliaev Date: Thu, 27 Jul 2023 21:53:45 +0200 Subject: [PATCH 3/3] added env --- charms/argo-controller/requirements-fmt.txt | 2 +- .../argo-controller/requirements-integration.txt | 2 +- charms/argo-controller/requirements-lint.txt | 2 +- charms/argo-controller/requirements-unit.txt | 2 +- charms/argo-controller/requirements.txt | 2 +- charms/argo-server/requirements-fmt.txt | 2 +- charms/argo-server/requirements-lint.txt | 2 +- charms/argo-server/requirements-unit.txt | 2 +- charms/argo-server/requirements.txt | 2 +- tox.ini | 15 +++++++++++++++ 10 files changed, 24 insertions(+), 9 deletions(-) diff --git a/charms/argo-controller/requirements-fmt.txt b/charms/argo-controller/requirements-fmt.txt index d8cd11a..0cb547a 100644 --- a/charms/argo-controller/requirements-fmt.txt +++ b/charms/argo-controller/requirements-fmt.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile --resolver=backtracking requirements-fmt.in +# pip-compile requirements-fmt.in # black==23.7.0 # via -r requirements-fmt.in diff --git a/charms/argo-controller/requirements-integration.txt b/charms/argo-controller/requirements-integration.txt index 1abd389..fcb043b 100644 --- a/charms/argo-controller/requirements-integration.txt +++ b/charms/argo-controller/requirements-integration.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile --resolver=backtracking requirements-integration.in +# pip-compile requirements-integration.in # aiohttp==3.8.5 # via -r requirements-integration.in diff --git a/charms/argo-controller/requirements-lint.txt b/charms/argo-controller/requirements-lint.txt index ee6dab5..803242d 100644 --- a/charms/argo-controller/requirements-lint.txt +++ b/charms/argo-controller/requirements-lint.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile --resolver=backtracking requirements-lint.in +# pip-compile requirements-lint.in # black==23.7.0 # via -r requirements-lint.in diff --git a/charms/argo-controller/requirements-unit.txt b/charms/argo-controller/requirements-unit.txt index 160aa3b..183d268 100644 --- a/charms/argo-controller/requirements-unit.txt +++ b/charms/argo-controller/requirements-unit.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile --resolver=backtracking requirements-unit.in +# pip-compile requirements-unit.in # attrs==23.1.0 # via jsonschema diff --git a/charms/argo-controller/requirements.txt b/charms/argo-controller/requirements.txt index 3f6533f..be6f622 100644 --- a/charms/argo-controller/requirements.txt +++ b/charms/argo-controller/requirements.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile --resolver=backtracking requirements.in +# pip-compile requirements.in # attrs==23.1.0 # via jsonschema diff --git a/charms/argo-server/requirements-fmt.txt b/charms/argo-server/requirements-fmt.txt index d8cd11a..0cb547a 100644 --- a/charms/argo-server/requirements-fmt.txt +++ b/charms/argo-server/requirements-fmt.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile --resolver=backtracking requirements-fmt.in +# pip-compile requirements-fmt.in # black==23.7.0 # via -r requirements-fmt.in diff --git a/charms/argo-server/requirements-lint.txt b/charms/argo-server/requirements-lint.txt index 8dcde12..ab9acc9 100644 --- a/charms/argo-server/requirements-lint.txt +++ b/charms/argo-server/requirements-lint.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile --resolver=backtracking requirements-lint.in +# pip-compile requirements-lint.in # black==23.7.0 # via -r requirements-lint.in diff --git a/charms/argo-server/requirements-unit.txt b/charms/argo-server/requirements-unit.txt index 7b5e621..de61796 100644 --- a/charms/argo-server/requirements-unit.txt +++ b/charms/argo-server/requirements-unit.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile --resolver=backtracking requirements-unit.in +# pip-compile requirements-unit.in # coverage==7.2.7 # via -r requirements-unit.in diff --git a/charms/argo-server/requirements.txt b/charms/argo-server/requirements.txt index adfd925..1abe034 100644 --- a/charms/argo-server/requirements.txt +++ b/charms/argo-server/requirements.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile --resolver=backtracking requirements.in +# pip-compile requirements.in # oci-image==1.0.0 # via -r requirements.in diff --git a/tox.ini b/tox.ini index b90db48..1e25df3 100644 --- a/tox.ini +++ b/tox.ini @@ -22,3 +22,18 @@ setenv = update-requirements: TYPE = update-requirements commands = tox -vve {env:TYPE} -c {toxinidir}/charms/{env:CHARM} + +[testenv:update-requirements] +allowlist_externals = + bash + find + pip-compile + xargs +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. \ No newline at end of file