diff --git a/.github/workflows/keiko_test.yml b/.github/workflows/keiko_test.yml index 15cff56e424..6074f2538ad 100644 --- a/.github/workflows/keiko_test.yml +++ b/.github/workflows/keiko_test.yml @@ -27,6 +27,9 @@ jobs: python-version: ${{ matrix.version }} cache: 'pip' # caching pip dependencies + - name: Install Latex + run: sudo apt-get install -y --no-install-recommends texlive-latex-base texlive-latex-extra texlive-latex-recommended texlive-lang-european texlive-fonts-recommended + - name: Install requirements-dev.txt run: pip install -r requirements-dev.txt working-directory: ./keiko diff --git a/keiko/Makefile b/keiko/Makefile index 1b8b01addae..7340ce8e4d6 100644 --- a/keiko/Makefile +++ b/keiko/Makefile @@ -31,7 +31,7 @@ check-latex: done test: - python -m unittest discover -s tests -p "test_*.py" + pytest itest: docker-compose -f docker-compose-base.yml -f .ci/docker-compose.yml up -d --build @@ -75,5 +75,4 @@ clean: export-requirements: ## Export the requirements to requirements.txt poetry export --output requirements.txt --without-hashes && \ - poetry export --output requirements-dev.txt --with dev --without-hashes && \ - poetry export --output requirements-check.txt --only dev --without-hashes + poetry export --output requirements-dev.txt --with dev --without-hashes diff --git a/keiko/poetry.lock b/keiko/poetry.lock index b643a806df9..9d71afa06ad 100644 --- a/keiko/poetry.lock +++ b/keiko/poetry.lock @@ -22,69 +22,23 @@ test = ["contextlib2", "coverage[toml] (>=4.5)", "hypothesis (>=4.0)", "mock (>= trio = ["trio (>=0.16,<0.22)"] [[package]] -name = "astroid" -version = "2.12.12" -description = "An abstract syntax tree for Python with inference support." +name = "attrs" +version = "22.2.0" +description = "Classes Without Boilerplate" category = "dev" optional = false -python-versions = ">=3.7.2" -files = [ - {file = "astroid-2.12.12-py3-none-any.whl", hash = "sha256:72702205200b2a638358369d90c222d74ebc376787af8fb2f7f2a86f7b5cc85f"}, - {file = "astroid-2.12.12.tar.gz", hash = "sha256:1c00a14f5a3ed0339d38d2e2e5b74ea2591df5861c0936bb292b84ccf3a78d83"}, -] - -[package.dependencies] -lazy-object-proxy = ">=1.4.0" -typing-extensions = {version = ">=3.10", markers = "python_version < \"3.10\""} -wrapt = [ - {version = ">=1.11,<2", markers = "python_version < \"3.11\""}, - {version = ">=1.14,<2", markers = "python_version >= \"3.11\""}, -] - -[[package]] -name = "black" -version = "22.10.0" -description = "The uncompromising code formatter." -category = "dev" -optional = false -python-versions = ">=3.7" +python-versions = ">=3.6" files = [ - {file = "black-22.10.0-1fixedarch-cp310-cp310-macosx_11_0_x86_64.whl", hash = "sha256:5cc42ca67989e9c3cf859e84c2bf014f6633db63d1cbdf8fdb666dcd9e77e3fa"}, - {file = "black-22.10.0-1fixedarch-cp311-cp311-macosx_11_0_x86_64.whl", hash = "sha256:5d8f74030e67087b219b032aa33a919fae8806d49c867846bfacde57f43972ef"}, - {file = "black-22.10.0-1fixedarch-cp37-cp37m-macosx_10_16_x86_64.whl", hash = "sha256:197df8509263b0b8614e1df1756b1dd41be6738eed2ba9e9769f3880c2b9d7b6"}, - {file = "black-22.10.0-1fixedarch-cp38-cp38-macosx_10_16_x86_64.whl", hash = "sha256:2644b5d63633702bc2c5f3754b1b475378fbbfb481f62319388235d0cd104c2d"}, - {file = "black-22.10.0-1fixedarch-cp39-cp39-macosx_11_0_x86_64.whl", hash = "sha256:e41a86c6c650bcecc6633ee3180d80a025db041a8e2398dcc059b3afa8382cd4"}, - {file = "black-22.10.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2039230db3c6c639bd84efe3292ec7b06e9214a2992cd9beb293d639c6402edb"}, - {file = "black-22.10.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:14ff67aec0a47c424bc99b71005202045dc09270da44a27848d534600ac64fc7"}, - {file = "black-22.10.0-cp310-cp310-win_amd64.whl", hash = "sha256:819dc789f4498ecc91438a7de64427c73b45035e2e3680c92e18795a839ebb66"}, - {file = "black-22.10.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5b9b29da4f564ba8787c119f37d174f2b69cdfdf9015b7d8c5c16121ddc054ae"}, - {file = "black-22.10.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b8b49776299fece66bffaafe357d929ca9451450f5466e997a7285ab0fe28e3b"}, - {file = "black-22.10.0-cp311-cp311-win_amd64.whl", hash = "sha256:21199526696b8f09c3997e2b4db8d0b108d801a348414264d2eb8eb2532e540d"}, - {file = "black-22.10.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1e464456d24e23d11fced2bc8c47ef66d471f845c7b7a42f3bd77bf3d1789650"}, - {file = "black-22.10.0-cp37-cp37m-win_amd64.whl", hash = "sha256:9311e99228ae10023300ecac05be5a296f60d2fd10fff31cf5c1fa4ca4b1988d"}, - {file = "black-22.10.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:fba8a281e570adafb79f7755ac8721b6cf1bbf691186a287e990c7929c7692ff"}, - {file = "black-22.10.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:915ace4ff03fdfff953962fa672d44be269deb2eaf88499a0f8805221bc68c87"}, - {file = "black-22.10.0-cp38-cp38-win_amd64.whl", hash = "sha256:444ebfb4e441254e87bad00c661fe32df9969b2bf224373a448d8aca2132b395"}, - {file = "black-22.10.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:974308c58d057a651d182208a484ce80a26dac0caef2895836a92dd6ebd725e0"}, - {file = "black-22.10.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:72ef3925f30e12a184889aac03d77d031056860ccae8a1e519f6cbb742736383"}, - {file = "black-22.10.0-cp39-cp39-win_amd64.whl", hash = "sha256:432247333090c8c5366e69627ccb363bc58514ae3e63f7fc75c54b1ea80fa7de"}, - {file = "black-22.10.0-py3-none-any.whl", hash = "sha256:c957b2b4ea88587b46cf49d1dc17681c1e672864fd7af32fc1e9664d572b3458"}, - {file = "black-22.10.0.tar.gz", hash = "sha256:f513588da599943e0cde4e32cc9879e825d58720d6557062d1098c5ad80080e1"}, + {file = "attrs-22.2.0-py3-none-any.whl", hash = "sha256:29e95c7f6778868dbd49170f98f8818f78f3dc5e0e37c0b1f474e3561b240836"}, + {file = "attrs-22.2.0.tar.gz", hash = "sha256:c9227bfc2f01993c03f68db37d1d15c9690188323c067c641f1a35ca58185f99"}, ] -[package.dependencies] -click = ">=8.0.0" -mypy-extensions = ">=0.4.3" -pathspec = ">=0.9.0" -platformdirs = ">=2" -tomli = {version = ">=1.1.0", markers = "python_full_version < \"3.11.0a7\""} -typing-extensions = {version = ">=3.10.0.0", markers = "python_version < \"3.10\""} - [package.extras] -colorama = ["colorama (>=0.4.3)"] -d = ["aiohttp (>=3.7.4)"] -jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] -uvloop = ["uvloop (>=0.15.2)"] +cov = ["attrs[tests]", "coverage-enable-subprocess", "coverage[toml] (>=5.3)"] +dev = ["attrs[docs,tests]"] +docs = ["furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier", "zope.interface"] +tests = ["attrs[tests-no-zope]", "zope.interface"] +tests-no-zope = ["cloudpickle", "cloudpickle", "hypothesis", "hypothesis", "mypy (>=0.971,<0.990)", "mypy (>=0.971,<0.990)", "pympler", "pympler", "pytest (>=4.3.0)", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-mypy-plugins", "pytest-xdist[psutil]", "pytest-xdist[psutil]"] [[package]] name = "certifi" @@ -156,30 +110,30 @@ files = [ test = ["flake8 (==3.7.8)", "hypothesis (==3.55.3)"] [[package]] -name = "dill" -version = "0.3.6" -description = "serialize all of python" +name = "exceptiongroup" +version = "1.1.1" +description = "Backport of PEP 654 (exception groups)" category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "dill-0.3.6-py3-none-any.whl", hash = "sha256:a07ffd2351b8c678dfc4a856a3005f8067aea51d6ba6c700796a4d9e280f39f0"}, - {file = "dill-0.3.6.tar.gz", hash = "sha256:e5db55f3687856d8fbdab002ed78544e1c4559a130302693d839dfe8f93f2373"}, + {file = "exceptiongroup-1.1.1-py3-none-any.whl", hash = "sha256:232c37c63e4f682982c8b6459f33a8981039e5fb8756b2074364e5055c498c9e"}, + {file = "exceptiongroup-1.1.1.tar.gz", hash = "sha256:d484c3090ba2889ae2928419117447a14daf3c1231d5e30d0aae34f354f01785"}, ] [package.extras] -graph = ["objgraph (>=1.7.2)"] +test = ["pytest (>=6)"] [[package]] name = "fastapi" -version = "0.86.0" +version = "0.85.2" description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "fastapi-0.86.0-py3-none-any.whl", hash = "sha256:1020d7ca205d8b95813881fb3282e9c3656e47993531af3aa4ae11065b61dd2c"}, - {file = "fastapi-0.86.0.tar.gz", hash = "sha256:cdcaff84ecf7ae939b9579f0c98b0a0989ee3dd855710a32bc985260d92612f6"}, + {file = "fastapi-0.85.2-py3-none-any.whl", hash = "sha256:6292db0edd4a11f0d938d6033ccec5f706e9d476958bf33b119e8ddb4e524bde"}, + {file = "fastapi-0.85.2.tar.gz", hash = "sha256:3e10ea0992c700e0b17b6de8c2092d7b9cd763ce92c49ee8d4be10fee3b2f367"}, ] [package.dependencies] @@ -190,7 +144,7 @@ starlette = "0.20.4" all = ["email-validator (>=1.1.1,<2.0.0)", "itsdangerous (>=1.1.0,<3.0.0)", "jinja2 (>=2.11.2,<4.0.0)", "orjson (>=3.2.1,<4.0.0)", "python-multipart (>=0.0.5,<0.0.6)", "pyyaml (>=5.3.1,<7.0.0)", "requests (>=2.24.0,<3.0.0)", "ujson (>=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0,<6.0.0)", "uvicorn[standard] (>=0.12.0,<0.19.0)"] dev = ["autoflake (>=1.4.0,<2.0.0)", "flake8 (>=3.8.3,<6.0.0)", "pre-commit (>=2.17.0,<3.0.0)", "uvicorn[standard] (>=0.12.0,<0.19.0)"] doc = ["mdx-include (>=1.4.1,<2.0.0)", "mkdocs (>=1.1.2,<2.0.0)", "mkdocs-markdownextradata-plugin (>=0.1.7,<0.3.0)", "mkdocs-material (>=8.1.4,<9.0.0)", "pyyaml (>=5.3.1,<7.0.0)", "typer[all] (>=0.6.1,<0.7.0)"] -test = ["anyio[trio] (>=3.2.1,<4.0.0)", "black (==22.8.0)", "coverage[toml] (>=6.5.0,<7.0)", "databases[sqlite] (>=0.3.2,<0.7.0)", "email-validator (>=1.1.1,<2.0.0)", "flake8 (>=3.8.3,<6.0.0)", "flask (>=1.1.2,<3.0.0)", "httpx (>=0.23.0,<0.24.0)", "isort (>=5.0.6,<6.0.0)", "mypy (==0.982)", "orjson (>=3.2.1,<4.0.0)", "passlib[bcrypt] (>=1.7.2,<2.0.0)", "peewee (>=3.13.3,<4.0.0)", "pytest (>=7.1.3,<8.0.0)", "python-jose[cryptography] (>=3.3.0,<4.0.0)", "python-multipart (>=0.0.5,<0.0.6)", "pyyaml (>=5.3.1,<7.0.0)", "requests (>=2.24.0,<3.0.0)", "sqlalchemy (>=1.3.18,<=1.4.41)", "types-orjson (==3.6.2)", "types-ujson (==5.5.0)", "ujson (>=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0,<6.0.0)"] +test = ["anyio[trio] (>=3.2.1,<4.0.0)", "black (==22.8.0)", "databases[sqlite] (>=0.3.2,<0.7.0)", "email-validator (>=1.1.1,<2.0.0)", "flake8 (>=3.8.3,<6.0.0)", "flask (>=1.1.2,<3.0.0)", "httpx (>=0.23.0,<0.24.0)", "isort (>=5.0.6,<6.0.0)", "mypy (==0.982)", "orjson (>=3.2.1,<4.0.0)", "passlib[bcrypt] (>=1.7.2,<2.0.0)", "peewee (>=3.13.3,<4.0.0)", "pytest (>=7.1.3,<8.0.0)", "pytest-cov (>=2.12.0,<5.0.0)", "python-jose[cryptography] (>=3.3.0,<4.0.0)", "python-multipart (>=0.0.5,<0.0.6)", "pyyaml (>=5.3.1,<7.0.0)", "requests (>=2.24.0,<3.0.0)", "sqlalchemy (>=1.3.18,<=1.4.41)", "types-orjson (==3.6.2)", "types-ujson (==5.5.0)", "ujson (>=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0,<6.0.0)"] [[package]] name = "h11" @@ -217,23 +171,17 @@ files = [ ] [[package]] -name = "isort" -version = "5.10.1" -description = "A Python utility / library to sort Python imports." +name = "iniconfig" +version = "2.0.0" +description = "brain-dead simple config-ini parsing" category = "dev" optional = false -python-versions = ">=3.6.1,<4.0" +python-versions = ">=3.7" files = [ - {file = "isort-5.10.1-py3-none-any.whl", hash = "sha256:6f62d78e2f89b4500b080fe3a81690850cd254227f27f75c3a0c491a1f351ba7"}, - {file = "isort-5.10.1.tar.gz", hash = "sha256:e8443a5e7a020e9d7f97f1d7d9cd17c88bcb3bc7e218bf9cf5095fe550be2951"}, + {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, + {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, ] -[package.extras] -colors = ["colorama (>=0.4.3,<0.5.0)"] -pipfile-deprecated-finder = ["pipreqs", "requirementslib"] -plugins = ["setuptools"] -requirements-deprecated-finder = ["pip-api", "pipreqs"] - [[package]] name = "Jinja2" version = "3.1.2" @@ -252,35 +200,6 @@ MarkupSafe = ">=2.0" [package.extras] i18n = ["Babel (>=2.7)"] -[[package]] -name = "lazy-object-proxy" -version = "1.8.0" -description = "A fast and thorough lazy object proxy." -category = "dev" -optional = false -python-versions = ">=3.7" -files = [ - {file = "lazy-object-proxy-1.8.0.tar.gz", hash = "sha256:c219a00245af0f6fa4e95901ed28044544f50152840c5b6a3e7b2568db34d156"}, - {file = "lazy_object_proxy-1.8.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:4fd031589121ad46e293629b39604031d354043bb5cdf83da4e93c2d7f3389fe"}, - {file = "lazy_object_proxy-1.8.0-cp310-cp310-win32.whl", hash = "sha256:b70d6e7a332eb0217e7872a73926ad4fdc14f846e85ad6749ad111084e76df25"}, - {file = "lazy_object_proxy-1.8.0-cp310-cp310-win_amd64.whl", hash = "sha256:eb329f8d8145379bf5dbe722182410fe8863d186e51bf034d2075eb8d85ee25b"}, - {file = "lazy_object_proxy-1.8.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4e2d9f764f1befd8bdc97673261b8bb888764dfdbd7a4d8f55e4fbcabb8c3fb7"}, - {file = "lazy_object_proxy-1.8.0-cp311-cp311-win32.whl", hash = "sha256:e20bfa6db17a39c706d24f82df8352488d2943a3b7ce7d4c22579cb89ca8896e"}, - {file = "lazy_object_proxy-1.8.0-cp311-cp311-win_amd64.whl", hash = "sha256:14010b49a2f56ec4943b6cf925f597b534ee2fe1f0738c84b3bce0c1a11ff10d"}, - {file = "lazy_object_proxy-1.8.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:6850e4aeca6d0df35bb06e05c8b934ff7c533734eb51d0ceb2d63696f1e6030c"}, - {file = "lazy_object_proxy-1.8.0-cp37-cp37m-win32.whl", hash = "sha256:5b51d6f3bfeb289dfd4e95de2ecd464cd51982fe6f00e2be1d0bf94864d58acd"}, - {file = "lazy_object_proxy-1.8.0-cp37-cp37m-win_amd64.whl", hash = "sha256:6f593f26c470a379cf7f5bc6db6b5f1722353e7bf937b8d0d0b3fba911998858"}, - {file = "lazy_object_proxy-1.8.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0c1c7c0433154bb7c54185714c6929acc0ba04ee1b167314a779b9025517eada"}, - {file = "lazy_object_proxy-1.8.0-cp38-cp38-win32.whl", hash = "sha256:d176f392dbbdaacccf15919c77f526edf11a34aece58b55ab58539807b85436f"}, - {file = "lazy_object_proxy-1.8.0-cp38-cp38-win_amd64.whl", hash = "sha256:afcaa24e48bb23b3be31e329deb3f1858f1f1df86aea3d70cb5c8578bfe5261c"}, - {file = "lazy_object_proxy-1.8.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:71d9ae8a82203511a6f60ca5a1b9f8ad201cac0fc75038b2dc5fa519589c9288"}, - {file = "lazy_object_proxy-1.8.0-cp39-cp39-win32.whl", hash = "sha256:8f6ce2118a90efa7f62dd38c7dbfffd42f468b180287b748626293bf12ed468f"}, - {file = "lazy_object_proxy-1.8.0-cp39-cp39-win_amd64.whl", hash = "sha256:eac3a9a5ef13b332c059772fd40b4b1c3d45a3a2b05e33a361dee48e54a4dad0"}, - {file = "lazy_object_proxy-1.8.0-pp37-pypy37_pp73-any.whl", hash = "sha256:ae032743794fba4d171b5b67310d69176287b5bf82a21f588282406a79498891"}, - {file = "lazy_object_proxy-1.8.0-pp38-pypy38_pp73-any.whl", hash = "sha256:7e1561626c49cb394268edd00501b289053a652ed762c58e1081224c8d881cec"}, - {file = "lazy_object_proxy-1.8.0-pp39-pypy39_pp73-any.whl", hash = "sha256:ce58b2b3734c73e68f0e30e4e725264d4d6be95818ec0a0be4bb6bf9a7e79aa8"}, -] - [[package]] name = "MarkupSafe" version = "2.1.1" @@ -332,71 +251,15 @@ files = [ ] [[package]] -name = "mccabe" -version = "0.7.0" -description = "McCabe checker, plugin for flake8" -category = "dev" -optional = false -python-versions = ">=3.6" -files = [ - {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"}, - {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, -] - -[[package]] -name = "mypy" -version = "0.982" -description = "Optional static typing for Python" +name = "packaging" +version = "23.0" +description = "Core utilities for Python packages" category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "mypy-0.982-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:5085e6f442003fa915aeb0a46d4da58128da69325d8213b4b35cc7054090aed5"}, - {file = "mypy-0.982-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:41fd1cf9bc0e1c19b9af13a6580ccb66c381a5ee2cf63ee5ebab747a4badeba3"}, - {file = "mypy-0.982-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f793e3dd95e166b66d50e7b63e69e58e88643d80a3dcc3bcd81368e0478b089c"}, - {file = "mypy-0.982-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:86ebe67adf4d021b28c3f547da6aa2cce660b57f0432617af2cca932d4d378a6"}, - {file = "mypy-0.982-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:175f292f649a3af7082fe36620369ffc4661a71005aa9f8297ea473df5772046"}, - {file = "mypy-0.982-cp310-cp310-win_amd64.whl", hash = "sha256:8ee8c2472e96beb1045e9081de8e92f295b89ac10c4109afdf3a23ad6e644f3e"}, - {file = "mypy-0.982-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:58f27ebafe726a8e5ccb58d896451dd9a662a511a3188ff6a8a6a919142ecc20"}, - {file = "mypy-0.982-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d6af646bd46f10d53834a8e8983e130e47d8ab2d4b7a97363e35b24e1d588947"}, - {file = "mypy-0.982-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:e7aeaa763c7ab86d5b66ff27f68493d672e44c8099af636d433a7f3fa5596d40"}, - {file = "mypy-0.982-cp37-cp37m-win_amd64.whl", hash = "sha256:724d36be56444f569c20a629d1d4ee0cb0ad666078d59bb84f8f887952511ca1"}, - {file = "mypy-0.982-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:14d53cdd4cf93765aa747a7399f0961a365bcddf7855d9cef6306fa41de01c24"}, - {file = "mypy-0.982-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:26ae64555d480ad4b32a267d10cab7aec92ff44de35a7cd95b2b7cb8e64ebe3e"}, - {file = "mypy-0.982-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:6389af3e204975d6658de4fb8ac16f58c14e1bacc6142fee86d1b5b26aa52bda"}, - {file = "mypy-0.982-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7b35ce03a289480d6544aac85fa3674f493f323d80ea7226410ed065cd46f206"}, - {file = "mypy-0.982-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:c6e564f035d25c99fd2b863e13049744d96bd1947e3d3d2f16f5828864506763"}, - {file = "mypy-0.982-cp38-cp38-win_amd64.whl", hash = "sha256:cebca7fd333f90b61b3ef7f217ff75ce2e287482206ef4a8b18f32b49927b1a2"}, - {file = "mypy-0.982-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:a705a93670c8b74769496280d2fe6cd59961506c64f329bb179970ff1d24f9f8"}, - {file = "mypy-0.982-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:75838c649290d83a2b83a88288c1eb60fe7a05b36d46cbea9d22efc790002146"}, - {file = "mypy-0.982-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:91781eff1f3f2607519c8b0e8518aad8498af1419e8442d5d0afb108059881fc"}, - {file = "mypy-0.982-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eaa97b9ddd1dd9901a22a879491dbb951b5dec75c3b90032e2baa7336777363b"}, - {file = "mypy-0.982-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a692a8e7d07abe5f4b2dd32d731812a0175626a90a223d4b58f10f458747dd8a"}, - {file = "mypy-0.982-cp39-cp39-win_amd64.whl", hash = "sha256:eb7a068e503be3543c4bd329c994103874fa543c1727ba5288393c21d912d795"}, - {file = "mypy-0.982-py3-none-any.whl", hash = "sha256:1021c241e8b6e1ca5a47e4d52601274ac078a89845cfde66c6d5f769819ffa1d"}, - {file = "mypy-0.982.tar.gz", hash = "sha256:85f7a343542dc8b1ed0a888cdd34dca56462654ef23aa673907305b260b3d746"}, -] - -[package.dependencies] -mypy-extensions = ">=0.4.3" -tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} -typing-extensions = ">=3.10" - -[package.extras] -dmypy = ["psutil (>=4.0)"] -python2 = ["typed-ast (>=1.4.0,<2)"] -reports = ["lxml"] - -[[package]] -name = "mypy-extensions" -version = "0.4.3" -description = "Experimental type system extensions for programs checked with the mypy typechecker." -category = "dev" -optional = false -python-versions = "*" -files = [ - {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"}, - {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"}, + {file = "packaging-23.0-py3-none-any.whl", hash = "sha256:714ac14496c3e68c99c29b00845f7a2b85f3bb6f1078fd9f72fd20f0570002b2"}, + {file = "packaging-23.0.tar.gz", hash = "sha256:b6ad297f8907de0fa2fe1ccbd26fdaf387f5f47c7275fedf8cce89f99446cf97"}, ] [[package]] @@ -412,20 +275,20 @@ files = [ ] [[package]] -name = "platformdirs" -version = "2.5.2" -description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +name = "pluggy" +version = "1.0.0" +description = "plugin and hook calling mechanisms for python" category = "dev" optional = false -python-versions = ">=3.7" +python-versions = ">=3.6" files = [ - {file = "platformdirs-2.5.2-py3-none-any.whl", hash = "sha256:027d8e83a2d7de06bbac4e5ef7e023c02b863d7ea5d079477e722bb41ab25788"}, - {file = "platformdirs-2.5.2.tar.gz", hash = "sha256:58c8abb07dcb441e6ee4b11d8df0ac856038f944ab98b7be6b27b2a3c7feef19"}, + {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, + {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, ] [package.extras] -docs = ["furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx (>=4)", "sphinx-autodoc-typehints (>=1.12)"] -test = ["appdirs (==1.4.4)", "pytest (>=6)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)"] +dev = ["pre-commit", "tox"] +testing = ["pytest", "pytest-benchmark"] [[package]] name = "prompt-toolkit" @@ -513,31 +376,28 @@ files = [ plugins = ["importlib-metadata"] [[package]] -name = "pylint" -version = "2.15.5" -description = "python code static checker" +name = "pytest" +version = "7.2.2" +description = "pytest: simple powerful testing with Python" category = "dev" optional = false -python-versions = ">=3.7.2" +python-versions = ">=3.7" files = [ - {file = "pylint-2.15.5-py3-none-any.whl", hash = "sha256:c2108037eb074334d9e874dc3c783752cc03d0796c88c9a9af282d0f161a1004"}, - {file = "pylint-2.15.5.tar.gz", hash = "sha256:3b120505e5af1d06a5ad76b55d8660d44bf0f2fc3c59c2bdd94e39188ee3a4df"}, + {file = "pytest-7.2.2-py3-none-any.whl", hash = "sha256:130328f552dcfac0b1cec75c12e3f005619dc5f874f0a06e8ff7263f0ee6225e"}, + {file = "pytest-7.2.2.tar.gz", hash = "sha256:c99ab0c73aceb050f68929bc93af19ab6db0558791c6a0715723abe9d0ade9d4"}, ] [package.dependencies] -astroid = ">=2.12.12,<=2.14.0-dev0" -colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} -dill = ">=0.2" -isort = ">=4.2.5,<6" -mccabe = ">=0.6,<0.8" -platformdirs = ">=2.2.0" -tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} -tomlkit = ">=0.10.1" -typing-extensions = {version = ">=3.10.0", markers = "python_version < \"3.10\""} +attrs = ">=19.2.0" +colorama = {version = "*", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} +iniconfig = "*" +packaging = "*" +pluggy = ">=0.12,<2.0" +tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} [package.extras] -spelling = ["pyenchant (>=3.2,<4.0)"] -testutils = ["gitpython (>3)"] +testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "xmlschema"] [[package]] name = "requests" @@ -739,18 +599,6 @@ files = [ {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, ] -[[package]] -name = "tomlkit" -version = "0.11.6" -description = "Style preserving TOML library" -category = "dev" -optional = false -python-versions = ">=3.6" -files = [ - {file = "tomlkit-0.11.6-py3-none-any.whl", hash = "sha256:07de26b0d8cfc18f871aec595fda24d95b08fef89d147caa861939f37230bf4b"}, - {file = "tomlkit-0.11.6.tar.gz", hash = "sha256:71b952e5721688937fb02cf9d354dbcf0785066149d2855e44531ebdd2b65d73"}, -] - [[package]] name = "typing-extensions" version = "4.4.0" @@ -826,81 +674,7 @@ files = [ {file = "wcwidth-0.2.6.tar.gz", hash = "sha256:a5220780a404dbe3353789870978e472cfe477761f06ee55077256e509b156d0"}, ] -[[package]] -name = "wrapt" -version = "1.14.1" -description = "Module for decorators, wrappers and monkey patching." -category = "dev" -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" -files = [ - {file = "wrapt-1.14.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:1b376b3f4896e7930f1f772ac4b064ac12598d1c38d04907e696cc4d794b43d3"}, - {file = "wrapt-1.14.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:903500616422a40a98a5a3c4ff4ed9d0066f3b4c951fa286018ecdf0750194ef"}, - {file = "wrapt-1.14.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:5a9a0d155deafd9448baff28c08e150d9b24ff010e899311ddd63c45c2445e28"}, - {file = "wrapt-1.14.1-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:ddaea91abf8b0d13443f6dac52e89051a5063c7d014710dcb4d4abb2ff811a59"}, - {file = "wrapt-1.14.1-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:36f582d0c6bc99d5f39cd3ac2a9062e57f3cf606ade29a0a0d6b323462f4dd87"}, - {file = "wrapt-1.14.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:7ef58fb89674095bfc57c4069e95d7a31cfdc0939e2a579882ac7d55aadfd2a1"}, - {file = "wrapt-1.14.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:e2f83e18fe2f4c9e7db597e988f72712c0c3676d337d8b101f6758107c42425b"}, - {file = "wrapt-1.14.1-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:ee2b1b1769f6707a8a445162ea16dddf74285c3964f605877a20e38545c3c462"}, - {file = "wrapt-1.14.1-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:833b58d5d0b7e5b9832869f039203389ac7cbf01765639c7309fd50ef619e0b1"}, - {file = "wrapt-1.14.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:80bb5c256f1415f747011dc3604b59bc1f91c6e7150bd7db03b19170ee06b320"}, - {file = "wrapt-1.14.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:07f7a7d0f388028b2df1d916e94bbb40624c59b48ecc6cbc232546706fac74c2"}, - {file = "wrapt-1.14.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:02b41b633c6261feff8ddd8d11c711df6842aba629fdd3da10249a53211a72c4"}, - {file = "wrapt-1.14.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2fe803deacd09a233e4762a1adcea5db5d31e6be577a43352936179d14d90069"}, - {file = "wrapt-1.14.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:257fd78c513e0fb5cdbe058c27a0624c9884e735bbd131935fd49e9fe719d310"}, - {file = "wrapt-1.14.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:4fcc4649dc762cddacd193e6b55bc02edca674067f5f98166d7713b193932b7f"}, - {file = "wrapt-1.14.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:11871514607b15cfeb87c547a49bca19fde402f32e2b1c24a632506c0a756656"}, - {file = "wrapt-1.14.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8ad85f7f4e20964db4daadcab70b47ab05c7c1cf2a7c1e51087bfaa83831854c"}, - {file = "wrapt-1.14.1-cp310-cp310-win32.whl", hash = "sha256:a9a52172be0b5aae932bef82a79ec0a0ce87288c7d132946d645eba03f0ad8a8"}, - {file = "wrapt-1.14.1-cp310-cp310-win_amd64.whl", hash = "sha256:6d323e1554b3d22cfc03cd3243b5bb815a51f5249fdcbb86fda4bf62bab9e164"}, - {file = "wrapt-1.14.1-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:43ca3bbbe97af00f49efb06e352eae40434ca9d915906f77def219b88e85d907"}, - {file = "wrapt-1.14.1-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:6b1a564e6cb69922c7fe3a678b9f9a3c54e72b469875aa8018f18b4d1dd1adf3"}, - {file = "wrapt-1.14.1-cp35-cp35m-manylinux2010_i686.whl", hash = "sha256:00b6d4ea20a906c0ca56d84f93065b398ab74b927a7a3dbd470f6fc503f95dc3"}, - {file = "wrapt-1.14.1-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:a85d2b46be66a71bedde836d9e41859879cc54a2a04fad1191eb50c2066f6e9d"}, - {file = "wrapt-1.14.1-cp35-cp35m-win32.whl", hash = "sha256:dbcda74c67263139358f4d188ae5faae95c30929281bc6866d00573783c422b7"}, - {file = "wrapt-1.14.1-cp35-cp35m-win_amd64.whl", hash = "sha256:b21bb4c09ffabfa0e85e3a6b623e19b80e7acd709b9f91452b8297ace2a8ab00"}, - {file = "wrapt-1.14.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:9e0fd32e0148dd5dea6af5fee42beb949098564cc23211a88d799e434255a1f4"}, - {file = "wrapt-1.14.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9736af4641846491aedb3c3f56b9bc5568d92b0692303b5a305301a95dfd38b1"}, - {file = "wrapt-1.14.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5b02d65b9ccf0ef6c34cba6cf5bf2aab1bb2f49c6090bafeecc9cd81ad4ea1c1"}, - {file = "wrapt-1.14.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:21ac0156c4b089b330b7666db40feee30a5d52634cc4560e1905d6529a3897ff"}, - {file = "wrapt-1.14.1-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:9f3e6f9e05148ff90002b884fbc2a86bd303ae847e472f44ecc06c2cd2fcdb2d"}, - {file = "wrapt-1.14.1-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:6e743de5e9c3d1b7185870f480587b75b1cb604832e380d64f9504a0535912d1"}, - {file = "wrapt-1.14.1-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:d79d7d5dc8a32b7093e81e97dad755127ff77bcc899e845f41bf71747af0c569"}, - {file = "wrapt-1.14.1-cp36-cp36m-win32.whl", hash = "sha256:81b19725065dcb43df02b37e03278c011a09e49757287dca60c5aecdd5a0b8ed"}, - {file = "wrapt-1.14.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b014c23646a467558be7da3d6b9fa409b2c567d2110599b7cf9a0c5992b3b471"}, - {file = "wrapt-1.14.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:88bd7b6bd70a5b6803c1abf6bca012f7ed963e58c68d76ee20b9d751c74a3248"}, - {file = "wrapt-1.14.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b5901a312f4d14c59918c221323068fad0540e34324925c8475263841dbdfe68"}, - {file = "wrapt-1.14.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d77c85fedff92cf788face9bfa3ebaa364448ebb1d765302e9af11bf449ca36d"}, - {file = "wrapt-1.14.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8d649d616e5c6a678b26d15ece345354f7c2286acd6db868e65fcc5ff7c24a77"}, - {file = "wrapt-1.14.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:7d2872609603cb35ca513d7404a94d6d608fc13211563571117046c9d2bcc3d7"}, - {file = "wrapt-1.14.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:ee6acae74a2b91865910eef5e7de37dc6895ad96fa23603d1d27ea69df545015"}, - {file = "wrapt-1.14.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:2b39d38039a1fdad98c87279b48bc5dce2c0ca0d73483b12cb72aa9609278e8a"}, - {file = "wrapt-1.14.1-cp37-cp37m-win32.whl", hash = "sha256:60db23fa423575eeb65ea430cee741acb7c26a1365d103f7b0f6ec412b893853"}, - {file = "wrapt-1.14.1-cp37-cp37m-win_amd64.whl", hash = "sha256:709fe01086a55cf79d20f741f39325018f4df051ef39fe921b1ebe780a66184c"}, - {file = "wrapt-1.14.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8c0ce1e99116d5ab21355d8ebe53d9460366704ea38ae4d9f6933188f327b456"}, - {file = "wrapt-1.14.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:e3fb1677c720409d5f671e39bac6c9e0e422584e5f518bfd50aa4cbbea02433f"}, - {file = "wrapt-1.14.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:642c2e7a804fcf18c222e1060df25fc210b9c58db7c91416fb055897fc27e8cc"}, - {file = "wrapt-1.14.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7b7c050ae976e286906dd3f26009e117eb000fb2cf3533398c5ad9ccc86867b1"}, - {file = "wrapt-1.14.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ef3f72c9666bba2bab70d2a8b79f2c6d2c1a42a7f7e2b0ec83bb2f9e383950af"}, - {file = "wrapt-1.14.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:01c205616a89d09827986bc4e859bcabd64f5a0662a7fe95e0d359424e0e071b"}, - {file = "wrapt-1.14.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:5a0f54ce2c092aaf439813735584b9537cad479575a09892b8352fea5e988dc0"}, - {file = "wrapt-1.14.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:2cf71233a0ed05ccdabe209c606fe0bac7379fdcf687f39b944420d2a09fdb57"}, - {file = "wrapt-1.14.1-cp38-cp38-win32.whl", hash = "sha256:aa31fdcc33fef9eb2552cbcbfee7773d5a6792c137b359e82879c101e98584c5"}, - {file = "wrapt-1.14.1-cp38-cp38-win_amd64.whl", hash = "sha256:d1967f46ea8f2db647c786e78d8cc7e4313dbd1b0aca360592d8027b8508e24d"}, - {file = "wrapt-1.14.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3232822c7d98d23895ccc443bbdf57c7412c5a65996c30442ebe6ed3df335383"}, - {file = "wrapt-1.14.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:988635d122aaf2bdcef9e795435662bcd65b02f4f4c1ae37fbee7401c440b3a7"}, - {file = "wrapt-1.14.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9cca3c2cdadb362116235fdbd411735de4328c61425b0aa9f872fd76d02c4e86"}, - {file = "wrapt-1.14.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d52a25136894c63de15a35bc0bdc5adb4b0e173b9c0d07a2be9d3ca64a332735"}, - {file = "wrapt-1.14.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:40e7bc81c9e2b2734ea4bc1aceb8a8f0ceaac7c5299bc5d69e37c44d9081d43b"}, - {file = "wrapt-1.14.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b9b7a708dd92306328117d8c4b62e2194d00c365f18eff11a9b53c6f923b01e3"}, - {file = "wrapt-1.14.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:6a9a25751acb379b466ff6be78a315e2b439d4c94c1e99cb7266d40a537995d3"}, - {file = "wrapt-1.14.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:34aa51c45f28ba7f12accd624225e2b1e5a3a45206aa191f6f9aac931d9d56fe"}, - {file = "wrapt-1.14.1-cp39-cp39-win32.whl", hash = "sha256:dee0ce50c6a2dd9056c20db781e9c1cfd33e77d2d569f5d1d9321c641bb903d5"}, - {file = "wrapt-1.14.1-cp39-cp39-win_amd64.whl", hash = "sha256:dee60e1de1898bde3b238f18340eec6148986da0455d8ba7848d50470a7a32fb"}, - {file = "wrapt-1.14.1.tar.gz", hash = "sha256:380a85cf89e0e69b7cfbe2ea9f765f004ff419f34194018a6827ac0e3edfed4d"}, -] - [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "30638683b4afe8b7beca0aa2f4d12bedb02c9ae1bf359c30f204ea0ecd2c913a" +content-hash = "b8bec08d31b166af09c4fb9b47e408474e0759bd5541cbc54493f38799b9835e" diff --git a/keiko/pyproject.toml b/keiko/pyproject.toml index 20098a0cee3..1e7a57237eb 100644 --- a/keiko/pyproject.toml +++ b/keiko/pyproject.toml @@ -4,6 +4,9 @@ version = "0.1.0" description = "KAT report engine using LateX to generate PDF" authors = ["MinVWS "] license = "EUPL" +[tool.poetry.group.dev.dependencies] +pytest = "^7.2.2" + [tool.vulture] min_confidence = 90 @@ -31,16 +34,14 @@ python = "^3.8" click = "^8.1.3" pydantic = "^1.9.2" Jinja2 = "^3.1.2" -fastapi = "^0.79.1" -uvicorn = "^0.18.2" +fastapi = "^0.85.2" +uvicorn = "^0.19.0" vulture = "^2.5" [tool.poetry.dev-dependencies] -black = "^22.6.0" -mypy = "^0.971" -pylint = "^2.14.5" +pytest = "^7.2.2" robotframework-tidy = "^3.2" -robotframework = "^5.0.1" +robotframework = "^6.0.1" robotframework-debuglibrary = "^2.3.0" robotframework-requests = "^0.9.3" diff --git a/keiko/requirements-check.txt b/keiko/requirements-check.txt deleted file mode 100644 index d60b295505d..00000000000 --- a/keiko/requirements-check.txt +++ /dev/null @@ -1,33 +0,0 @@ -astroid==2.12.12 ; python_version >= "3.8" and python_version < "4.0" -black==22.10.0 ; python_version >= "3.8" and python_version < "4.0" -certifi==2022.9.24 ; python_version >= "3.8" and python_version < "4" -charset-normalizer==2.1.1 ; python_version >= "3.8" and python_version < "4" -click==8.1.3 ; python_version >= "3.8" and python_version < "4.0" -colorama==0.4.6 ; python_version >= "3.8" and python_version < "4.0" -commonmark==0.9.1 ; python_version >= "3.8" and python_version < "4.0" -dill==0.3.6 ; python_version >= "3.8" and python_version < "4.0" -idna==3.4 ; python_version >= "3.8" and python_version < "4" -isort==5.10.1 ; python_version >= "3.8" and python_version < "4.0" -lazy-object-proxy==1.8.0 ; python_version >= "3.8" and python_version < "4.0" -mccabe==0.7.0 ; python_version >= "3.8" and python_version < "4.0" -mypy-extensions==0.4.3 ; python_version >= "3.8" and python_version < "4.0" -mypy==0.982 ; python_version >= "3.8" and python_version < "4.0" -pathspec==0.9.0 ; python_version >= "3.8" and python_version < "4.0" -platformdirs==2.5.2 ; python_version >= "3.8" and python_version < "4.0" -pycodestyle==2.9.1 ; python_version >= "3.8" and python_version < "4.0" -pyflakes==2.5.0 ; python_version >= "3.8" and python_version < "4.0" -pygments==2.13.0 ; python_version >= "3.8" and python_version < "4.0" -pylint==2.15.5 ; python_version >= "3.8" and python_version < "4.0" -requests==2.28.1 ; python_version >= "3.8" and python_version < "4" -rich-click==1.4 ; python_version >= "3.8" and python_version < "4.0" -rich==12.6.0 ; python_version >= "3.8" and python_version < "4.0" -robotframework-requests==0.9.4 ; python_version >= "3.8" and python_version < "4.0" -robotframework-tidy==3.3.2 ; python_version >= "3.8" and python_version < "4.0" -robotframework==6.0.1 ; python_version >= "3.8" and python_version < "4.0" -toml==0.10.2 ; python_version >= "3.8" and python_version < "4.0" -tomli==2.0.1 ; python_version >= "3.8" and python_version < "4.0" -tomlkit==0.11.6 ; python_version >= "3.8" and python_version < "4.0" -typing-extensions==4.4.0 ; python_version >= "3.8" and python_version < "4.0" -urllib3==1.26.12 ; python_version >= "3.8" and python_version < "4" -vulture==2.6 ; python_version >= "3.8" and python_version < "4.0" -wrapt==1.14.1 ; python_version >= "3.8" and python_version < "4.0" diff --git a/keiko/requirements-dev.txt b/keiko/requirements-dev.txt index 9b86a9b03ce..43bdae2995b 100644 --- a/keiko/requirements-dev.txt +++ b/keiko/requirements-dev.txt @@ -1,42 +1,38 @@ anyio==3.6.2 ; python_version >= "3.8" and python_version < "4.0" -astroid==2.12.12 ; python_version >= "3.8" and python_version < "4.0" -black==22.10.0 ; python_version >= "3.8" and python_version < "4.0" -certifi==2022.9.24 ; python_version >= "3.8" and python_version < "4" +attrs==22.2.0 ; python_version >= "3.8" and python_version < "4.0" +certifi==2022.12.7 ; python_version >= "3.8" and python_version < "4" charset-normalizer==2.1.1 ; python_version >= "3.8" and python_version < "4" click==8.1.3 ; python_version >= "3.8" and python_version < "4.0" colorama==0.4.6 ; python_version >= "3.8" and python_version < "4.0" commonmark==0.9.1 ; python_version >= "3.8" and python_version < "4.0" -dill==0.3.6 ; python_version >= "3.8" and python_version < "4.0" +exceptiongroup==1.1.1 ; python_version >= "3.8" and python_version < "3.11" fastapi==0.85.2 ; python_version >= "3.8" and python_version < "4.0" h11==0.14.0 ; python_version >= "3.8" and python_version < "4.0" idna==3.4 ; python_version >= "3.8" and python_version < "4" -isort==5.10.1 ; python_version >= "3.8" and python_version < "4.0" +iniconfig==2.0.0 ; python_version >= "3.8" and python_version < "4.0" jinja2==3.1.2 ; python_version >= "3.8" and python_version < "4.0" -lazy-object-proxy==1.8.0 ; python_version >= "3.8" and python_version < "4.0" markupsafe==2.1.1 ; python_version >= "3.8" and python_version < "4.0" -mccabe==0.7.0 ; python_version >= "3.8" and python_version < "4.0" -mypy-extensions==0.4.3 ; python_version >= "3.8" and python_version < "4.0" -mypy==0.982 ; python_version >= "3.8" and python_version < "4.0" +packaging==23.0 ; python_version >= "3.8" and python_version < "4.0" pathspec==0.9.0 ; python_version >= "3.8" and python_version < "4.0" -platformdirs==2.5.2 ; python_version >= "3.8" and python_version < "4.0" -pycodestyle==2.9.1 ; python_version >= "3.8" and python_version < "4.0" +pluggy==1.0.0 ; python_version >= "3.8" and python_version < "4.0" +prompt-toolkit==2.0.10 ; python_version >= "3.8" and python_version < "4.0" pydantic==1.10.2 ; python_version >= "3.8" and python_version < "4.0" -pyflakes==2.5.0 ; python_version >= "3.8" and python_version < "4.0" pygments==2.13.0 ; python_version >= "3.8" and python_version < "4.0" -pylint==2.15.5 ; python_version >= "3.8" and python_version < "4.0" +pytest==7.2.2 ; python_version >= "3.8" and python_version < "4.0" requests==2.28.1 ; python_version >= "3.8" and python_version < "4" rich-click==1.4 ; python_version >= "3.8" and python_version < "4.0" rich==12.6.0 ; python_version >= "3.8" and python_version < "4.0" +robotframework-debuglibrary==2.3.0 ; python_version >= "3.8" and python_version < "4.0" robotframework-requests==0.9.4 ; python_version >= "3.8" and python_version < "4.0" robotframework-tidy==3.3.2 ; python_version >= "3.8" and python_version < "4.0" robotframework==6.0.1 ; python_version >= "3.8" and python_version < "4.0" +six==1.16.0 ; python_version >= "3.8" and python_version < "4.0" sniffio==1.3.0 ; python_version >= "3.8" and python_version < "4.0" starlette==0.20.4 ; python_version >= "3.8" and python_version < "4.0" toml==0.10.2 ; python_version >= "3.8" and python_version < "4.0" tomli==2.0.1 ; python_version >= "3.8" and python_version < "4.0" -tomlkit==0.11.6 ; python_version >= "3.8" and python_version < "4.0" typing-extensions==4.4.0 ; python_version >= "3.8" and python_version < "4.0" urllib3==1.26.12 ; python_version >= "3.8" and python_version < "4" uvicorn==0.19.0 ; python_version >= "3.8" and python_version < "4.0" vulture==2.6 ; python_version >= "3.8" and python_version < "4.0" -wrapt==1.14.1 ; python_version >= "3.8" and python_version < "4.0" +wcwidth==0.2.6 ; python_version >= "3.8" and python_version < "4.0" diff --git a/keiko/requirements.txt b/keiko/requirements.txt index 7cc7266626f..043b8aeb097 100644 --- a/keiko/requirements.txt +++ b/keiko/requirements.txt @@ -9,5 +9,7 @@ markupsafe==2.1.1 ; python_version >= "3.8" and python_version < "4.0" pydantic==1.10.2 ; python_version >= "3.8" and python_version < "4.0" sniffio==1.3.0 ; python_version >= "3.8" and python_version < "4.0" starlette==0.20.4 ; python_version >= "3.8" and python_version < "4.0" +toml==0.10.2 ; python_version >= "3.8" and python_version < "4.0" typing-extensions==4.4.0 ; python_version >= "3.8" and python_version < "4.0" uvicorn==0.19.0 ; python_version >= "3.8" and python_version < "4.0" +vulture==2.6 ; python_version >= "3.8" and python_version < "4.0" diff --git a/keiko/templates/bevindingenrapport/template.tex b/keiko/templates/bevindingenrapport/template.tex index 607fd69a892..0a4210a73e2 100644 --- a/keiko/templates/bevindingenrapport/template.tex +++ b/keiko/templates/bevindingenrapport/template.tex @@ -12,7 +12,7 @@ \usepackage{ragged2e} \usepackage{titlepic} \usepackage{xcolor} - +\usepackage{underscore} \hypersetup{ colorlinks=true, @@ -22,17 +22,17 @@ pdftitle={KEIKO Document by KAT}, } -\definecolor{box_color_critical}{HTML}{42145F} -\definecolor{box_color_high}{HTML}{D6293E} -\definecolor{box_color_medium}{HTML}{C36100} -\definecolor{box_color_low}{HTML}{00519C} -\definecolor{box_color_recommendation}{HTML}{C3DDF6} +\definecolor{box-color-critical}{HTML}{42145F} +\definecolor{box-color-high}{HTML}{D6293E} +\definecolor{box-color-medium}{HTML}{C36100} +\definecolor{box-color-low}{HTML}{00519C} +\definecolor{box-color-recommendation}{HTML}{C3DDF6} -\definecolor{color_critical}{HTML}{FFFFFF} -\definecolor{color_high}{HTML}{FFFFFF} -\definecolor{color_medium}{HTML}{FFFFFF} -\definecolor{color_low}{HTML}{FFFFFF} -\definecolor{color_recommendation}{HTML}{000000} +\definecolor{color-critical}{HTML}{FFFFFF} +\definecolor{color-high}{HTML}{FFFFFF} +\definecolor{color-medium}{HTML}{FFFFFF} +\definecolor{color-low}{HTML}{FFFFFF} +\definecolor{color-recommendation}{HTML}{000000} %KEIKO-specific variables \newcommand\application{KEIKO @@{keiko_version}@@} @@ -117,7 +117,7 @@ \section{Totalen} Niveau & Uniek & Totaal aantal voorvallen \\\toprule \toprule {% for level_name, level_sum in meta.total_by_severity.items() %} - \colorbox{box_color_@@{ level_name }@@}{ \color{color_@@{ level_name }@@} @@{ level_name }@@ } & @@{ meta.total_by_severity_per_finding_type[level_name] }@@ & @@{ level_sum }@@ \\ + \colorbox{box-color-@@{ level_name }@@}{ \color{color-@@{ level_name }@@} @@{ level_name }@@ } & @@{ meta.total_by_severity_per_finding_type[level_name] }@@ & @@{ level_sum }@@ \\ {% endfor %} \bottomrule Totaal & @@{meta.total_finding_types}@@ & @@{meta.total}@@ @@ -131,7 +131,7 @@ \section{Bevinding types} Risico niveau & Bevindingstype & Voorvallen \\\toprule \midrule {% for finding_type_id, occurrence in findings_grouped.items()|sort(attribute='1.finding_type.risk_level_score', reverse=True) %} - \colorbox{box_color_@@{ occurrence.finding_type.risk_level_severity }@@}{ \color{color_@@{ occurrence.finding_type.risk_level_severity }@@} @@{ occurrence.finding_type.risk_level_severity }@@ } & @@{ occurrence.finding_type.id }@@ & @@{occurrence.list|length}@@ \\ + \colorbox{box-color-@@{ occurrence.finding_type.risk_level_severity }@@}{ \color{color-@@{ occurrence.finding_type.risk_level_severity }@@} @@{ occurrence.finding_type.risk_level_severity }@@ } & @@{ occurrence.finding_type.id }@@ & @@{occurrence.list|length}@@ \\ {% endfor %} \bottomrule \end{tabular} diff --git a/keiko/templates/dns/template.tex b/keiko/templates/dns/template.tex index 21e9456801b..79eaa94acef 100644 --- a/keiko/templates/dns/template.tex +++ b/keiko/templates/dns/template.tex @@ -12,7 +12,7 @@ \usepackage{ragged2e} \usepackage{titlepic} \usepackage{xcolor} - +\usepackage{underscore} \hypersetup{ colorlinks=true, diff --git a/keiko/templates/intel/template.tex b/keiko/templates/intel/template.tex index 21e9456801b..79eaa94acef 100644 --- a/keiko/templates/intel/template.tex +++ b/keiko/templates/intel/template.tex @@ -12,7 +12,7 @@ \usepackage{ragged2e} \usepackage{titlepic} \usepackage{xcolor} - +\usepackage{underscore} \hypersetup{ colorlinks=true, diff --git a/keiko/tests/test_api.py b/keiko/tests/test_api.py index 19d08cca395..856d9ee6fcb 100644 --- a/keiko/tests/test_api.py +++ b/keiko/tests/test_api.py @@ -12,13 +12,15 @@ class APITest(TestCase): maxDiff = None def setUp(self) -> None: - fixtures = Path(__file__).parent / "fixtures" - - keiko.templates.settings.templates_folder = str(fixtures / "templates") + self.orig_templates_folder = keiko.templates.settings.templates_folder + keiko.templates.settings.templates_folder = Path(__file__).parent / "fixtures" / "templates" self.api = construct_api() self.client = TestClient(self.api) + def tearDown(self): + keiko.templates.settings.templates_folder = self.orig_templates_folder + def test_health(self): response = self.client.get("/health") diff --git a/keiko/tests/test_glossary.py b/keiko/tests/test_glossary.py index 697c92a4591..70ce01ff014 100644 --- a/keiko/tests/test_glossary.py +++ b/keiko/tests/test_glossary.py @@ -7,8 +7,12 @@ class KeikoGlossaryTest(TestCase): def setUp(self) -> None: self.maxDiff = None + self.orig_glossaries_folder = settings.glossaries_folder settings.glossaries_folder = Path(__file__).parent / "fixtures" / "glossaries" + def tearDown(self) -> None: + settings.glossaries_folder = self.orig_glossaries_folder + def test_read_glossary(self): glossary_entries = read_glossary("test_glossary.csv") self.assertEqual({"meow": ("Meow", "The sound a cat makes when hungry")}, glossary_entries) diff --git a/keiko/tests/test_report.py b/keiko/tests/test_report.py new file mode 100644 index 00000000000..bbdadbf0c2a --- /dev/null +++ b/keiko/tests/test_report.py @@ -0,0 +1,147 @@ +import pytest + +from keiko.keiko import generate_report + +import keiko.keiko + +from templates.bevindingenrapport.model import DataShape + +report_data_empty = { + "meta": { + "total": 0, + "total_by_severity": {"critical": 0, "high": 0, "medium": 0, "low": 0, "recommendation": 0}, + "total_by_finding_type": {}, + "total_finding_types": 0, + "total_by_severity_per_finding_type": {"critical": 0, "high": 0, "medium": 0, "low": 0, "recommendation": 0}, + }, + "findings_grouped": {}, + "valid_time": "2022-08-26 08:23:58.373810+00:00", + "ooi": { + "id": "DNSZone|internet|mispo.es.", + "ooi_type": "Hostname", + "human_readable": "mispo.es.", + "object_type": "Hostname", + }, + "report_source_type": "Hostname", + "report_source_value": "mispo.es.", +} + + +report_data_underscores = { + "meta": { + "total": 1, + "total_by_severity": {"critical": 0, "high": 1, "medium": 0, "low": 0, "recommendation": 0}, + "total_by_finding_type": {}, + "total_finding_types": 1, + "total_by_severity_per_finding_type": {"critical": 0, "high": 1, "medium": 0, "low": 0, "recommendation": 0}, + }, + "findings_grouped": { + "KAT-OPEN-DATABASE-PORT": { + "finding_type": { + "id": "KAT-OPEN-DATABASE-PORT", + "ooi_type": "KATFindingType", + "human_readable": "KAT-OPEN-DATABASE-PORT", + "object_type": "KATFindingType", + "risk": "High", + "description": "This description has __underscores__ in it", + "recommendation": "Secure this port", + "risk_level_source": "High", + "risk_level_score": 8.9, + "risk_level_severity": "high", + "Information": "KAT findings", + "findings": [], + }, + "list": [ + { + "id": "Finding|IPPort|internet|134.209.85.72|tcp|3306|KAT-OPEN-DATABASE-PORT", + "ooi_type": "Finding", + "human_readable": "KAT-OPEN-DATABASE-PORT @ 134.209.85.72:3306/tcp", + "object_type": "Finding", + "proof": None, + "description": "This description has __underscores__ in it", + "reproduce": None, + "ooi": { + "id": "IPPort|internet|134.209.85.72|tcp|3306", + "ooi_type": "IPPort", + "human_readable": "134.209.85.72:3306/tcp", + "object_type": "IPPort", + "protocol": "tcp", + "port": "3306", + "state": "open", + }, + "finding_type": { + "id": "KAT-OPEN-DATABASE-PORT", + "ooi_type": "KATFindingType", + "human_readable": "KAT-OPEN-DATABASE-PORT", + "object_type": "KATFindingType", + "risk": "High", + "description": "A database port is open.", + "recommendation": "Secure this port", + "risk_level_source": "High", + "risk_level_score": 8.9, + "risk_level_severity": "high", + "Information": "KAT findings", + "findings": [], + }, + } + ], + }, + }, + "valid_time": "2022-08-26 08:23:58.373810+00:00", + "ooi": { + "id": "DNSZone|internet|mispo.es.", + "ooi_type": "Hostname", + "human_readable": "mispo.es.", + "object_type": "Hostname", + }, + "report_source_type": "Hostname", + "report_source_value": "mispo.es.", +} + + +@pytest.fixture +def report_args(): + return { + "template_name": "bevindingenrapport", + "glossary": "dutch.hiero.csv", + "debug": False, + "report_id": "test", + } + + +def test_generate_report_empty(report_args, tmp_path): + keiko.keiko.settings.reports_folder = str(tmp_path) + + report_args["report_data"] = DataShape.parse_obj(report_data_empty) + generate_report(**report_args) + + report_file = tmp_path / "test.keiko.pdf" + tex_file = tmp_path / "test.keiko.tex" + json_file = tmp_path / "test.keiko.json" + assert report_file.exists() + assert not tex_file.exists() + assert not json_file.exists() + + +def test_generate_report_debug(report_args, tmp_path): + keiko.keiko.settings.reports_folder = tmp_path + + report_args["report_data"] = DataShape.parse_obj(report_data_empty) + report_args["debug"] = True + generate_report(**report_args) + + report_file = tmp_path / "test.keiko.pdf" + tex_file = tmp_path / "test.keiko.tex" + + assert report_file.exists() + assert tex_file.exists() + + +def test_generate_report_underscore(report_args, tmp_path): + keiko.keiko.settings.reports_folder = tmp_path + + report_args["report_data"] = DataShape.parse_obj(report_data_underscores) + generate_report(**report_args) + + report_file = tmp_path / "test.keiko.pdf" + assert report_file.exists() diff --git a/keiko/tests/test_templates.py b/keiko/tests/test_templates.py index 81ec742ded5..74da134a499 100644 --- a/keiko/tests/test_templates.py +++ b/keiko/tests/test_templates.py @@ -10,8 +10,12 @@ class KeikoTemplatesTest(TestCase): def setUp(self) -> None: self.maxDiff = None + self.orig_templates_folder = keiko.templates.settings.templates_folder keiko.templates.settings.templates_folder = Path(__file__).parent / "fixtures" / "templates" + def tearDown(self): + keiko.templates.settings.templates_folder = self.orig_templates_folder + def test_list_templates(self): templates = get_templates() self.assertEqual(templates, {"template1", "template2"})