diff --git a/requirements.in b/requirements.in new file mode 100644 index 0000000..ced158b --- /dev/null +++ b/requirements.in @@ -0,0 +1,5 @@ +ops +jsonschema +cryptography +requests +rpds-py==0.18.0 diff --git a/requirements.txt b/requirements.txt index 0fff77e..6607155 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,45 @@ -ops ~= 2.15 -jsonschema -cryptography >= 42.0.0 -requests -rpds-py==0.18.0 \ No newline at end of file +# +# This file is autogenerated by pip-compile with Python 3.12 +# by the following command: +# +# pip-compile requirements.in +# +attrs==23.2.0 + # via + # jsonschema + # referencing +certifi==2024.7.4 + # via requests +cffi==1.16.0 + # via cryptography +charset-normalizer==3.3.2 + # via requests +cryptography==43.0.0 + # via -r requirements.in +idna==3.7 + # via requests +jsonschema==4.23.0 + # via -r requirements.in +jsonschema-specifications==2023.12.1 + # via jsonschema +ops==2.15.0 + # via -r requirements.in +pycparser==2.22 + # via cffi +pyyaml==6.0.1 + # via ops +referencing==0.35.1 + # via + # jsonschema + # jsonschema-specifications +requests==2.32.3 + # via -r requirements.in +rpds-py==0.18.0 + # via + # -r requirements.in + # jsonschema + # referencing +urllib3==2.2.2 + # via requests +websocket-client==1.8.0 + # via ops diff --git a/test-requirements.in b/test-requirements.in new file mode 100644 index 0000000..4fdad82 --- /dev/null +++ b/test-requirements.in @@ -0,0 +1,8 @@ +codespell +coverage[toml] +juju +ops-scenario +pyright +pytest +pytest-operator +ruff diff --git a/test-requirements.txt b/test-requirements.txt index cec5718..d9ff9a8 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1 +1,197 @@ -ops-scenario \ No newline at end of file +# +# This file is autogenerated by pip-compile with Python 3.12 +# by the following command: +# +# pip-compile --constraint=requirements.txt test-requirements.in +# +asttokens==2.4.1 + # via stack-data +bcrypt==4.2.0 + # via paramiko +cachetools==5.4.0 + # via google-auth +certifi==2024.7.4 + # via + # -c requirements.txt + # kubernetes + # requests +cffi==1.16.0 + # via + # -c requirements.txt + # cryptography + # pynacl +charset-normalizer==3.3.2 + # via + # -c requirements.txt + # requests +codespell==2.3.0 + # via -r test-requirements.in +coverage[toml]==7.6.0 + # via -r test-requirements.in +cryptography==43.0.0 + # via + # -c requirements.txt + # paramiko +decorator==5.1.1 + # via + # ipdb + # ipython +executing==2.0.1 + # via stack-data +google-auth==2.32.0 + # via kubernetes +hvac==2.3.0 + # via juju +idna==3.7 + # via + # -c requirements.txt + # requests +iniconfig==2.0.0 + # via pytest +ipdb==0.13.13 + # via pytest-operator +ipython==8.26.0 + # via ipdb +jedi==0.19.1 + # via ipython +jinja2==3.1.4 + # via pytest-operator +juju==3.5.2.0 + # via + # -r test-requirements.in + # pytest-operator +kubernetes==30.1.0 + # via juju +macaroonbakery==1.3.4 + # via juju +markupsafe==2.1.5 + # via jinja2 +matplotlib-inline==0.1.7 + # via ipython +mypy-extensions==1.0.0 + # via typing-inspect +nodeenv==1.9.1 + # via pyright +oauthlib==3.2.2 + # via + # kubernetes + # requests-oauthlib +ops==2.15.0 + # via + # -c requirements.txt + # ops-scenario +ops-scenario==6.1.5 + # via -r test-requirements.in +packaging==24.1 + # via + # juju + # pytest +paramiko==3.4.0 + # via juju +parso==0.8.4 + # via jedi +pexpect==4.9.0 + # via ipython +pluggy==1.5.0 + # via pytest +prompt-toolkit==3.0.47 + # via ipython +protobuf==5.27.3 + # via macaroonbakery +ptyprocess==0.7.0 + # via pexpect +pure-eval==0.2.3 + # via stack-data +pyasn1==0.6.0 + # via + # juju + # pyasn1-modules + # rsa +pyasn1-modules==0.4.0 + # via google-auth +pycparser==2.22 + # via + # -c requirements.txt + # cffi +pygments==2.18.0 + # via ipython +pymacaroons==0.13.0 + # via macaroonbakery +pynacl==1.5.0 + # via + # macaroonbakery + # paramiko + # pymacaroons +pyrfc3339==1.1 + # via + # juju + # macaroonbakery +pyright==1.1.374 + # via -r test-requirements.in +pytest==8.3.2 + # via + # -r test-requirements.in + # pytest-asyncio + # pytest-operator +pytest-asyncio==0.21.2 + # via pytest-operator +pytest-operator==0.35.0 + # via -r test-requirements.in +python-dateutil==2.9.0.post0 + # via kubernetes +pytz==2024.1 + # via pyrfc3339 +pyyaml==6.0.1 + # via + # -c requirements.txt + # juju + # kubernetes + # ops + # ops-scenario + # pytest-operator +requests==2.32.3 + # via + # -c requirements.txt + # hvac + # kubernetes + # macaroonbakery + # requests-oauthlib +requests-oauthlib==2.0.0 + # via kubernetes +rsa==4.9 + # via google-auth +ruff==0.5.6 + # via -r test-requirements.in +six==1.16.0 + # via + # asttokens + # kubernetes + # macaroonbakery + # pymacaroons + # python-dateutil +stack-data==0.6.3 + # via ipython +toposort==1.10 + # via juju +traitlets==5.14.3 + # via + # ipython + # matplotlib-inline +typing-extensions==4.12.2 + # via typing-inspect +typing-inspect==0.9.0 + # via juju +urllib3==2.2.2 + # via + # -c requirements.txt + # kubernetes + # requests +wcwidth==0.2.13 + # via prompt-toolkit +websocket-client==1.8.0 + # via + # -c requirements.txt + # kubernetes + # ops +websockets==12.0 + # via juju diff --git a/tox.ini b/tox.ini index 20e0744..bf2179b 100644 --- a/tox.ini +++ b/tox.ini @@ -17,6 +17,9 @@ set_env = PYTHONPATH = {tox_root}/lib:{[vars]src_path} PYTHONBREAKPOINT=pdb.set_trace PY_COLORS=1 +deps = + -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt pass_env = PYTHONPATH CHARM_BUILD_DIR @@ -24,17 +27,12 @@ pass_env = [testenv:format] description = Apply coding style standards to code -deps = - ruff commands = ruff check --fix {[vars]all_path} ruff format {[vars]all_path} [testenv:lint] description = Check code against coding style standards -deps = - ruff - codespell commands = codespell {tox_root} ruff check {[vars]all_path} @@ -42,11 +40,6 @@ commands = [testenv:unit] description = Run unit tests -deps = - pytest - coverage[toml] - -r {tox_root}/requirements.txt - -r {tox_root}/test-requirements.txt commands = coverage run --source={[vars]src_path} \ -m pytest \ @@ -59,19 +52,11 @@ commands = [testenv:static] description = Run static type checks -deps = - pyright - -r {tox_root}/requirements.txt commands = pyright {posargs} [testenv:integration] description = Run integration tests -deps = - pytest - juju - pytest-operator - -r {tox_root}/requirements.txt commands = pytest -v \ -s \