diff --git a/Dockerfile b/Dockerfile index 2056189..e4598c9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,14 +8,56 @@ RUN apt-get update; \ apt-get clean -y; \ rm -rf /var/lib/apt/lists/* -RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash -ENV NVM_DIR=/root/.nvm -RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION} -RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION} -RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION} -ENV PATH="/root/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}" -RUN node --version -RUN npm --version +ENV NODE_VERSION 18.15.0 + +RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \ + && case "${dpkgArch##*-}" in \ + amd64) ARCH='x64';; \ + ppc64el) ARCH='ppc64le';; \ + s390x) ARCH='s390x';; \ + arm64) ARCH='arm64';; \ + armhf) ARCH='armv7l';; \ + i386) ARCH='x86';; \ + *) echo "unsupported architecture"; exit 1 ;; \ + esac \ + && set -ex \ + # libatomic1 for arm + && apt-get update && apt-get install -y ca-certificates curl wget gnupg dirmngr xz-utils libatomic1 --no-install-recommends \ + && rm -rf /var/lib/apt/lists/* \ + && for key in \ + 4ED778F539E3634C779C87C6D7062848A1AB005C \ + 141F07595B7B3FFE74309A937405533BE57C7D57 \ + 74F12602B6F1C4E913FAA37AD3A89613643B6201 \ + DD792F5973C6DE52C432CBDAC77ABFA00DDBF2B7 \ + 61FC681DFB92A079F1685E77973F295594EC4689 \ + 8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \ + C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \ + 890C08DB8579162FEE0DF9DB8BEAB4DFCF555EF4 \ + C82FA3AE1CBEDC6BE46B9360C43CEC45C17AB93C \ + 108F52B48DB57BB0CC439B2997B01419BD92F80A \ + ; do \ + gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$key" || \ + gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" ; \ + done \ + && curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \ + && curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \ + && gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \ + && grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \ + && tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \ + && rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \ + && apt-mark auto '.*' > /dev/null \ + && find /usr/local -type f -executable -exec ldd '{}' ';' \ + | awk '/=>/ { print $(NF-1) }' \ + | sort -u \ + | xargs -r dpkg-query --search \ + | cut -d: -f1 \ + | sort -u \ + | xargs -r apt-mark manual \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ + && ln -s /usr/local/bin/node /usr/local/bin/nodejs \ + # smoke tests + && node --version \ + && npm --version ARG RUNNER_VERSION @@ -53,7 +95,7 @@ RUN chmod 755 /usr/local/bin/extension-test RUN mkdir /banners -COPY ./banner* /banners +COPY ./banner* /banners/ COPY ./entrypoint.sh /entrypoint.sh RUN chmod 755 /entrypoint.sh diff --git a/connect/eaas/runner/handlers/anvil.py b/connect/eaas/runner/handlers/anvil.py index 294c0ce..91533d0 100644 --- a/connect/eaas/runner/handlers/anvil.py +++ b/connect/eaas/runner/handlers/anvil.py @@ -6,10 +6,10 @@ import logging import anvil.server + from connect.client import ( ConnectClient, ) - from connect.eaas.core.logging import ( RequestLogger, ) diff --git a/connect/eaas/runner/handlers/base.py b/connect/eaas/runner/handlers/base.py index 0d88c49..c88fde9 100644 --- a/connect/eaas/runner/handlers/base.py +++ b/connect/eaas/runner/handlers/base.py @@ -12,7 +12,6 @@ AsyncConnectClient, ConnectClient, ) - from connect.eaas.core.logging import ( ExtensionLogHandler, RequestLogger, diff --git a/connect/eaas/runner/handlers/web.py b/connect/eaas/runner/handlers/web.py index 40dd841..1568cbf 100644 --- a/connect/eaas/runner/handlers/web.py +++ b/connect/eaas/runner/handlers/web.py @@ -2,9 +2,6 @@ import inspect import logging -from connect.client import ( - ClientError, -) from fastapi import ( FastAPI, ) @@ -22,6 +19,9 @@ BaseHTTPMiddleware, ) +from connect.client import ( + ClientError, +) from connect.eaas.core.decorators import ( router as root_router, ) @@ -165,6 +165,7 @@ def get_asgi_application(self): auth, no_auth = self.get_application().get_routers() app.include_router(auth, prefix='/api') app.include_router(no_auth, prefix='/guest') + app.include_router(no_auth, prefix='/unauthorized') app.openapi = functools.partial(self.get_api_schema, app) static_root = self.get_application().get_static_root() if static_root: diff --git a/connect/eaas/runner/helpers.py b/connect/eaas/runner/helpers.py index 5832a06..276a95e 100644 --- a/connect/eaas/runner/helpers.py +++ b/connect/eaas/runner/helpers.py @@ -18,10 +18,6 @@ ) import requests -from connect.client import ( - ClientError, - ConnectClient, -) from rich import ( box, ) @@ -38,6 +34,10 @@ Table, ) +from connect.client import ( + ClientError, + ConnectClient, +) from connect.eaas.core.validation.models import ( ValidationItem, ValidationResult, diff --git a/connect/eaas/runner/managers/background.py b/connect/eaas/runner/managers/background.py index d265049..2d2fa94 100644 --- a/connect/eaas/runner/managers/background.py +++ b/connect/eaas/runner/managers/background.py @@ -14,7 +14,6 @@ from connect.client.models import ( AsyncResource, ) - from connect.eaas.core.enums import ( ResultType, ) diff --git a/connect/eaas/runner/managers/base.py b/connect/eaas/runner/managers/base.py index 554f139..41703c6 100644 --- a/connect/eaas/runner/managers/base.py +++ b/connect/eaas/runner/managers/base.py @@ -30,7 +30,6 @@ from connect.client.models import ( AsyncCollection, ) - from connect.eaas.core.enums import ( TaskCategory, ) diff --git a/connect/eaas/runner/managers/transformation.py b/connect/eaas/runner/managers/transformation.py index 473b50d..b9f1d91 100644 --- a/connect/eaas/runner/managers/transformation.py +++ b/connect/eaas/runner/managers/transformation.py @@ -10,17 +10,17 @@ ) import requests +from openpyxl import ( + Workbook, + load_workbook, +) + from connect.client import ( AsyncConnectClient, ) from connect.client.models import ( AsyncResource, ) -from openpyxl import ( - Workbook, - load_workbook, -) - from connect.eaas.core.enums import ( ResultType, ) diff --git a/poetry.lock b/poetry.lock index d082bf4..5e61694 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry and should not be changed by hand. +# This file is automatically @generated by Poetry 1.4.1 and should not be changed by hand. [[package]] name = "anvil-uplink" @@ -255,14 +255,14 @@ test = ["flake8 (==3.7.8)", "hypothesis (==3.55.3)"] [[package]] name = "connect-eaas-core" -version = "27.8" +version = "27.9" description = "Connect Eaas Core" category = "main" optional = false python-versions = ">=3.8,<4" files = [ - {file = "connect_eaas_core-27.8-py3-none-any.whl", hash = "sha256:52d46aac6e786c637b184eb5d10489ef3033e8d1f0dbb5416bf782c73908d4fb"}, - {file = "connect_eaas_core-27.8.tar.gz", hash = "sha256:eff4990e80da04516e51f2836aaa81c8c6d3456bf8d1a123ba6a9dacbd029bdb"}, + {file = "connect_eaas_core-27.9-py3-none-any.whl", hash = "sha256:985899959c3a811b8d80093b88fb59c1592888aab7a945fc70d848666c1a3f4c"}, + {file = "connect_eaas_core-27.9.tar.gz", hash = "sha256:07d12190935d3ac2f3e19758be7b43be9b53d7888ac88b14c2721dc940e44900"}, ] [package.dependencies] @@ -1427,14 +1427,14 @@ jupyter = ["ipywidgets (>=7.5.1,<8.0.0)"] [[package]] name = "setuptools" -version = "67.6.0" +version = "67.6.1" description = "Easily download, build, install, upgrade, and uninstall Python packages" category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "setuptools-67.6.0-py3-none-any.whl", hash = "sha256:b78aaa36f6b90a074c1fa651168723acbf45d14cb1196b6f02c0fd07f17623b2"}, - {file = "setuptools-67.6.0.tar.gz", hash = "sha256:2ee892cd5f29f3373097f5a814697e397cf3ce313616df0af11231e2ad118077"}, + {file = "setuptools-67.6.1-py3-none-any.whl", hash = "sha256:e728ca814a823bf7bf60162daf9db95b93d532948c4c0bea762ce62f60189078"}, + {file = "setuptools-67.6.1.tar.gz", hash = "sha256:257de92a9d50a60b8e22abfcbb771571fde0dbf3ec234463212027a4eeecbe9a"}, ] [package.extras] @@ -1518,7 +1518,7 @@ files = [ ] [package.dependencies] -greenlet = {version = "!=0.4.17", markers = "python_version >= \"3\" and (platform_machine == \"aarch64\" or platform_machine == \"ppc64le\" or platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"win32\" or platform_machine == \"WIN32\")"} +greenlet = {version = "!=0.4.17", markers = "python_version >= \"3\" and platform_machine == \"aarch64\" or python_version >= \"3\" and platform_machine == \"ppc64le\" or python_version >= \"3\" and platform_machine == \"x86_64\" or python_version >= \"3\" and platform_machine == \"amd64\" or python_version >= \"3\" and platform_machine == \"AMD64\" or python_version >= \"3\" and platform_machine == \"win32\" or python_version >= \"3\" and platform_machine == \"WIN32\""} [package.extras] aiomysql = ["aiomysql", "greenlet (!=0.4.17)"] @@ -1615,34 +1615,48 @@ socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] [[package]] name = "uvloop" -version = "0.16.0" +version = "0.17.0" description = "Fast implementation of asyncio event loop on top of libuv" category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "uvloop-0.16.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:6224f1401025b748ffecb7a6e2652b17768f30b1a6a3f7b44660e5b5b690b12d"}, - {file = "uvloop-0.16.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:30ba9dcbd0965f5c812b7c2112a1ddf60cf904c1c160f398e7eed3a6b82dcd9c"}, - {file = "uvloop-0.16.0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:bd53f7f5db562f37cd64a3af5012df8cac2c464c97e732ed556800129505bd64"}, - {file = "uvloop-0.16.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:772206116b9b57cd625c8a88f2413df2fcfd0b496eb188b82a43bed7af2c2ec9"}, - {file = "uvloop-0.16.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b572256409f194521a9895aef274cea88731d14732343da3ecdb175228881638"}, - {file = "uvloop-0.16.0-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:04ff57aa137230d8cc968f03481176041ae789308b4d5079118331ab01112450"}, - {file = "uvloop-0.16.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3a19828c4f15687675ea912cc28bbcb48e9bb907c801873bd1519b96b04fb805"}, - {file = "uvloop-0.16.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e814ac2c6f9daf4c36eb8e85266859f42174a4ff0d71b99405ed559257750382"}, - {file = "uvloop-0.16.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:bd8f42ea1ea8f4e84d265769089964ddda95eb2bb38b5cbe26712b0616c3edee"}, - {file = "uvloop-0.16.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:647e481940379eebd314c00440314c81ea547aa636056f554d491e40503c8464"}, - {file = "uvloop-0.16.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e0d26fa5875d43ddbb0d9d79a447d2ace4180d9e3239788208527c4784f7cab"}, - {file = "uvloop-0.16.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:6ccd57ae8db17d677e9e06192e9c9ec4bd2066b77790f9aa7dede2cc4008ee8f"}, - {file = "uvloop-0.16.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:089b4834fd299d82d83a25e3335372f12117a7d38525217c2258e9b9f4578897"}, - {file = "uvloop-0.16.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:98d117332cc9e5ea8dfdc2b28b0a23f60370d02e1395f88f40d1effd2cb86c4f"}, - {file = "uvloop-0.16.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1e5f2e2ff51aefe6c19ee98af12b4ae61f5be456cd24396953244a30880ad861"}, - {file = "uvloop-0.16.0.tar.gz", hash = "sha256:f74bc20c7b67d1c27c72601c78cf95be99d5c2cdd4514502b4f3eb0933ff1228"}, + {file = "uvloop-0.17.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:ce9f61938d7155f79d3cb2ffa663147d4a76d16e08f65e2c66b77bd41b356718"}, + {file = "uvloop-0.17.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:68532f4349fd3900b839f588972b3392ee56042e440dd5873dfbbcd2cc67617c"}, + {file = "uvloop-0.17.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0949caf774b9fcefc7c5756bacbbbd3fc4c05a6b7eebc7c7ad6f825b23998d6d"}, + {file = "uvloop-0.17.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ff3d00b70ce95adce264462c930fbaecb29718ba6563db354608f37e49e09024"}, + {file = "uvloop-0.17.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:a5abddb3558d3f0a78949c750644a67be31e47936042d4f6c888dd6f3c95f4aa"}, + {file = "uvloop-0.17.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8efcadc5a0003d3a6e887ccc1fb44dec25594f117a94e3127954c05cf144d811"}, + {file = "uvloop-0.17.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:3378eb62c63bf336ae2070599e49089005771cc651c8769aaad72d1bd9385a7c"}, + {file = "uvloop-0.17.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6aafa5a78b9e62493539456f8b646f85abc7093dd997f4976bb105537cf2635e"}, + {file = "uvloop-0.17.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c686a47d57ca910a2572fddfe9912819880b8765e2f01dc0dd12a9bf8573e539"}, + {file = "uvloop-0.17.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:864e1197139d651a76c81757db5eb199db8866e13acb0dfe96e6fc5d1cf45fc4"}, + {file = "uvloop-0.17.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:2a6149e1defac0faf505406259561bc14b034cdf1d4711a3ddcdfbaa8d825a05"}, + {file = "uvloop-0.17.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:6708f30db9117f115eadc4f125c2a10c1a50d711461699a0cbfaa45b9a78e376"}, + {file = "uvloop-0.17.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:23609ca361a7fc587031429fa25ad2ed7242941adec948f9d10c045bfecab06b"}, + {file = "uvloop-0.17.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2deae0b0fb00a6af41fe60a675cec079615b01d68beb4cc7b722424406b126a8"}, + {file = "uvloop-0.17.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:45cea33b208971e87a31c17622e4b440cac231766ec11e5d22c76fab3bf9df62"}, + {file = "uvloop-0.17.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:9b09e0f0ac29eee0451d71798878eae5a4e6a91aa275e114037b27f7db72702d"}, + {file = "uvloop-0.17.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:dbbaf9da2ee98ee2531e0c780455f2841e4675ff580ecf93fe5c48fe733b5667"}, + {file = "uvloop-0.17.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:a4aee22ece20958888eedbad20e4dbb03c37533e010fb824161b4f05e641f738"}, + {file = "uvloop-0.17.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:307958f9fc5c8bb01fad752d1345168c0abc5d62c1b72a4a8c6c06f042b45b20"}, + {file = "uvloop-0.17.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3ebeeec6a6641d0adb2ea71dcfb76017602ee2bfd8213e3fcc18d8f699c5104f"}, + {file = "uvloop-0.17.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1436c8673c1563422213ac6907789ecb2b070f5939b9cbff9ef7113f2b531595"}, + {file = "uvloop-0.17.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:8887d675a64cfc59f4ecd34382e5b4f0ef4ae1da37ed665adba0c2badf0d6578"}, + {file = "uvloop-0.17.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:3db8de10ed684995a7f34a001f15b374c230f7655ae840964d51496e2f8a8474"}, + {file = "uvloop-0.17.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:7d37dccc7ae63e61f7b96ee2e19c40f153ba6ce730d8ba4d3b4e9738c1dccc1b"}, + {file = "uvloop-0.17.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:cbbe908fda687e39afd6ea2a2f14c2c3e43f2ca88e3a11964b297822358d0e6c"}, + {file = "uvloop-0.17.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3d97672dc709fa4447ab83276f344a165075fd9f366a97b712bdd3fee05efae8"}, + {file = "uvloop-0.17.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f1e507c9ee39c61bfddd79714e4f85900656db1aec4d40c6de55648e85c2799c"}, + {file = "uvloop-0.17.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:c092a2c1e736086d59ac8e41f9c98f26bbf9b9222a76f21af9dfe949b99b2eb9"}, + {file = "uvloop-0.17.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:30babd84706115626ea78ea5dbc7dd8d0d01a2e9f9b306d24ca4ed5796c66ded"}, + {file = "uvloop-0.17.0.tar.gz", hash = "sha256:0ddf6baf9cf11a1a22c71487f39f15b2cf78eb5bde7e5b45fbb99e8a9d91b9e1"}, ] [package.extras] -dev = ["Cython (>=0.29.24,<0.30.0)", "Sphinx (>=4.1.2,<4.2.0)", "aiohttp", "flake8 (>=3.9.2,<3.10.0)", "mypy (>=0.800)", "psutil", "pyOpenSSL (>=19.0.0,<19.1.0)", "pycodestyle (>=2.7.0,<2.8.0)", "pytest (>=3.6.0)", "sphinx-rtd-theme (>=0.5.2,<0.6.0)", "sphinxcontrib-asyncio (>=0.3.0,<0.4.0)"] +dev = ["Cython (>=0.29.32,<0.30.0)", "Sphinx (>=4.1.2,<4.2.0)", "aiohttp", "flake8 (>=3.9.2,<3.10.0)", "mypy (>=0.800)", "psutil", "pyOpenSSL (>=22.0.0,<22.1.0)", "pycodestyle (>=2.7.0,<2.8.0)", "pytest (>=3.6.0)", "sphinx-rtd-theme (>=0.5.2,<0.6.0)", "sphinxcontrib-asyncio (>=0.3.0,<0.4.0)"] docs = ["Sphinx (>=4.1.2,<4.2.0)", "sphinx-rtd-theme (>=0.5.2,<0.6.0)", "sphinxcontrib-asyncio (>=0.3.0,<0.4.0)"] -test = ["aiohttp", "flake8 (>=3.9.2,<3.10.0)", "mypy (>=0.800)", "psutil", "pyOpenSSL (>=19.0.0,<19.1.0)", "pycodestyle (>=2.7.0,<2.8.0)"] +test = ["Cython (>=0.29.32,<0.30.0)", "aiohttp", "flake8 (>=3.9.2,<3.10.0)", "mypy (>=0.800)", "psutil", "pyOpenSSL (>=22.0.0,<22.1.0)", "pycodestyle (>=2.7.0,<2.8.0)"] [[package]] name = "watchfiles" @@ -1784,4 +1798,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more [metadata] lock-version = "2.0" python-versions = ">=3.8,<4" -content-hash = "4b2618d23b76567c8db2766668e9e0d78a841b68be3348b37dbf29ee0f253564" +content-hash = "38613fc55b2b5d09854757ae168c8db6161c9ef7fa689f15ce8d57ebfcc3ad7b" diff --git a/pyproject.toml b/pyproject.toml index 5dbf941..e711c38 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,8 +31,7 @@ websockets = "10.*" connect-openapi-client = ">=25.16" logzio-python-handler = "^3.0.0" backoff = "^1.11.1" -uvloop = "^0.16.0" -connect-eaas-core = ">=27.8,<28" +connect-eaas-core = ">=27.9,<28" httpx = "^0.23.0" rich = "^12.5.1" pyfiglet = "^0.8.post1" @@ -40,6 +39,7 @@ devtools = "^0.9.0" watchfiles = "^0.17.0" openpyxl = "^3.0.10" lxml = "^4.9.2" +uvloop = "^0.17.0" [tool.poetry.group.test.dependencies] pytest = "^7.2.1" @@ -107,6 +107,7 @@ asyncio_mode = "strict" [tool.isort] src_paths = "*" sections = ["FUTURE", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"] +known_first_party = ["connect"] group_by_package = true multi_line_output = 3 force_grid_wrap = 1 diff --git a/tests/handlers/test_web.py b/tests/handlers/test_web.py index 2d545ce..91c346e 100644 --- a/tests/handlers/test_web.py +++ b/tests/handlers/test_web.py @@ -1,10 +1,6 @@ import os import pytest -from connect.client import ( - ClientError, - ConnectClient, -) from fastapi import ( Depends, Header, @@ -16,11 +12,16 @@ BaseHTTPMiddleware, ) +from connect.client import ( + ClientError, + ConnectClient, +) from connect.eaas.core.decorators import ( account_settings_page, admin_pages, guest, module_pages, + unauthorized, web_app, ) from connect.eaas.core.extension import ( @@ -321,8 +322,13 @@ def get_static_root(cls): def example_auth(self): return - @router.get('/no_auth') + @router.get('/no_auth_deprecated') @guest() + def example_no_auth_deprecated(self): + return + + @router.get('/no_auth') + @unauthorized() def example_no_auth(self): return @@ -344,6 +350,11 @@ def example_no_auth(self): }, ], 'no_auth': [ + { + 'method': 'GET', + 'path': '/no_auth_deprecated', + 'summary': 'Example No Auth Deprecated', + }, { 'method': 'GET', 'path': '/no_auth', diff --git a/tests/managers/test_base.py b/tests/managers/test_base.py index 09ae255..42f22b7 100644 --- a/tests/managers/test_base.py +++ b/tests/managers/test_base.py @@ -2,10 +2,10 @@ import logging import pytest + from connect.client import ( ClientError, ) - from connect.eaas.core.proto import ( SetupResponse, Task, diff --git a/tests/test_helpers.py b/tests/test_helpers.py index 3692870..875df7a 100644 --- a/tests/test_helpers.py +++ b/tests/test_helpers.py @@ -8,9 +8,6 @@ import subprocess import pytest -from connect.client import ( - ConnectClient, -) from freezegun import ( freeze_time, ) @@ -21,6 +18,9 @@ Table, ) +from connect.client import ( + ConnectClient, +) from connect.eaas.core.validation.models import ( ValidationItem, ValidationResult,