diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 00000000..7ab672fa --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,43 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the OS, Python version and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.10" + # You can also specify other tool versions: + # nodejs: "19" + # rust: "1.64" + # golang: "1.19" + jobs: + post_create_environment: + # Install poetry + # https://python-poetry.org/docs/#installing-manually + - pip install poetry + # Tell poetry to not use a virtual environment + - poetry config virtualenvs.create false + post_install: + # Install dependencies with 'docs' dependency group + # https://python-poetry.org/docs/managing-dependencies/#dependency-groups + - cd docs && poetry install && cd .. + +# Build documentation in the "docs/" directory with Sphinx +sphinx: + configuration: docs/source/conf.py + +# Optionally build your docs in additional formats such as PDF and ePub +# formats: +# - pdf +# - epub + +# Optional but recommended, declare the Python requirements required +# to build your documentation +# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html +# python: +# install: +# - requirements: docs/requirements.txt diff --git a/docs/build.sh b/docs/build.sh new file mode 100644 index 00000000..44432917 --- /dev/null +++ b/docs/build.sh @@ -0,0 +1 @@ +sphinx-build source/ build diff --git a/docs/clean.sh b/docs/clean.sh new file mode 100644 index 00000000..e0b9d282 --- /dev/null +++ b/docs/clean.sh @@ -0,0 +1 @@ +rm -Rf ./source/**/*.rst diff --git a/docs/docgen.sh b/docs/docgen.sh new file mode 100644 index 00000000..d8eeb376 --- /dev/null +++ b/docs/docgen.sh @@ -0,0 +1,8 @@ +sphinx-apidoc ../packages/polywrap-msgpack/polywrap_msgpack -o ./source/polywrap-msgpack -e +sphinx-apidoc ../packages/polywrap-manifest/polywrap_manifest -o ./source/polywrap-manifest -e +sphinx-apidoc ../packages/polywrap-core/polywrap_core -o ./source/polywrap-core -e +sphinx-apidoc ../packages/polywrap-wasm/polywrap_wasm -o ./source/polywrap-wasm -e +sphinx-apidoc ../packages/polywrap-plugin/polywrap_plugin -o ./source/polywrap-plugin -e +sphinx-apidoc ../packages/polywrap-uri-resolvers/polywrap_uri_resolvers -o ./source/polywrap-uri-resolvers -e +sphinx-apidoc ../packages/polywrap-client/polywrap_client -o ./source/polywrap-client -e +sphinx-apidoc ../packages/polywrap-client-config-builder/polywrap_client_config_builder -o ./source/polywrap-client-config-builder -e diff --git a/docs/poetry.lock b/docs/poetry.lock index 6474e47e..a0abc76f 100644 --- a/docs/poetry.lock +++ b/docs/poetry.lock @@ -24,28 +24,16 @@ files = [ {file = "Babel-2.12.1.tar.gz", hash = "sha256:cc2d99999cd01d44420ae725a21c9e3711b3aadc7976d6147f622d8581963455"}, ] -[[package]] -name = "backoff" -version = "2.2.1" -description = "Function decoration for backoff and retry" -category = "main" -optional = false -python-versions = ">=3.7,<4.0" -files = [ - {file = "backoff-2.2.1-py3-none-any.whl", hash = "sha256:63579f9a0628e06278f7e47b7d7d5b6ce20dc65c5e96a6f3ca99a6adca0396e8"}, - {file = "backoff-2.2.1.tar.gz", hash = "sha256:03f829f5bb1923180821643f8753b0502c3b682293992485b0eef2807afa5cba"}, -] - [[package]] name = "certifi" -version = "2022.12.7" +version = "2023.5.7" description = "Python package for providing Mozilla's CA Bundle." category = "dev" optional = false python-versions = ">=3.6" files = [ - {file = "certifi-2022.12.7-py3-none-any.whl", hash = "sha256:4ad3232f5e926d6718ec31cfc1fcadfde020920e278684144551c91769c7bc18"}, - {file = "certifi-2022.12.7.tar.gz", hash = "sha256:35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3"}, + {file = "certifi-2023.5.7-py3-none-any.whl", hash = "sha256:c6c2e98f5c7869efca1f8916fed228dd91539f9f1b444c314c06eef02980c716"}, + {file = "certifi-2023.5.7.tar.gz", hash = "sha256:0f0d56dc5a6ad56fd4ba36484d6cc34451e1c6548c61daad8c320169f91eddc7"}, ] [[package]] @@ -157,50 +145,11 @@ files = [ {file = "docutils-0.18.1.tar.gz", hash = "sha256:679987caf361a7539d76e584cbeddc311e3aee937877c87346f31debc63e9d06"}, ] -[[package]] -name = "gql" -version = "3.4.0" -description = "GraphQL client for Python" -category = "main" -optional = false -python-versions = "*" -files = [ - {file = "gql-3.4.0-py2.py3-none-any.whl", hash = "sha256:59c8a0b8f0a2f3b0b2ff970c94de86f82f65cb1da3340bfe57143e5f7ea82f71"}, - {file = "gql-3.4.0.tar.gz", hash = "sha256:ca81aa8314fa88a8c57dd1ce34941278e0c352d762eb721edcba0387829ea7c0"}, -] - -[package.dependencies] -backoff = ">=1.11.1,<3.0" -graphql-core = ">=3.2,<3.3" -yarl = ">=1.6,<2.0" - -[package.extras] -aiohttp = ["aiohttp (>=3.7.1,<3.9.0)"] -all = ["aiohttp (>=3.7.1,<3.9.0)", "botocore (>=1.21,<2)", "requests (>=2.26,<3)", "requests-toolbelt (>=0.9.1,<1)", "urllib3 (>=1.26)", "websockets (>=10,<11)", "websockets (>=9,<10)"] -botocore = ["botocore (>=1.21,<2)"] -dev = ["aiofiles", "aiohttp (>=3.7.1,<3.9.0)", "black (==22.3.0)", "botocore (>=1.21,<2)", "check-manifest (>=0.42,<1)", "flake8 (==3.8.1)", "isort (==4.3.21)", "mock (==4.0.2)", "mypy (==0.910)", "parse (==1.15.0)", "pytest (==6.2.5)", "pytest-asyncio (==0.16.0)", "pytest-console-scripts (==1.3.1)", "pytest-cov (==3.0.0)", "requests (>=2.26,<3)", "requests-toolbelt (>=0.9.1,<1)", "sphinx (>=3.0.0,<4)", "sphinx-argparse (==0.2.5)", "sphinx-rtd-theme (>=0.4,<1)", "types-aiofiles", "types-mock", "types-requests", "urllib3 (>=1.26)", "vcrpy (==4.0.2)", "websockets (>=10,<11)", "websockets (>=9,<10)"] -requests = ["requests (>=2.26,<3)", "requests-toolbelt (>=0.9.1,<1)", "urllib3 (>=1.26)"] -test = ["aiofiles", "aiohttp (>=3.7.1,<3.9.0)", "botocore (>=1.21,<2)", "mock (==4.0.2)", "parse (==1.15.0)", "pytest (==6.2.5)", "pytest-asyncio (==0.16.0)", "pytest-console-scripts (==1.3.1)", "pytest-cov (==3.0.0)", "requests (>=2.26,<3)", "requests-toolbelt (>=0.9.1,<1)", "urllib3 (>=1.26)", "vcrpy (==4.0.2)", "websockets (>=10,<11)", "websockets (>=9,<10)"] -test-no-transport = ["aiofiles", "mock (==4.0.2)", "parse (==1.15.0)", "pytest (==6.2.5)", "pytest-asyncio (==0.16.0)", "pytest-console-scripts (==1.3.1)", "pytest-cov (==3.0.0)", "vcrpy (==4.0.2)"] -websockets = ["websockets (>=10,<11)", "websockets (>=9,<10)"] - -[[package]] -name = "graphql-core" -version = "3.2.3" -description = "GraphQL implementation for Python, a port of GraphQL.js, the JavaScript reference implementation for GraphQL." -category = "main" -optional = false -python-versions = ">=3.6,<4" -files = [ - {file = "graphql-core-3.2.3.tar.gz", hash = "sha256:06d2aad0ac723e35b1cb47885d3e5c45e956a53bc1b209a9fc5369007fe46676"}, - {file = "graphql_core-3.2.3-py3-none-any.whl", hash = "sha256:5766780452bd5ec8ba133f8bf287dc92713e3868ddd83aee4faab9fc3e303dc3"}, -] - [[package]] name = "idna" version = "3.4" description = "Internationalized Domain Names in Applications (IDNA)" -category = "main" +category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -240,62 +189,62 @@ i18n = ["Babel (>=2.7)"] [[package]] name = "markupsafe" -version = "2.1.2" +version = "2.1.3" description = "Safely add untrusted strings to HTML/XML markup." category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "MarkupSafe-2.1.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:665a36ae6f8f20a4676b53224e33d456a6f5a72657d9c83c2aa00765072f31f7"}, - {file = "MarkupSafe-2.1.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:340bea174e9761308703ae988e982005aedf427de816d1afe98147668cc03036"}, - {file = "MarkupSafe-2.1.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22152d00bf4a9c7c83960521fc558f55a1adbc0631fbb00a9471e097b19d72e1"}, - {file = "MarkupSafe-2.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:28057e985dace2f478e042eaa15606c7efccb700797660629da387eb289b9323"}, - {file = "MarkupSafe-2.1.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ca244fa73f50a800cf8c3ebf7fd93149ec37f5cb9596aa8873ae2c1d23498601"}, - {file = "MarkupSafe-2.1.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d9d971ec1e79906046aa3ca266de79eac42f1dbf3612a05dc9368125952bd1a1"}, - {file = "MarkupSafe-2.1.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:7e007132af78ea9df29495dbf7b5824cb71648d7133cf7848a2a5dd00d36f9ff"}, - {file = "MarkupSafe-2.1.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:7313ce6a199651c4ed9d7e4cfb4aa56fe923b1adf9af3b420ee14e6d9a73df65"}, - {file = "MarkupSafe-2.1.2-cp310-cp310-win32.whl", hash = "sha256:c4a549890a45f57f1ebf99c067a4ad0cb423a05544accaf2b065246827ed9603"}, - {file = "MarkupSafe-2.1.2-cp310-cp310-win_amd64.whl", hash = "sha256:835fb5e38fd89328e9c81067fd642b3593c33e1e17e2fdbf77f5676abb14a156"}, - {file = "MarkupSafe-2.1.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:2ec4f2d48ae59bbb9d1f9d7efb9236ab81429a764dedca114f5fdabbc3788013"}, - {file = "MarkupSafe-2.1.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:608e7073dfa9e38a85d38474c082d4281f4ce276ac0010224eaba11e929dd53a"}, - {file = "MarkupSafe-2.1.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:65608c35bfb8a76763f37036547f7adfd09270fbdbf96608be2bead319728fcd"}, - {file = "MarkupSafe-2.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f2bfb563d0211ce16b63c7cb9395d2c682a23187f54c3d79bfec33e6705473c6"}, - {file = "MarkupSafe-2.1.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:da25303d91526aac3672ee6d49a2f3db2d9502a4a60b55519feb1a4c7714e07d"}, - {file = "MarkupSafe-2.1.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:9cad97ab29dfc3f0249b483412c85c8ef4766d96cdf9dcf5a1e3caa3f3661cf1"}, - {file = "MarkupSafe-2.1.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:085fd3201e7b12809f9e6e9bc1e5c96a368c8523fad5afb02afe3c051ae4afcc"}, - {file = "MarkupSafe-2.1.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:1bea30e9bf331f3fef67e0a3877b2288593c98a21ccb2cf29b74c581a4eb3af0"}, - {file = "MarkupSafe-2.1.2-cp311-cp311-win32.whl", hash = "sha256:7df70907e00c970c60b9ef2938d894a9381f38e6b9db73c5be35e59d92e06625"}, - {file = "MarkupSafe-2.1.2-cp311-cp311-win_amd64.whl", hash = "sha256:e55e40ff0cc8cc5c07996915ad367fa47da6b3fc091fdadca7f5403239c5fec3"}, - {file = "MarkupSafe-2.1.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a6e40afa7f45939ca356f348c8e23048e02cb109ced1eb8420961b2f40fb373a"}, - {file = "MarkupSafe-2.1.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cf877ab4ed6e302ec1d04952ca358b381a882fbd9d1b07cccbfd61783561f98a"}, - {file = "MarkupSafe-2.1.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:63ba06c9941e46fa389d389644e2d8225e0e3e5ebcc4ff1ea8506dce646f8c8a"}, - {file = "MarkupSafe-2.1.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f1cd098434e83e656abf198f103a8207a8187c0fc110306691a2e94a78d0abb2"}, - {file = "MarkupSafe-2.1.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:55f44b440d491028addb3b88f72207d71eeebfb7b5dbf0643f7c023ae1fba619"}, - {file = "MarkupSafe-2.1.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:a6f2fcca746e8d5910e18782f976489939d54a91f9411c32051b4aab2bd7c513"}, - {file = "MarkupSafe-2.1.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:0b462104ba25f1ac006fdab8b6a01ebbfbce9ed37fd37fd4acd70c67c973e460"}, - {file = "MarkupSafe-2.1.2-cp37-cp37m-win32.whl", hash = "sha256:7668b52e102d0ed87cb082380a7e2e1e78737ddecdde129acadb0eccc5423859"}, - {file = "MarkupSafe-2.1.2-cp37-cp37m-win_amd64.whl", hash = "sha256:6d6607f98fcf17e534162f0709aaad3ab7a96032723d8ac8750ffe17ae5a0666"}, - {file = "MarkupSafe-2.1.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:a806db027852538d2ad7555b203300173dd1b77ba116de92da9afbc3a3be3eed"}, - {file = "MarkupSafe-2.1.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:a4abaec6ca3ad8660690236d11bfe28dfd707778e2442b45addd2f086d6ef094"}, - {file = "MarkupSafe-2.1.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f03a532d7dee1bed20bc4884194a16160a2de9ffc6354b3878ec9682bb623c54"}, - {file = "MarkupSafe-2.1.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4cf06cdc1dda95223e9d2d3c58d3b178aa5dacb35ee7e3bbac10e4e1faacb419"}, - {file = "MarkupSafe-2.1.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:22731d79ed2eb25059ae3df1dfc9cb1546691cc41f4e3130fe6bfbc3ecbbecfa"}, - {file = "MarkupSafe-2.1.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:f8ffb705ffcf5ddd0e80b65ddf7bed7ee4f5a441ea7d3419e861a12eaf41af58"}, - {file = "MarkupSafe-2.1.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:8db032bf0ce9022a8e41a22598eefc802314e81b879ae093f36ce9ddf39ab1ba"}, - {file = "MarkupSafe-2.1.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:2298c859cfc5463f1b64bd55cb3e602528db6fa0f3cfd568d3605c50678f8f03"}, - {file = "MarkupSafe-2.1.2-cp38-cp38-win32.whl", hash = "sha256:50c42830a633fa0cf9e7d27664637532791bfc31c731a87b202d2d8ac40c3ea2"}, - {file = "MarkupSafe-2.1.2-cp38-cp38-win_amd64.whl", hash = "sha256:bb06feb762bade6bf3c8b844462274db0c76acc95c52abe8dbed28ae3d44a147"}, - {file = "MarkupSafe-2.1.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:99625a92da8229df6d44335e6fcc558a5037dd0a760e11d84be2260e6f37002f"}, - {file = "MarkupSafe-2.1.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8bca7e26c1dd751236cfb0c6c72d4ad61d986e9a41bbf76cb445f69488b2a2bd"}, - {file = "MarkupSafe-2.1.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:40627dcf047dadb22cd25ea7ecfe9cbf3bbbad0482ee5920b582f3809c97654f"}, - {file = "MarkupSafe-2.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:40dfd3fefbef579ee058f139733ac336312663c6706d1163b82b3003fb1925c4"}, - {file = "MarkupSafe-2.1.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:090376d812fb6ac5f171e5938e82e7f2d7adc2b629101cec0db8b267815c85e2"}, - {file = "MarkupSafe-2.1.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:2e7821bffe00aa6bd07a23913b7f4e01328c3d5cc0b40b36c0bd81d362faeb65"}, - {file = "MarkupSafe-2.1.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:c0a33bc9f02c2b17c3ea382f91b4db0e6cde90b63b296422a939886a7a80de1c"}, - {file = "MarkupSafe-2.1.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:b8526c6d437855442cdd3d87eede9c425c4445ea011ca38d937db299382e6fa3"}, - {file = "MarkupSafe-2.1.2-cp39-cp39-win32.whl", hash = "sha256:137678c63c977754abe9086a3ec011e8fd985ab90631145dfb9294ad09c102a7"}, - {file = "MarkupSafe-2.1.2-cp39-cp39-win_amd64.whl", hash = "sha256:0576fe974b40a400449768941d5d0858cc624e3249dfd1e0c33674e5c7ca7aed"}, - {file = "MarkupSafe-2.1.2.tar.gz", hash = "sha256:abcabc8c2b26036d62d4c746381a6f7cf60aafcc653198ad678306986b09450d"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:cd0f502fe016460680cd20aaa5a76d241d6f35a1c3350c474bac1273803893fa"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e09031c87a1e51556fdcb46e5bd4f59dfb743061cf93c4d6831bf894f125eb57"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:68e78619a61ecf91e76aa3e6e8e33fc4894a2bebe93410754bd28fce0a8a4f9f"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:65c1a9bcdadc6c28eecee2c119465aebff8f7a584dd719facdd9e825ec61ab52"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:525808b8019e36eb524b8c68acdd63a37e75714eac50e988180b169d64480a00"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:962f82a3086483f5e5f64dbad880d31038b698494799b097bc59c2edf392fce6"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:aa7bd130efab1c280bed0f45501b7c8795f9fdbeb02e965371bbef3523627779"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:c9c804664ebe8f83a211cace637506669e7890fec1b4195b505c214e50dd4eb7"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-win32.whl", hash = "sha256:10bbfe99883db80bdbaff2dcf681dfc6533a614f700da1287707e8a5d78a8431"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-win_amd64.whl", hash = "sha256:1577735524cdad32f9f694208aa75e422adba74f1baee7551620e43a3141f559"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:ad9e82fb8f09ade1c3e1b996a6337afac2b8b9e365f926f5a61aacc71adc5b3c"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3c0fae6c3be832a0a0473ac912810b2877c8cb9d76ca48de1ed31e1c68386575"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b076b6226fb84157e3f7c971a47ff3a679d837cf338547532ab866c57930dbee"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bfce63a9e7834b12b87c64d6b155fdd9b3b96191b6bd334bf37db7ff1fe457f2"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:338ae27d6b8745585f87218a3f23f1512dbf52c26c28e322dbe54bcede54ccb9"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e4dd52d80b8c83fdce44e12478ad2e85c64ea965e75d66dbeafb0a3e77308fcc"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:df0be2b576a7abbf737b1575f048c23fb1d769f267ec4358296f31c2479db8f9"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:5bbe06f8eeafd38e5d0a4894ffec89378b6c6a625ff57e3028921f8ff59318ac"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-win32.whl", hash = "sha256:dd15ff04ffd7e05ffcb7fe79f1b98041b8ea30ae9234aed2a9168b5797c3effb"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-win_amd64.whl", hash = "sha256:134da1eca9ec0ae528110ccc9e48041e0828d79f24121a1a146161103c76e686"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8e254ae696c88d98da6555f5ace2279cf7cd5b3f52be2b5cf97feafe883b58d2"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cb0932dc158471523c9637e807d9bfb93e06a95cbf010f1a38b98623b929ef2b"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9402b03f1a1b4dc4c19845e5c749e3ab82d5078d16a2a4c2cd2df62d57bb0707"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ca379055a47383d02a5400cb0d110cef0a776fc644cda797db0c5696cfd7e18e"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:b7ff0f54cb4ff66dd38bebd335a38e2c22c41a8ee45aa608efc890ac3e3931bc"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:c011a4149cfbcf9f03994ec2edffcb8b1dc2d2aede7ca243746df97a5d41ce48"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:56d9f2ecac662ca1611d183feb03a3fa4406469dafe241673d521dd5ae92a155"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-win32.whl", hash = "sha256:8758846a7e80910096950b67071243da3e5a20ed2546e6392603c096778d48e0"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-win_amd64.whl", hash = "sha256:787003c0ddb00500e49a10f2844fac87aa6ce977b90b0feaaf9de23c22508b24"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:2ef12179d3a291be237280175b542c07a36e7f60718296278d8593d21ca937d4"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:2c1b19b3aaacc6e57b7e25710ff571c24d6c3613a45e905b1fde04d691b98ee0"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8afafd99945ead6e075b973fefa56379c5b5c53fd8937dad92c662da5d8fd5ee"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8c41976a29d078bb235fea9b2ecd3da465df42a562910f9022f1a03107bd02be"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d080e0a5eb2529460b30190fcfcc4199bd7f827663f858a226a81bc27beaa97e"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:69c0f17e9f5a7afdf2cc9fb2d1ce6aabdb3bafb7f38017c0b77862bcec2bbad8"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:504b320cd4b7eff6f968eddf81127112db685e81f7e36e75f9f84f0df46041c3"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:42de32b22b6b804f42c5d98be4f7e5e977ecdd9ee9b660fda1a3edf03b11792d"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-win32.whl", hash = "sha256:ceb01949af7121f9fc39f7d27f91be8546f3fb112c608bc4029aef0bab86a2a5"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-win_amd64.whl", hash = "sha256:1b40069d487e7edb2676d3fbdb2b0829ffa2cd63a2ec26c4938b2d34391b4ecc"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:8023faf4e01efadfa183e863fefde0046de576c6f14659e8782065bcece22198"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6b2b56950d93e41f33b4223ead100ea0fe11f8e6ee5f641eb753ce4b77a7042b"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9dcdfd0eaf283af041973bff14a2e143b8bd64e069f4c383416ecd79a81aab58"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:05fb21170423db021895e1ea1e1f3ab3adb85d1c2333cbc2310f2a26bc77272e"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:282c2cb35b5b673bbcadb33a585408104df04f14b2d9b01d4c345a3b92861c2c"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:ab4a0df41e7c16a1392727727e7998a467472d0ad65f3ad5e6e765015df08636"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:7ef3cb2ebbf91e330e3bb937efada0edd9003683db6b57bb108c4001f37a02ea"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:0a4e4a1aff6c7ac4cd55792abf96c915634c2b97e3cc1c7129578aa68ebd754e"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-win32.whl", hash = "sha256:fec21693218efe39aa7f8599346e90c705afa52c5b31ae019b2e57e8f6542bb2"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-win_amd64.whl", hash = "sha256:3fd4abcb888d15a94f32b75d8fd18ee162ca0c064f35b11134be77050296d6ba"}, + {file = "MarkupSafe-2.1.3.tar.gz", hash = "sha256:af598ed32d6ae86f1b747b82783958b1a4ab8f617b06fe68795c7f026abbdcad"}, ] [[package]] @@ -371,105 +320,21 @@ files = [ {file = "msgpack-1.0.5.tar.gz", hash = "sha256:c075544284eadc5cddc70f4757331d99dcbc16b2bbd4849d15f8aae4cf36d31c"}, ] -[[package]] -name = "multidict" -version = "6.0.4" -description = "multidict implementation" -category = "main" -optional = false -python-versions = ">=3.7" -files = [ - {file = "multidict-6.0.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:0b1a97283e0c85772d613878028fec909f003993e1007eafa715b24b377cb9b8"}, - {file = "multidict-6.0.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:eeb6dcc05e911516ae3d1f207d4b0520d07f54484c49dfc294d6e7d63b734171"}, - {file = "multidict-6.0.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d6d635d5209b82a3492508cf5b365f3446afb65ae7ebd755e70e18f287b0adf7"}, - {file = "multidict-6.0.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c048099e4c9e9d615545e2001d3d8a4380bd403e1a0578734e0d31703d1b0c0b"}, - {file = "multidict-6.0.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ea20853c6dbbb53ed34cb4d080382169b6f4554d394015f1bef35e881bf83547"}, - {file = "multidict-6.0.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:16d232d4e5396c2efbbf4f6d4df89bfa905eb0d4dc5b3549d872ab898451f569"}, - {file = "multidict-6.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:36c63aaa167f6c6b04ef2c85704e93af16c11d20de1d133e39de6a0e84582a93"}, - {file = "multidict-6.0.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:64bdf1086b6043bf519869678f5f2757f473dee970d7abf6da91ec00acb9cb98"}, - {file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:43644e38f42e3af682690876cff722d301ac585c5b9e1eacc013b7a3f7b696a0"}, - {file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:7582a1d1030e15422262de9f58711774e02fa80df0d1578995c76214f6954988"}, - {file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:ddff9c4e225a63a5afab9dd15590432c22e8057e1a9a13d28ed128ecf047bbdc"}, - {file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:ee2a1ece51b9b9e7752e742cfb661d2a29e7bcdba2d27e66e28a99f1890e4fa0"}, - {file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:a2e4369eb3d47d2034032a26c7a80fcb21a2cb22e1173d761a162f11e562caa5"}, - {file = "multidict-6.0.4-cp310-cp310-win32.whl", hash = "sha256:574b7eae1ab267e5f8285f0fe881f17efe4b98c39a40858247720935b893bba8"}, - {file = "multidict-6.0.4-cp310-cp310-win_amd64.whl", hash = "sha256:4dcbb0906e38440fa3e325df2359ac6cb043df8e58c965bb45f4e406ecb162cc"}, - {file = "multidict-6.0.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:0dfad7a5a1e39c53ed00d2dd0c2e36aed4650936dc18fd9a1826a5ae1cad6f03"}, - {file = "multidict-6.0.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:64da238a09d6039e3bd39bb3aee9c21a5e34f28bfa5aa22518581f910ff94af3"}, - {file = "multidict-6.0.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ff959bee35038c4624250473988b24f846cbeb2c6639de3602c073f10410ceba"}, - {file = "multidict-6.0.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:01a3a55bd90018c9c080fbb0b9f4891db37d148a0a18722b42f94694f8b6d4c9"}, - {file = "multidict-6.0.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c5cb09abb18c1ea940fb99360ea0396f34d46566f157122c92dfa069d3e0e982"}, - {file = "multidict-6.0.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:666daae833559deb2d609afa4490b85830ab0dfca811a98b70a205621a6109fe"}, - {file = "multidict-6.0.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:11bdf3f5e1518b24530b8241529d2050014c884cf18b6fc69c0c2b30ca248710"}, - {file = "multidict-6.0.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7d18748f2d30f94f498e852c67d61261c643b349b9d2a581131725595c45ec6c"}, - {file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:458f37be2d9e4c95e2d8866a851663cbc76e865b78395090786f6cd9b3bbf4f4"}, - {file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:b1a2eeedcead3a41694130495593a559a668f382eee0727352b9a41e1c45759a"}, - {file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:7d6ae9d593ef8641544d6263c7fa6408cc90370c8cb2bbb65f8d43e5b0351d9c"}, - {file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:5979b5632c3e3534e42ca6ff856bb24b2e3071b37861c2c727ce220d80eee9ed"}, - {file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:dcfe792765fab89c365123c81046ad4103fcabbc4f56d1c1997e6715e8015461"}, - {file = "multidict-6.0.4-cp311-cp311-win32.whl", hash = "sha256:3601a3cece3819534b11d4efc1eb76047488fddd0c85a3948099d5da4d504636"}, - {file = "multidict-6.0.4-cp311-cp311-win_amd64.whl", hash = "sha256:81a4f0b34bd92df3da93315c6a59034df95866014ac08535fc819f043bfd51f0"}, - {file = "multidict-6.0.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:67040058f37a2a51ed8ea8f6b0e6ee5bd78ca67f169ce6122f3e2ec80dfe9b78"}, - {file = "multidict-6.0.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:853888594621e6604c978ce2a0444a1e6e70c8d253ab65ba11657659dcc9100f"}, - {file = "multidict-6.0.4-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:39ff62e7d0f26c248b15e364517a72932a611a9b75f35b45be078d81bdb86603"}, - {file = "multidict-6.0.4-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:af048912e045a2dc732847d33821a9d84ba553f5c5f028adbd364dd4765092ac"}, - {file = "multidict-6.0.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b1e8b901e607795ec06c9e42530788c45ac21ef3aaa11dbd0c69de543bfb79a9"}, - {file = "multidict-6.0.4-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:62501642008a8b9871ddfccbf83e4222cf8ac0d5aeedf73da36153ef2ec222d2"}, - {file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:99b76c052e9f1bc0721f7541e5e8c05db3941eb9ebe7b8553c625ef88d6eefde"}, - {file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:509eac6cf09c794aa27bcacfd4d62c885cce62bef7b2c3e8b2e49d365b5003fe"}, - {file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:21a12c4eb6ddc9952c415f24eef97e3e55ba3af61f67c7bc388dcdec1404a067"}, - {file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:5cad9430ab3e2e4fa4a2ef4450f548768400a2ac635841bc2a56a2052cdbeb87"}, - {file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:ab55edc2e84460694295f401215f4a58597f8f7c9466faec545093045476327d"}, - {file = "multidict-6.0.4-cp37-cp37m-win32.whl", hash = "sha256:5a4dcf02b908c3b8b17a45fb0f15b695bf117a67b76b7ad18b73cf8e92608775"}, - {file = "multidict-6.0.4-cp37-cp37m-win_amd64.whl", hash = "sha256:6ed5f161328b7df384d71b07317f4d8656434e34591f20552c7bcef27b0ab88e"}, - {file = "multidict-6.0.4-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5fc1b16f586f049820c5c5b17bb4ee7583092fa0d1c4e28b5239181ff9532e0c"}, - {file = "multidict-6.0.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1502e24330eb681bdaa3eb70d6358e818e8e8f908a22a1851dfd4e15bc2f8161"}, - {file = "multidict-6.0.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b692f419760c0e65d060959df05f2a531945af31fda0c8a3b3195d4efd06de11"}, - {file = "multidict-6.0.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:45e1ecb0379bfaab5eef059f50115b54571acfbe422a14f668fc8c27ba410e7e"}, - {file = "multidict-6.0.4-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ddd3915998d93fbcd2566ddf9cf62cdb35c9e093075f862935573d265cf8f65d"}, - {file = "multidict-6.0.4-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:59d43b61c59d82f2effb39a93c48b845efe23a3852d201ed2d24ba830d0b4cf2"}, - {file = "multidict-6.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cc8e1d0c705233c5dd0c5e6460fbad7827d5d36f310a0fadfd45cc3029762258"}, - {file = "multidict-6.0.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d6aa0418fcc838522256761b3415822626f866758ee0bc6632c9486b179d0b52"}, - {file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6748717bb10339c4760c1e63da040f5f29f5ed6e59d76daee30305894069a660"}, - {file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:4d1a3d7ef5e96b1c9e92f973e43aa5e5b96c659c9bc3124acbbd81b0b9c8a951"}, - {file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:4372381634485bec7e46718edc71528024fcdc6f835baefe517b34a33c731d60"}, - {file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:fc35cb4676846ef752816d5be2193a1e8367b4c1397b74a565a9d0389c433a1d"}, - {file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:4b9d9e4e2b37daddb5c23ea33a3417901fa7c7b3dee2d855f63ee67a0b21e5b1"}, - {file = "multidict-6.0.4-cp38-cp38-win32.whl", hash = "sha256:e41b7e2b59679edfa309e8db64fdf22399eec4b0b24694e1b2104fb789207779"}, - {file = "multidict-6.0.4-cp38-cp38-win_amd64.whl", hash = "sha256:d6c254ba6e45d8e72739281ebc46ea5eb5f101234f3ce171f0e9f5cc86991480"}, - {file = "multidict-6.0.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:16ab77bbeb596e14212e7bab8429f24c1579234a3a462105cda4a66904998664"}, - {file = "multidict-6.0.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:bc779e9e6f7fda81b3f9aa58e3a6091d49ad528b11ed19f6621408806204ad35"}, - {file = "multidict-6.0.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4ceef517eca3e03c1cceb22030a3e39cb399ac86bff4e426d4fc6ae49052cc60"}, - {file = "multidict-6.0.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:281af09f488903fde97923c7744bb001a9b23b039a909460d0f14edc7bf59706"}, - {file = "multidict-6.0.4-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:52f2dffc8acaba9a2f27174c41c9e57f60b907bb9f096b36b1a1f3be71c6284d"}, - {file = "multidict-6.0.4-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b41156839806aecb3641f3208c0dafd3ac7775b9c4c422d82ee2a45c34ba81ca"}, - {file = "multidict-6.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d5e3fc56f88cc98ef8139255cf8cd63eb2c586531e43310ff859d6bb3a6b51f1"}, - {file = "multidict-6.0.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8316a77808c501004802f9beebde51c9f857054a0c871bd6da8280e718444449"}, - {file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:f70b98cd94886b49d91170ef23ec5c0e8ebb6f242d734ed7ed677b24d50c82cf"}, - {file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:bf6774e60d67a9efe02b3616fee22441d86fab4c6d335f9d2051d19d90a40063"}, - {file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:e69924bfcdda39b722ef4d9aa762b2dd38e4632b3641b1d9a57ca9cd18f2f83a"}, - {file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:6b181d8c23da913d4ff585afd1155a0e1194c0b50c54fcfe286f70cdaf2b7176"}, - {file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:52509b5be062d9eafc8170e53026fbc54cf3b32759a23d07fd935fb04fc22d95"}, - {file = "multidict-6.0.4-cp39-cp39-win32.whl", hash = "sha256:27c523fbfbdfd19c6867af7346332b62b586eed663887392cff78d614f9ec313"}, - {file = "multidict-6.0.4-cp39-cp39-win_amd64.whl", hash = "sha256:33029f5734336aa0d4c0384525da0387ef89148dc7191aae00ca5fb23d7aafc2"}, - {file = "multidict-6.0.4.tar.gz", hash = "sha256:3666906492efb76453c0e7b97f2cf459b0682e7402c0489a95484965dbc1da49"}, -] - [[package]] name = "packaging" -version = "23.0" +version = "23.1" description = "Core utilities for Python packages" category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "packaging-23.0-py3-none-any.whl", hash = "sha256:714ac14496c3e68c99c29b00845f7a2b85f3bb6f1078fd9f72fd20f0570002b2"}, - {file = "packaging-23.0.tar.gz", hash = "sha256:b6ad297f8907de0fa2fe1ccbd26fdaf387f5f47c7275fedf8cce89f99446cf97"}, + {file = "packaging-23.1-py3-none-any.whl", hash = "sha256:994793af429502c4ea2ebf6bf664629d07c1a9fe974af92966e4b8d2df7edc61"}, + {file = "packaging-23.1.tar.gz", hash = "sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f"}, ] [[package]] name = "polywrap-client" -version = "0.1.0" +version = "0.1.0a29" description = "" category = "main" optional = false @@ -481,7 +346,6 @@ develop = true polywrap-core = {path = "../polywrap-core", develop = true} polywrap-manifest = {path = "../polywrap-manifest", develop = true} polywrap-msgpack = {path = "../polywrap-msgpack", develop = true} -polywrap-uri-resolvers = {path = "../polywrap-uri-resolvers", develop = true} [package.source] type = "directory" @@ -489,7 +353,7 @@ url = "../packages/polywrap-client" [[package]] name = "polywrap-client-config-builder" -version = "0.1.0" +version = "0.1.0a29" description = "" category = "main" optional = false @@ -499,6 +363,7 @@ develop = true [package.dependencies] polywrap-core = {path = "../polywrap-core", develop = true} +polywrap-uri-resolvers = {path = "../polywrap-uri-resolvers", develop = true} [package.source] type = "directory" @@ -506,7 +371,7 @@ url = "../packages/polywrap-client-config-builder" [[package]] name = "polywrap-core" -version = "0.1.0" +version = "0.1.0a29" description = "" category = "main" optional = false @@ -515,11 +380,8 @@ files = [] develop = true [package.dependencies] -gql = "3.4.0" -graphql-core = "^3.2.1" polywrap-manifest = {path = "../polywrap-manifest", develop = true} polywrap-msgpack = {path = "../polywrap-msgpack", develop = true} -pydantic = "^1.10.2" [package.source] type = "directory" @@ -527,7 +389,7 @@ url = "../packages/polywrap-core" [[package]] name = "polywrap-manifest" -version = "0.1.0" +version = "0.1.0a29" description = "WRAP manifest" category = "main" optional = false @@ -545,7 +407,7 @@ url = "../packages/polywrap-manifest" [[package]] name = "polywrap-msgpack" -version = "0.1.0" +version = "0.1.0a29" description = "WRAP msgpack encoding" category = "main" optional = false @@ -562,7 +424,7 @@ url = "../packages/polywrap-msgpack" [[package]] name = "polywrap-plugin" -version = "0.1.0" +version = "0.1.0a29" description = "Plugin package" category = "main" optional = false @@ -571,9 +433,9 @@ files = [] develop = true [package.dependencies] -polywrap_core = {path = "../polywrap-core"} -polywrap_manifest = {path = "../polywrap-manifest"} -polywrap_msgpack = {path = "../polywrap-msgpack"} +polywrap-core = {path = "../polywrap-core", develop = true} +polywrap-manifest = {path = "../polywrap-manifest", develop = true} +polywrap-msgpack = {path = "../polywrap-msgpack", develop = true} [package.source] type = "directory" @@ -581,7 +443,7 @@ url = "../packages/polywrap-plugin" [[package]] name = "polywrap-uri-resolvers" -version = "0.1.0" +version = "0.1.0a29" description = "" category = "main" optional = false @@ -599,7 +461,7 @@ url = "../packages/polywrap-uri-resolvers" [[package]] name = "polywrap-wasm" -version = "0.1.0" +version = "0.1.0a29" description = "" category = "main" optional = false @@ -621,48 +483,48 @@ url = "../packages/polywrap-wasm" [[package]] name = "pydantic" -version = "1.10.7" +version = "1.10.9" description = "Data validation and settings management using python type hints" category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "pydantic-1.10.7-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e79e999e539872e903767c417c897e729e015872040e56b96e67968c3b918b2d"}, - {file = "pydantic-1.10.7-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:01aea3a42c13f2602b7ecbbea484a98169fb568ebd9e247593ea05f01b884b2e"}, - {file = "pydantic-1.10.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:516f1ed9bc2406a0467dd777afc636c7091d71f214d5e413d64fef45174cfc7a"}, - {file = "pydantic-1.10.7-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ae150a63564929c675d7f2303008d88426a0add46efd76c3fc797cd71cb1b46f"}, - {file = "pydantic-1.10.7-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:ecbbc51391248116c0a055899e6c3e7ffbb11fb5e2a4cd6f2d0b93272118a209"}, - {file = "pydantic-1.10.7-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:f4a2b50e2b03d5776e7f21af73e2070e1b5c0d0df255a827e7c632962f8315af"}, - {file = "pydantic-1.10.7-cp310-cp310-win_amd64.whl", hash = "sha256:a7cd2251439988b413cb0a985c4ed82b6c6aac382dbaff53ae03c4b23a70e80a"}, - {file = "pydantic-1.10.7-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:68792151e174a4aa9e9fc1b4e653e65a354a2fa0fed169f7b3d09902ad2cb6f1"}, - {file = "pydantic-1.10.7-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:dfe2507b8ef209da71b6fb5f4e597b50c5a34b78d7e857c4f8f3115effaef5fe"}, - {file = "pydantic-1.10.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10a86d8c8db68086f1e30a530f7d5f83eb0685e632e411dbbcf2d5c0150e8dcd"}, - {file = "pydantic-1.10.7-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d75ae19d2a3dbb146b6f324031c24f8a3f52ff5d6a9f22f0683694b3afcb16fb"}, - {file = "pydantic-1.10.7-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:464855a7ff7f2cc2cf537ecc421291b9132aa9c79aef44e917ad711b4a93163b"}, - {file = "pydantic-1.10.7-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:193924c563fae6ddcb71d3f06fa153866423ac1b793a47936656e806b64e24ca"}, - {file = "pydantic-1.10.7-cp311-cp311-win_amd64.whl", hash = "sha256:b4a849d10f211389502059c33332e91327bc154acc1845f375a99eca3afa802d"}, - {file = "pydantic-1.10.7-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:cc1dde4e50a5fc1336ee0581c1612215bc64ed6d28d2c7c6f25d2fe3e7c3e918"}, - {file = "pydantic-1.10.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e0cfe895a504c060e5d36b287ee696e2fdad02d89e0d895f83037245218a87fe"}, - {file = "pydantic-1.10.7-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:670bb4683ad1e48b0ecb06f0cfe2178dcf74ff27921cdf1606e527d2617a81ee"}, - {file = "pydantic-1.10.7-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:950ce33857841f9a337ce07ddf46bc84e1c4946d2a3bba18f8280297157a3fd1"}, - {file = "pydantic-1.10.7-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:c15582f9055fbc1bfe50266a19771bbbef33dd28c45e78afbe1996fd70966c2a"}, - {file = "pydantic-1.10.7-cp37-cp37m-win_amd64.whl", hash = "sha256:82dffb306dd20bd5268fd6379bc4bfe75242a9c2b79fec58e1041fbbdb1f7914"}, - {file = "pydantic-1.10.7-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8c7f51861d73e8b9ddcb9916ae7ac39fb52761d9ea0df41128e81e2ba42886cd"}, - {file = "pydantic-1.10.7-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:6434b49c0b03a51021ade5c4daa7d70c98f7a79e95b551201fff682fc1661245"}, - {file = "pydantic-1.10.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:64d34ab766fa056df49013bb6e79921a0265204c071984e75a09cbceacbbdd5d"}, - {file = "pydantic-1.10.7-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:701daea9ffe9d26f97b52f1d157e0d4121644f0fcf80b443248434958fd03dc3"}, - {file = "pydantic-1.10.7-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:cf135c46099ff3f919d2150a948ce94b9ce545598ef2c6c7bf55dca98a304b52"}, - {file = "pydantic-1.10.7-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b0f85904f73161817b80781cc150f8b906d521fa11e3cdabae19a581c3606209"}, - {file = "pydantic-1.10.7-cp38-cp38-win_amd64.whl", hash = "sha256:9f6f0fd68d73257ad6685419478c5aece46432f4bdd8d32c7345f1986496171e"}, - {file = "pydantic-1.10.7-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c230c0d8a322276d6e7b88c3f7ce885f9ed16e0910354510e0bae84d54991143"}, - {file = "pydantic-1.10.7-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:976cae77ba6a49d80f461fd8bba183ff7ba79f44aa5cfa82f1346b5626542f8e"}, - {file = "pydantic-1.10.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7d45fc99d64af9aaf7e308054a0067fdcd87ffe974f2442312372dfa66e1001d"}, - {file = "pydantic-1.10.7-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d2a5ebb48958754d386195fe9e9c5106f11275867051bf017a8059410e9abf1f"}, - {file = "pydantic-1.10.7-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:abfb7d4a7cd5cc4e1d1887c43503a7c5dd608eadf8bc615413fc498d3e4645cd"}, - {file = "pydantic-1.10.7-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:80b1fab4deb08a8292d15e43a6edccdffa5377a36a4597bb545b93e79c5ff0a5"}, - {file = "pydantic-1.10.7-cp39-cp39-win_amd64.whl", hash = "sha256:d71e69699498b020ea198468e2480a2f1e7433e32a3a99760058c6520e2bea7e"}, - {file = "pydantic-1.10.7-py3-none-any.whl", hash = "sha256:0cd181f1d0b1d00e2b705f1bf1ac7799a2d938cce3376b8007df62b29be3c2c6"}, - {file = "pydantic-1.10.7.tar.gz", hash = "sha256:cfc83c0678b6ba51b0532bea66860617c4cd4251ecf76e9846fa5a9f3454e97e"}, + {file = "pydantic-1.10.9-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e692dec4a40bfb40ca530e07805b1208c1de071a18d26af4a2a0d79015b352ca"}, + {file = "pydantic-1.10.9-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:3c52eb595db83e189419bf337b59154bdcca642ee4b2a09e5d7797e41ace783f"}, + {file = "pydantic-1.10.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:939328fd539b8d0edf244327398a667b6b140afd3bf7e347cf9813c736211896"}, + {file = "pydantic-1.10.9-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b48d3d634bca23b172f47f2335c617d3fcb4b3ba18481c96b7943a4c634f5c8d"}, + {file = "pydantic-1.10.9-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:f0b7628fb8efe60fe66fd4adadd7ad2304014770cdc1f4934db41fe46cc8825f"}, + {file = "pydantic-1.10.9-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:e1aa5c2410769ca28aa9a7841b80d9d9a1c5f223928ca8bec7e7c9a34d26b1d4"}, + {file = "pydantic-1.10.9-cp310-cp310-win_amd64.whl", hash = "sha256:eec39224b2b2e861259d6f3c8b6290d4e0fbdce147adb797484a42278a1a486f"}, + {file = "pydantic-1.10.9-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:d111a21bbbfd85c17248130deac02bbd9b5e20b303338e0dbe0faa78330e37e0"}, + {file = "pydantic-1.10.9-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2e9aec8627a1a6823fc62fb96480abe3eb10168fd0d859ee3d3b395105ae19a7"}, + {file = "pydantic-1.10.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:07293ab08e7b4d3c9d7de4949a0ea571f11e4557d19ea24dd3ae0c524c0c334d"}, + {file = "pydantic-1.10.9-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7ee829b86ce984261d99ff2fd6e88f2230068d96c2a582f29583ed602ef3fc2c"}, + {file = "pydantic-1.10.9-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:4b466a23009ff5cdd7076eb56aca537c745ca491293cc38e72bf1e0e00de5b91"}, + {file = "pydantic-1.10.9-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:7847ca62e581e6088d9000f3c497267868ca2fa89432714e21a4fb33a04d52e8"}, + {file = "pydantic-1.10.9-cp311-cp311-win_amd64.whl", hash = "sha256:7845b31959468bc5b78d7b95ec52fe5be32b55d0d09983a877cca6aedc51068f"}, + {file = "pydantic-1.10.9-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:517a681919bf880ce1dac7e5bc0c3af1e58ba118fd774da2ffcd93c5f96eaece"}, + {file = "pydantic-1.10.9-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:67195274fd27780f15c4c372f4ba9a5c02dad6d50647b917b6a92bf00b3d301a"}, + {file = "pydantic-1.10.9-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2196c06484da2b3fded1ab6dbe182bdabeb09f6318b7fdc412609ee2b564c49a"}, + {file = "pydantic-1.10.9-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:6257bb45ad78abacda13f15bde5886efd6bf549dd71085e64b8dcf9919c38b60"}, + {file = "pydantic-1.10.9-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:3283b574b01e8dbc982080d8287c968489d25329a463b29a90d4157de4f2baaf"}, + {file = "pydantic-1.10.9-cp37-cp37m-win_amd64.whl", hash = "sha256:5f8bbaf4013b9a50e8100333cc4e3fa2f81214033e05ac5aa44fa24a98670a29"}, + {file = "pydantic-1.10.9-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b9cd67fb763248cbe38f0593cd8611bfe4b8ad82acb3bdf2b0898c23415a1f82"}, + {file = "pydantic-1.10.9-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:f50e1764ce9353be67267e7fd0da08349397c7db17a562ad036aa7c8f4adfdb6"}, + {file = "pydantic-1.10.9-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:73ef93e5e1d3c8e83f1ff2e7fdd026d9e063c7e089394869a6e2985696693766"}, + {file = "pydantic-1.10.9-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:128d9453d92e6e81e881dd7e2484e08d8b164da5507f62d06ceecf84bf2e21d3"}, + {file = "pydantic-1.10.9-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:ad428e92ab68798d9326bb3e5515bc927444a3d71a93b4a2ca02a8a5d795c572"}, + {file = "pydantic-1.10.9-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:fab81a92f42d6d525dd47ced310b0c3e10c416bbfae5d59523e63ea22f82b31e"}, + {file = "pydantic-1.10.9-cp38-cp38-win_amd64.whl", hash = "sha256:963671eda0b6ba6926d8fc759e3e10335e1dc1b71ff2a43ed2efd6996634dafb"}, + {file = "pydantic-1.10.9-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:970b1bdc6243ef663ba5c7e36ac9ab1f2bfecb8ad297c9824b542d41a750b298"}, + {file = "pydantic-1.10.9-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:7e1d5290044f620f80cf1c969c542a5468f3656de47b41aa78100c5baa2b8276"}, + {file = "pydantic-1.10.9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:83fcff3c7df7adff880622a98022626f4f6dbce6639a88a15a3ce0f96466cb60"}, + {file = "pydantic-1.10.9-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0da48717dc9495d3a8f215e0d012599db6b8092db02acac5e0d58a65248ec5bc"}, + {file = "pydantic-1.10.9-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:0a2aabdc73c2a5960e87c3ffebca6ccde88665616d1fd6d3db3178ef427b267a"}, + {file = "pydantic-1.10.9-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:9863b9420d99dfa9c064042304868e8ba08e89081428a1c471858aa2af6f57c4"}, + {file = "pydantic-1.10.9-cp39-cp39-win_amd64.whl", hash = "sha256:e7c9900b43ac14110efa977be3da28931ffc74c27e96ee89fbcaaf0b0fe338e1"}, + {file = "pydantic-1.10.9-py3-none-any.whl", hash = "sha256:6cafde02f6699ce4ff643417d1a9223716ec25e228ddc3b436fe7e2d25a1f305"}, + {file = "pydantic-1.10.9.tar.gz", hash = "sha256:95c70da2cd3b6ddf3b9645ecaa8d98f3d80c606624b6d245558d202cd23ea3be"}, ] [package.dependencies] @@ -674,14 +536,14 @@ email = ["email-validator (>=1.0.3)"] [[package]] name = "pygments" -version = "2.14.0" +version = "2.15.1" description = "Pygments is a syntax highlighting package written in Python." category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" files = [ - {file = "Pygments-2.14.0-py3-none-any.whl", hash = "sha256:fa7bd7bd2771287c0de303af8bfdfc731f51bd2c6a47ab69d117138893b82717"}, - {file = "Pygments-2.14.0.tar.gz", hash = "sha256:b3ed06a9e8ac9a9aae5a6f5dbe78a8a58655d17b43b93c078f094ddc476ae297"}, + {file = "Pygments-2.15.1-py3-none-any.whl", hash = "sha256:db2db3deb4b4179f399a09054b023b6a586b76499d36965813c71aa8ed7b5fd1"}, + {file = "Pygments-2.15.1.tar.gz", hash = "sha256:8ace4d3c1dd481894b2005f560ead0f9f19ee64fe983366be1a21e171d12775c"}, ] [package.extras] @@ -689,21 +551,21 @@ plugins = ["importlib-metadata"] [[package]] name = "requests" -version = "2.28.2" +version = "2.31.0" description = "Python HTTP for Humans." category = "dev" optional = false -python-versions = ">=3.7, <4" +python-versions = ">=3.7" files = [ - {file = "requests-2.28.2-py3-none-any.whl", hash = "sha256:64299f4909223da747622c030b781c0d7811e359c37124b4bd368fb8c6518baa"}, - {file = "requests-2.28.2.tar.gz", hash = "sha256:98b1b2782e3c6c4904938b84c0eb932721069dfdb9134313beff7c83c2df24bf"}, + {file = "requests-2.31.0-py3-none-any.whl", hash = "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f"}, + {file = "requests-2.31.0.tar.gz", hash = "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"}, ] [package.dependencies] certifi = ">=2017.4.17" charset-normalizer = ">=2,<4" idna = ">=2.5,<4" -urllib3 = ">=1.21.1,<1.27" +urllib3 = ">=1.21.1,<3" [package.extras] socks = ["PySocks (>=1.5.6,!=1.5.7)"] @@ -723,21 +585,21 @@ files = [ [[package]] name = "sphinx" -version = "6.1.3" +version = "6.2.1" description = "Python documentation generator" category = "dev" optional = false python-versions = ">=3.8" files = [ - {file = "Sphinx-6.1.3.tar.gz", hash = "sha256:0dac3b698538ffef41716cf97ba26c1c7788dba73ce6f150c1ff5b4720786dd2"}, - {file = "sphinx-6.1.3-py3-none-any.whl", hash = "sha256:807d1cb3d6be87eb78a381c3e70ebd8d346b9a25f3753e9947e866b2786865fc"}, + {file = "Sphinx-6.2.1.tar.gz", hash = "sha256:6d56a34697bb749ffa0152feafc4b19836c755d90a7c59b72bc7dfd371b9cc6b"}, + {file = "sphinx-6.2.1-py3-none-any.whl", hash = "sha256:97787ff1fa3256a3eef9eda523a63dbf299f7b47e053cfcf684a1c2a8380c912"}, ] [package.dependencies] alabaster = ">=0.7,<0.8" babel = ">=2.9" colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} -docutils = ">=0.18,<0.20" +docutils = ">=0.18.1,<0.20" imagesize = ">=1.3" Jinja2 = ">=3.0" packaging = ">=21.0" @@ -754,24 +616,24 @@ sphinxcontrib-serializinghtml = ">=1.1.5" [package.extras] docs = ["sphinxcontrib-websupport"] lint = ["docutils-stubs", "flake8 (>=3.5.0)", "flake8-simplify", "isort", "mypy (>=0.990)", "ruff", "sphinx-lint", "types-requests"] -test = ["cython", "html5lib", "pytest (>=4.6)"] +test = ["cython", "filelock", "html5lib", "pytest (>=4.6)"] [[package]] name = "sphinx-rtd-theme" -version = "1.2.0" +version = "1.2.2" description = "Read the Docs theme for Sphinx" category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7" files = [ - {file = "sphinx_rtd_theme-1.2.0-py2.py3-none-any.whl", hash = "sha256:f823f7e71890abe0ac6aaa6013361ea2696fc8d3e1fa798f463e82bdb77eeff2"}, - {file = "sphinx_rtd_theme-1.2.0.tar.gz", hash = "sha256:a0d8bd1a2ed52e0b338cbe19c4b2eef3c5e7a048769753dac6a9f059c7b641b8"}, + {file = "sphinx_rtd_theme-1.2.2-py2.py3-none-any.whl", hash = "sha256:6a7e7d8af34eb8fc57d52a09c6b6b9c46ff44aea5951bc831eeb9245378f3689"}, + {file = "sphinx_rtd_theme-1.2.2.tar.gz", hash = "sha256:01c5c5a72e2d025bd23d1f06c59a4831b06e6ce6c01fdd5ebfe9986c0a880fc7"}, ] [package.dependencies] docutils = "<0.19" sphinx = ">=1.6,<7" -sphinxcontrib-jquery = {version = ">=2.0.0,<3.0.0 || >3.0.0", markers = "python_version > \"3\""} +sphinxcontrib-jquery = ">=4,<5" [package.extras] dev = ["bump2version", "sphinxcontrib-httpdomain", "transifex-client", "wheel"] @@ -888,14 +750,14 @@ test = ["pytest"] [[package]] name = "typing-extensions" -version = "4.5.0" +version = "4.6.3" description = "Backported and Experimental Type Hints for Python 3.7+" category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "typing_extensions-4.5.0-py3-none-any.whl", hash = "sha256:fb33085c39dd998ac16d1431ebc293a8b3eedd00fd4a32de0ff79002c19511b4"}, - {file = "typing_extensions-4.5.0.tar.gz", hash = "sha256:5cb5f4a79139d699607b3ef622a1dedafa84e115ab0024e0d9c044a9479ca7cb"}, + {file = "typing_extensions-4.6.3-py3-none-any.whl", hash = "sha256:88a4153d8505aabbb4e13aacb7c486c2b4a33ca3b3f807914a9b4c844c471c26"}, + {file = "typing_extensions-4.6.3.tar.gz", hash = "sha256:d91d5919357fe7f681a9f2b5b4cb2a5f1ef0a1e9f59c4d8ff0d3491e05c0ffd5"}, ] [[package]] @@ -923,20 +785,21 @@ files = [ [[package]] name = "urllib3" -version = "1.26.15" +version = "2.0.3" description = "HTTP library with thread-safe connection pooling, file post, and more." category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" +python-versions = ">=3.7" files = [ - {file = "urllib3-1.26.15-py2.py3-none-any.whl", hash = "sha256:aa751d169e23c7479ce47a0cb0da579e3ede798f994f5816a74e4f4500dcea42"}, - {file = "urllib3-1.26.15.tar.gz", hash = "sha256:8a388717b9476f934a21484e8c8e61875ab60644d29b9b39e11e4b9dc1c6b305"}, + {file = "urllib3-2.0.3-py3-none-any.whl", hash = "sha256:48e7fafa40319d358848e1bc6809b208340fafe2096f1725d05d67443d0483d1"}, + {file = "urllib3-2.0.3.tar.gz", hash = "sha256:bee28b5e56addb8226c96f7f13ac28cb4c301dd5ea8a6ca179c0b9835e032825"}, ] [package.extras] -brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)", "brotlipy (>=0.6.0)"] -secure = ["certifi", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "ipaddress", "pyOpenSSL (>=0.14)", "urllib3-secure-extra"] -socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] +brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] +secure = ["certifi", "cryptography (>=1.9)", "idna (>=2.0.0)", "pyopenssl (>=17.1.0)", "urllib3-secure-extra"] +socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] +zstd = ["zstandard (>=0.18.0)"] [[package]] name = "wasmtime" @@ -957,94 +820,6 @@ files = [ [package.extras] testing = ["coverage", "flake8 (==4.0.1)", "pycparser", "pytest", "pytest-flake8", "pytest-mypy"] -[[package]] -name = "yarl" -version = "1.8.2" -description = "Yet another URL library" -category = "main" -optional = false -python-versions = ">=3.7" -files = [ - {file = "yarl-1.8.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:bb81f753c815f6b8e2ddd2eef3c855cf7da193b82396ac013c661aaa6cc6b0a5"}, - {file = "yarl-1.8.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:47d49ac96156f0928f002e2424299b2c91d9db73e08c4cd6742923a086f1c863"}, - {file = "yarl-1.8.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:3fc056e35fa6fba63248d93ff6e672c096f95f7836938241ebc8260e062832fe"}, - {file = "yarl-1.8.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:58a3c13d1c3005dbbac5c9f0d3210b60220a65a999b1833aa46bd6677c69b08e"}, - {file = "yarl-1.8.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:10b08293cda921157f1e7c2790999d903b3fd28cd5c208cf8826b3b508026996"}, - {file = "yarl-1.8.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:de986979bbd87272fe557e0a8fcb66fd40ae2ddfe28a8b1ce4eae22681728fef"}, - {file = "yarl-1.8.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c4fcfa71e2c6a3cb568cf81aadc12768b9995323186a10827beccf5fa23d4f8"}, - {file = "yarl-1.8.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ae4d7ff1049f36accde9e1ef7301912a751e5bae0a9d142459646114c70ecba6"}, - {file = "yarl-1.8.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:bf071f797aec5b96abfc735ab97da9fd8f8768b43ce2abd85356a3127909d146"}, - {file = "yarl-1.8.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:74dece2bfc60f0f70907c34b857ee98f2c6dd0f75185db133770cd67300d505f"}, - {file = "yarl-1.8.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:df60a94d332158b444301c7f569659c926168e4d4aad2cfbf4bce0e8fb8be826"}, - {file = "yarl-1.8.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:63243b21c6e28ec2375f932a10ce7eda65139b5b854c0f6b82ed945ba526bff3"}, - {file = "yarl-1.8.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:cfa2bbca929aa742b5084fd4663dd4b87c191c844326fcb21c3afd2d11497f80"}, - {file = "yarl-1.8.2-cp310-cp310-win32.whl", hash = "sha256:b05df9ea7496df11b710081bd90ecc3a3db6adb4fee36f6a411e7bc91a18aa42"}, - {file = "yarl-1.8.2-cp310-cp310-win_amd64.whl", hash = "sha256:24ad1d10c9db1953291f56b5fe76203977f1ed05f82d09ec97acb623a7976574"}, - {file = "yarl-1.8.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:2a1fca9588f360036242f379bfea2b8b44cae2721859b1c56d033adfd5893634"}, - {file = "yarl-1.8.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f37db05c6051eff17bc832914fe46869f8849de5b92dc4a3466cd63095d23dfd"}, - {file = "yarl-1.8.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:77e913b846a6b9c5f767b14dc1e759e5aff05502fe73079f6f4176359d832581"}, - {file = "yarl-1.8.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0978f29222e649c351b173da2b9b4665ad1feb8d1daa9d971eb90df08702668a"}, - {file = "yarl-1.8.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:388a45dc77198b2460eac0aca1efd6a7c09e976ee768b0d5109173e521a19daf"}, - {file = "yarl-1.8.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2305517e332a862ef75be8fad3606ea10108662bc6fe08509d5ca99503ac2aee"}, - {file = "yarl-1.8.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:42430ff511571940d51e75cf42f1e4dbdded477e71c1b7a17f4da76c1da8ea76"}, - {file = "yarl-1.8.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3150078118f62371375e1e69b13b48288e44f6691c1069340081c3fd12c94d5b"}, - {file = "yarl-1.8.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:c15163b6125db87c8f53c98baa5e785782078fbd2dbeaa04c6141935eb6dab7a"}, - {file = "yarl-1.8.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:4d04acba75c72e6eb90745447d69f84e6c9056390f7a9724605ca9c56b4afcc6"}, - {file = "yarl-1.8.2-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:e7fd20d6576c10306dea2d6a5765f46f0ac5d6f53436217913e952d19237efc4"}, - {file = "yarl-1.8.2-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:75c16b2a900b3536dfc7014905a128a2bea8fb01f9ee26d2d7d8db0a08e7cb2c"}, - {file = "yarl-1.8.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:6d88056a04860a98341a0cf53e950e3ac9f4e51d1b6f61a53b0609df342cc8b2"}, - {file = "yarl-1.8.2-cp311-cp311-win32.whl", hash = "sha256:fb742dcdd5eec9f26b61224c23baea46c9055cf16f62475e11b9b15dfd5c117b"}, - {file = "yarl-1.8.2-cp311-cp311-win_amd64.whl", hash = "sha256:8c46d3d89902c393a1d1e243ac847e0442d0196bbd81aecc94fcebbc2fd5857c"}, - {file = "yarl-1.8.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:ceff9722e0df2e0a9e8a79c610842004fa54e5b309fe6d218e47cd52f791d7ef"}, - {file = "yarl-1.8.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3f6b4aca43b602ba0f1459de647af954769919c4714706be36af670a5f44c9c1"}, - {file = "yarl-1.8.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1684a9bd9077e922300ecd48003ddae7a7474e0412bea38d4631443a91d61077"}, - {file = "yarl-1.8.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ebb78745273e51b9832ef90c0898501006670d6e059f2cdb0e999494eb1450c2"}, - {file = "yarl-1.8.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3adeef150d528ded2a8e734ebf9ae2e658f4c49bf413f5f157a470e17a4a2e89"}, - {file = "yarl-1.8.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:57a7c87927a468e5a1dc60c17caf9597161d66457a34273ab1760219953f7f4c"}, - {file = "yarl-1.8.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:efff27bd8cbe1f9bd127e7894942ccc20c857aa8b5a0327874f30201e5ce83d0"}, - {file = "yarl-1.8.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:a783cd344113cb88c5ff7ca32f1f16532a6f2142185147822187913eb989f739"}, - {file = "yarl-1.8.2-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:705227dccbe96ab02c7cb2c43e1228e2826e7ead880bb19ec94ef279e9555b5b"}, - {file = "yarl-1.8.2-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:34c09b43bd538bf6c4b891ecce94b6fa4f1f10663a8d4ca589a079a5018f6ed7"}, - {file = "yarl-1.8.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:a48f4f7fea9a51098b02209d90297ac324241bf37ff6be6d2b0149ab2bd51b37"}, - {file = "yarl-1.8.2-cp37-cp37m-win32.whl", hash = "sha256:0414fd91ce0b763d4eadb4456795b307a71524dbacd015c657bb2a39db2eab89"}, - {file = "yarl-1.8.2-cp37-cp37m-win_amd64.whl", hash = "sha256:d881d152ae0007809c2c02e22aa534e702f12071e6b285e90945aa3c376463c5"}, - {file = "yarl-1.8.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5df5e3d04101c1e5c3b1d69710b0574171cc02fddc4b23d1b2813e75f35a30b1"}, - {file = "yarl-1.8.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:7a66c506ec67eb3159eea5096acd05f5e788ceec7b96087d30c7d2865a243918"}, - {file = "yarl-1.8.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:2b4fa2606adf392051d990c3b3877d768771adc3faf2e117b9de7eb977741229"}, - {file = "yarl-1.8.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1e21fb44e1eff06dd6ef971d4bdc611807d6bd3691223d9c01a18cec3677939e"}, - {file = "yarl-1.8.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:93202666046d9edadfe9f2e7bf5e0782ea0d497b6d63da322e541665d65a044e"}, - {file = "yarl-1.8.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fc77086ce244453e074e445104f0ecb27530d6fd3a46698e33f6c38951d5a0f1"}, - {file = "yarl-1.8.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:64dd68a92cab699a233641f5929a40f02a4ede8c009068ca8aa1fe87b8c20ae3"}, - {file = "yarl-1.8.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1b372aad2b5f81db66ee7ec085cbad72c4da660d994e8e590c997e9b01e44901"}, - {file = "yarl-1.8.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:e6f3515aafe0209dd17fb9bdd3b4e892963370b3de781f53e1746a521fb39fc0"}, - {file = "yarl-1.8.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:dfef7350ee369197106805e193d420b75467b6cceac646ea5ed3049fcc950a05"}, - {file = "yarl-1.8.2-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:728be34f70a190566d20aa13dc1f01dc44b6aa74580e10a3fb159691bc76909d"}, - {file = "yarl-1.8.2-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:ff205b58dc2929191f68162633d5e10e8044398d7a45265f90a0f1d51f85f72c"}, - {file = "yarl-1.8.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:baf211dcad448a87a0d9047dc8282d7de59473ade7d7fdf22150b1d23859f946"}, - {file = "yarl-1.8.2-cp38-cp38-win32.whl", hash = "sha256:272b4f1599f1b621bf2aabe4e5b54f39a933971f4e7c9aa311d6d7dc06965165"}, - {file = "yarl-1.8.2-cp38-cp38-win_amd64.whl", hash = "sha256:326dd1d3caf910cd26a26ccbfb84c03b608ba32499b5d6eeb09252c920bcbe4f"}, - {file = "yarl-1.8.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:f8ca8ad414c85bbc50f49c0a106f951613dfa5f948ab69c10ce9b128d368baf8"}, - {file = "yarl-1.8.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:418857f837347e8aaef682679f41e36c24250097f9e2f315d39bae3a99a34cbf"}, - {file = "yarl-1.8.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ae0eec05ab49e91a78700761777f284c2df119376e391db42c38ab46fd662b77"}, - {file = "yarl-1.8.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:009a028127e0a1755c38b03244c0bea9d5565630db9c4cf9572496e947137a87"}, - {file = "yarl-1.8.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3edac5d74bb3209c418805bda77f973117836e1de7c000e9755e572c1f7850d0"}, - {file = "yarl-1.8.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:da65c3f263729e47351261351b8679c6429151ef9649bba08ef2528ff2c423b2"}, - {file = "yarl-1.8.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0ef8fb25e52663a1c85d608f6dd72e19bd390e2ecaf29c17fb08f730226e3a08"}, - {file = "yarl-1.8.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bcd7bb1e5c45274af9a1dd7494d3c52b2be5e6bd8d7e49c612705fd45420b12d"}, - {file = "yarl-1.8.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:44ceac0450e648de86da8e42674f9b7077d763ea80c8ceb9d1c3e41f0f0a9951"}, - {file = "yarl-1.8.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:97209cc91189b48e7cfe777237c04af8e7cc51eb369004e061809bcdf4e55220"}, - {file = "yarl-1.8.2-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:48dd18adcf98ea9cd721a25313aef49d70d413a999d7d89df44f469edfb38a06"}, - {file = "yarl-1.8.2-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:e59399dda559688461762800d7fb34d9e8a6a7444fd76ec33220a926c8be1516"}, - {file = "yarl-1.8.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:d617c241c8c3ad5c4e78a08429fa49e4b04bedfc507b34b4d8dceb83b4af3588"}, - {file = "yarl-1.8.2-cp39-cp39-win32.whl", hash = "sha256:cb6d48d80a41f68de41212f3dfd1a9d9898d7841c8f7ce6696cf2fd9cb57ef83"}, - {file = "yarl-1.8.2-cp39-cp39-win_amd64.whl", hash = "sha256:6604711362f2dbf7160df21c416f81fac0de6dbcf0b5445a2ef25478ecc4c778"}, - {file = "yarl-1.8.2.tar.gz", hash = "sha256:49d43402c6e3013ad0978602bf6bf5328535c48d192304b91b97a3c6790b1562"}, -] - -[package.dependencies] -idna = ">=2.0" -multidict = ">=4.0" - [metadata] lock-version = "2.0" python-versions = "^3.10" diff --git a/docs/pyproject.toml b/docs/pyproject.toml index a768f043..da55d67d 100644 --- a/docs/pyproject.toml +++ b/docs/pyproject.toml @@ -7,7 +7,6 @@ name = "docs" version = "0.1.0" description = "" authors = ["Niraj "] -readme = "README.md" [tool.poetry.dependencies] python = "^3.10" @@ -22,5 +21,4 @@ polywrap-client-config-builder = { path = "../packages/polywrap-client-config-bu [tool.poetry.group.dev.dependencies] sphinx = "^6.1.3" -sphinx-rtd-theme = "^1.2.0" - +sphinx-rtd-theme = "^1.2.0" \ No newline at end of file diff --git a/docs/source/index.rst b/docs/source/index.rst index 807e75a0..e8923b1f 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -7,7 +7,7 @@ Welcome to polywrap-client's documentation! =========================================== .. toctree:: - :maxdepth: 2 + :maxdepth: 1 :caption: Contents: polywrap-msgpack/modules.rst @@ -20,7 +20,6 @@ Welcome to polywrap-client's documentation! polywrap-client-config-builder/modules.rst - Indices and tables ================== diff --git a/docs/source/polywrap-core/polywrap_core.types.invoke_args.rst b/docs/source/polywrap-core/polywrap_core.types.invoke_args.rst deleted file mode 100644 index 60dd0555..00000000 --- a/docs/source/polywrap-core/polywrap_core.types.invoke_args.rst +++ /dev/null @@ -1,7 +0,0 @@ -polywrap\_core.types.invoke\_args module -======================================== - -.. automodule:: polywrap_core.types.invoke_args - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/polywrap-core/polywrap_core.types.invoke_options.rst b/docs/source/polywrap-core/polywrap_core.types.invoke_options.rst new file mode 100644 index 00000000..0b1f0cc6 --- /dev/null +++ b/docs/source/polywrap-core/polywrap_core.types.invoke_options.rst @@ -0,0 +1,7 @@ +polywrap\_core.types.invoke\_options module +=========================================== + +.. automodule:: polywrap_core.types.invoke_options + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/polywrap-core/polywrap_core.types.options.file_options.rst b/docs/source/polywrap-core/polywrap_core.types.options.file_options.rst deleted file mode 100644 index 129a7ba2..00000000 --- a/docs/source/polywrap-core/polywrap_core.types.options.file_options.rst +++ /dev/null @@ -1,7 +0,0 @@ -polywrap\_core.types.options.file\_options module -================================================= - -.. automodule:: polywrap_core.types.options.file_options - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/polywrap-core/polywrap_core.types.options.invoke_options.rst b/docs/source/polywrap-core/polywrap_core.types.options.invoke_options.rst deleted file mode 100644 index b625e1c6..00000000 --- a/docs/source/polywrap-core/polywrap_core.types.options.invoke_options.rst +++ /dev/null @@ -1,7 +0,0 @@ -polywrap\_core.types.options.invoke\_options module -=================================================== - -.. automodule:: polywrap_core.types.options.invoke_options - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/polywrap-core/polywrap_core.types.options.manifest_options.rst b/docs/source/polywrap-core/polywrap_core.types.options.manifest_options.rst deleted file mode 100644 index 5919f120..00000000 --- a/docs/source/polywrap-core/polywrap_core.types.options.manifest_options.rst +++ /dev/null @@ -1,7 +0,0 @@ -polywrap\_core.types.options.manifest\_options module -===================================================== - -.. automodule:: polywrap_core.types.options.manifest_options - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/polywrap-core/polywrap_core.types.options.rst b/docs/source/polywrap-core/polywrap_core.types.options.rst deleted file mode 100644 index b23ed796..00000000 --- a/docs/source/polywrap-core/polywrap_core.types.options.rst +++ /dev/null @@ -1,21 +0,0 @@ -polywrap\_core.types.options package -==================================== - -Submodules ----------- - -.. toctree:: - :maxdepth: 4 - - polywrap_core.types.options.file_options - polywrap_core.types.options.invoke_options - polywrap_core.types.options.manifest_options - polywrap_core.types.options.uri_resolver_options - -Module contents ---------------- - -.. automodule:: polywrap_core.types.options - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/polywrap-core/polywrap_core.types.options.uri_resolver_options.rst b/docs/source/polywrap-core/polywrap_core.types.options.uri_resolver_options.rst deleted file mode 100644 index 3ee58897..00000000 --- a/docs/source/polywrap-core/polywrap_core.types.options.uri_resolver_options.rst +++ /dev/null @@ -1,7 +0,0 @@ -polywrap\_core.types.options.uri\_resolver\_options module -========================================================== - -.. automodule:: polywrap_core.types.options.uri_resolver_options - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/polywrap-core/polywrap_core.types.rst b/docs/source/polywrap-core/polywrap_core.types.rst index ceaf51db..b17083c9 100644 --- a/docs/source/polywrap-core/polywrap_core.types.rst +++ b/docs/source/polywrap-core/polywrap_core.types.rst @@ -1,14 +1,6 @@ polywrap\_core.types package ============================ -Subpackages ------------ - -.. toctree:: - :maxdepth: 4 - - polywrap_core.types.options - Submodules ---------- @@ -17,15 +9,13 @@ Submodules polywrap_core.types.client polywrap_core.types.config - polywrap_core.types.env polywrap_core.types.errors polywrap_core.types.file_reader polywrap_core.types.invocable - polywrap_core.types.invoke_args + polywrap_core.types.invoke_options polywrap_core.types.invoker polywrap_core.types.invoker_client polywrap_core.types.uri - polywrap_core.types.uri_like polywrap_core.types.uri_package polywrap_core.types.uri_package_wrapper polywrap_core.types.uri_resolution_context diff --git a/docs/source/polywrap-core/polywrap_core.types.uri_like.rst b/docs/source/polywrap-core/polywrap_core.types.uri_like.rst deleted file mode 100644 index bef58a58..00000000 --- a/docs/source/polywrap-core/polywrap_core.types.uri_like.rst +++ /dev/null @@ -1,7 +0,0 @@ -polywrap\_core.types.uri\_like module -===================================== - -.. automodule:: polywrap_core.types.uri_like - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/polywrap-core/polywrap_core.utils.build_clean_uri_history.rst b/docs/source/polywrap-core/polywrap_core.utils.build_clean_uri_history.rst new file mode 100644 index 00000000..c37becef --- /dev/null +++ b/docs/source/polywrap-core/polywrap_core.utils.build_clean_uri_history.rst @@ -0,0 +1,7 @@ +polywrap\_core.utils.build\_clean\_uri\_history module +====================================================== + +.. automodule:: polywrap_core.utils.build_clean_uri_history + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/polywrap-core/polywrap_core.utils.get_env_from_resolution_path.rst b/docs/source/polywrap-core/polywrap_core.utils.get_env_from_resolution_path.rst new file mode 100644 index 00000000..7ef6d385 --- /dev/null +++ b/docs/source/polywrap-core/polywrap_core.utils.get_env_from_resolution_path.rst @@ -0,0 +1,7 @@ +polywrap\_core.utils.get\_env\_from\_resolution\_path module +============================================================ + +.. automodule:: polywrap_core.utils.get_env_from_resolution_path + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/polywrap-core/polywrap_core.utils.get_implementations.rst b/docs/source/polywrap-core/polywrap_core.utils.get_implementations.rst new file mode 100644 index 00000000..debcead7 --- /dev/null +++ b/docs/source/polywrap-core/polywrap_core.utils.get_implementations.rst @@ -0,0 +1,7 @@ +polywrap\_core.utils.get\_implementations module +================================================ + +.. automodule:: polywrap_core.utils.get_implementations + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/polywrap-core/polywrap_core.utils.instance_of.rst b/docs/source/polywrap-core/polywrap_core.utils.instance_of.rst deleted file mode 100644 index e742eb66..00000000 --- a/docs/source/polywrap-core/polywrap_core.utils.instance_of.rst +++ /dev/null @@ -1,7 +0,0 @@ -polywrap\_core.utils.instance\_of module -======================================== - -.. automodule:: polywrap_core.utils.instance_of - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/polywrap-core/polywrap_core.utils.maybe_async.rst b/docs/source/polywrap-core/polywrap_core.utils.maybe_async.rst deleted file mode 100644 index b0bb88c0..00000000 --- a/docs/source/polywrap-core/polywrap_core.utils.maybe_async.rst +++ /dev/null @@ -1,7 +0,0 @@ -polywrap\_core.utils.maybe\_async module -======================================== - -.. automodule:: polywrap_core.utils.maybe_async - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/polywrap-core/polywrap_core.utils.rst b/docs/source/polywrap-core/polywrap_core.utils.rst index 32d08123..803ce5ec 100644 --- a/docs/source/polywrap-core/polywrap_core.utils.rst +++ b/docs/source/polywrap-core/polywrap_core.utils.rst @@ -7,8 +7,9 @@ Submodules .. toctree:: :maxdepth: 4 - polywrap_core.utils.instance_of - polywrap_core.utils.maybe_async + polywrap_core.utils.build_clean_uri_history + polywrap_core.utils.get_env_from_resolution_path + polywrap_core.utils.get_implementations Module contents --------------- diff --git a/docs/source/polywrap-manifest/polywrap_manifest.errors.rst b/docs/source/polywrap-manifest/polywrap_manifest.errors.rst new file mode 100644 index 00000000..6e4530c3 --- /dev/null +++ b/docs/source/polywrap-manifest/polywrap_manifest.errors.rst @@ -0,0 +1,7 @@ +polywrap\_manifest.errors module +================================ + +.. automodule:: polywrap_manifest.errors + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/polywrap-manifest/polywrap_manifest.rst b/docs/source/polywrap-manifest/polywrap_manifest.rst index 3e16dae8..0e754aa4 100644 --- a/docs/source/polywrap-manifest/polywrap_manifest.rst +++ b/docs/source/polywrap-manifest/polywrap_manifest.rst @@ -8,6 +8,7 @@ Submodules :maxdepth: 4 polywrap_manifest.deserialize + polywrap_manifest.errors polywrap_manifest.manifest polywrap_manifest.wrap_0_1 diff --git a/docs/source/polywrap-core/polywrap_core.types.env.rst b/docs/source/polywrap-msgpack/polywrap_msgpack.errors.rst similarity index 54% rename from docs/source/polywrap-core/polywrap_core.types.env.rst rename to docs/source/polywrap-msgpack/polywrap_msgpack.errors.rst index 0b30f8c2..e96e074b 100644 --- a/docs/source/polywrap-core/polywrap_core.types.env.rst +++ b/docs/source/polywrap-msgpack/polywrap_msgpack.errors.rst @@ -1,7 +1,7 @@ -polywrap\_core.types.env module +polywrap\_msgpack.errors module =============================== -.. automodule:: polywrap_core.types.env +.. automodule:: polywrap_msgpack.errors :members: :undoc-members: :show-inheritance: diff --git a/docs/source/polywrap-msgpack/polywrap_msgpack.rst b/docs/source/polywrap-msgpack/polywrap_msgpack.rst index 7e00f143..56cce48c 100644 --- a/docs/source/polywrap-msgpack/polywrap_msgpack.rst +++ b/docs/source/polywrap-msgpack/polywrap_msgpack.rst @@ -17,6 +17,7 @@ Submodules polywrap_msgpack.decoder polywrap_msgpack.encoder + polywrap_msgpack.errors polywrap_msgpack.sanitize Module contents diff --git a/docs/source/polywrap-plugin/polywrap_plugin.resolution_context_override_client.rst b/docs/source/polywrap-plugin/polywrap_plugin.resolution_context_override_client.rst new file mode 100644 index 00000000..a3d865bc --- /dev/null +++ b/docs/source/polywrap-plugin/polywrap_plugin.resolution_context_override_client.rst @@ -0,0 +1,7 @@ +polywrap\_plugin.resolution\_context\_override\_client module +============================================================= + +.. automodule:: polywrap_plugin.resolution_context_override_client + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/polywrap-plugin/polywrap_plugin.rst b/docs/source/polywrap-plugin/polywrap_plugin.rst index 211a3be5..2b94eb4c 100644 --- a/docs/source/polywrap-plugin/polywrap_plugin.rst +++ b/docs/source/polywrap-plugin/polywrap_plugin.rst @@ -9,6 +9,7 @@ Submodules polywrap_plugin.module polywrap_plugin.package + polywrap_plugin.resolution_context_override_client polywrap_plugin.wrapper Module contents diff --git a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.aggregator.rst b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.aggregator.rst index ae02c87c..fe3e9fa9 100644 --- a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.aggregator.rst +++ b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.aggregator.rst @@ -8,6 +8,7 @@ Submodules :maxdepth: 4 polywrap_uri_resolvers.resolvers.aggregator.uri_resolver_aggregator + polywrap_uri_resolvers.resolvers.aggregator.uri_resolver_aggregator_base Module contents --------------- diff --git a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.aggregator.uri_resolver_aggregator_base.rst b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.aggregator.uri_resolver_aggregator_base.rst new file mode 100644 index 00000000..c960ea16 --- /dev/null +++ b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.aggregator.uri_resolver_aggregator_base.rst @@ -0,0 +1,7 @@ +polywrap\_uri\_resolvers.resolvers.aggregator.uri\_resolver\_aggregator\_base module +==================================================================================== + +.. automodule:: polywrap_uri_resolvers.resolvers.aggregator.uri_resolver_aggregator_base + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.cache.cache_resolver.rst b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.cache.cache_resolver.rst deleted file mode 100644 index a094efff..00000000 --- a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.cache.cache_resolver.rst +++ /dev/null @@ -1,7 +0,0 @@ -polywrap\_uri\_resolvers.resolvers.cache.cache\_resolver module -=============================================================== - -.. automodule:: polywrap_uri_resolvers.resolvers.cache.cache_resolver - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.cache.resolution_result_cache_resolver.rst b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.cache.resolution_result_cache_resolver.rst new file mode 100644 index 00000000..741007da --- /dev/null +++ b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.cache.resolution_result_cache_resolver.rst @@ -0,0 +1,7 @@ +polywrap\_uri\_resolvers.resolvers.cache.resolution\_result\_cache\_resolver module +=================================================================================== + +.. automodule:: polywrap_uri_resolvers.resolvers.cache.resolution_result_cache_resolver + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.cache.rst b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.cache.rst index fd8a3c05..ddabb0e6 100644 --- a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.cache.rst +++ b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.cache.rst @@ -7,8 +7,7 @@ Submodules .. toctree:: :maxdepth: 4 - polywrap_uri_resolvers.resolvers.cache.cache_resolver - polywrap_uri_resolvers.resolvers.cache.request_synchronizer_resolver + polywrap_uri_resolvers.resolvers.cache.resolution_result_cache_resolver Module contents --------------- diff --git a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.cache.request_synchronizer_resolver.rst b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.legacy.package_to_wrapper_resolver.rst similarity index 50% rename from docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.cache.request_synchronizer_resolver.rst rename to docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.legacy.package_to_wrapper_resolver.rst index 9aa31026..87287791 100644 --- a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.cache.request_synchronizer_resolver.rst +++ b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.legacy.package_to_wrapper_resolver.rst @@ -1,7 +1,7 @@ -polywrap\_uri\_resolvers.resolvers.cache.request\_synchronizer\_resolver module +polywrap\_uri\_resolvers.resolvers.legacy.package\_to\_wrapper\_resolver module =============================================================================== -.. automodule:: polywrap_uri_resolvers.resolvers.cache.request_synchronizer_resolver +.. automodule:: polywrap_uri_resolvers.resolvers.legacy.package_to_wrapper_resolver :members: :undoc-members: :show-inheritance: diff --git a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.legacy.rst b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.legacy.rst index 6783e920..6635f853 100644 --- a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.legacy.rst +++ b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.legacy.rst @@ -1,6 +1,14 @@ polywrap\_uri\_resolvers.resolvers.legacy package ================================================= +Subpackages +----------- + +.. toctree:: + :maxdepth: 4 + + polywrap_uri_resolvers.resolvers.legacy.wrapper_cache + Submodules ---------- @@ -9,7 +17,9 @@ Submodules polywrap_uri_resolvers.resolvers.legacy.base_resolver polywrap_uri_resolvers.resolvers.legacy.fs_resolver + polywrap_uri_resolvers.resolvers.legacy.package_to_wrapper_resolver polywrap_uri_resolvers.resolvers.legacy.redirect_resolver + polywrap_uri_resolvers.resolvers.legacy.wrapper_cache_resolver Module contents --------------- diff --git a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.legacy.wrapper_cache.in_memory_wrapper_cache.rst b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.legacy.wrapper_cache.in_memory_wrapper_cache.rst new file mode 100644 index 00000000..00418271 --- /dev/null +++ b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.legacy.wrapper_cache.in_memory_wrapper_cache.rst @@ -0,0 +1,7 @@ +polywrap\_uri\_resolvers.resolvers.legacy.wrapper\_cache.in\_memory\_wrapper\_cache module +========================================================================================== + +.. automodule:: polywrap_uri_resolvers.resolvers.legacy.wrapper_cache.in_memory_wrapper_cache + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.legacy.wrapper_cache.rst b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.legacy.wrapper_cache.rst new file mode 100644 index 00000000..f2483595 --- /dev/null +++ b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.legacy.wrapper_cache.rst @@ -0,0 +1,19 @@ +polywrap\_uri\_resolvers.resolvers.legacy.wrapper\_cache package +================================================================ + +Submodules +---------- + +.. toctree:: + :maxdepth: 4 + + polywrap_uri_resolvers.resolvers.legacy.wrapper_cache.in_memory_wrapper_cache + polywrap_uri_resolvers.resolvers.legacy.wrapper_cache.wrapper_cache + +Module contents +--------------- + +.. automodule:: polywrap_uri_resolvers.resolvers.legacy.wrapper_cache + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.legacy.wrapper_cache.wrapper_cache.rst b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.legacy.wrapper_cache.wrapper_cache.rst new file mode 100644 index 00000000..50295264 --- /dev/null +++ b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.legacy.wrapper_cache.wrapper_cache.rst @@ -0,0 +1,7 @@ +polywrap\_uri\_resolvers.resolvers.legacy.wrapper\_cache.wrapper\_cache module +============================================================================== + +.. automodule:: polywrap_uri_resolvers.resolvers.legacy.wrapper_cache.wrapper_cache + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.legacy.wrapper_cache_resolver.rst b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.legacy.wrapper_cache_resolver.rst new file mode 100644 index 00000000..3b8f9000 --- /dev/null +++ b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.legacy.wrapper_cache_resolver.rst @@ -0,0 +1,7 @@ +polywrap\_uri\_resolvers.resolvers.legacy.wrapper\_cache\_resolver module +========================================================================= + +.. automodule:: polywrap_uri_resolvers.resolvers.legacy.wrapper_cache_resolver + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.package.package_to_wrapper_resolver.rst b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.package.package_to_wrapper_resolver.rst deleted file mode 100644 index 26c46951..00000000 --- a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.package.package_to_wrapper_resolver.rst +++ /dev/null @@ -1,7 +0,0 @@ -polywrap\_uri\_resolvers.resolvers.package.package\_to\_wrapper\_resolver module -================================================================================ - -.. automodule:: polywrap_uri_resolvers.resolvers.package.package_to_wrapper_resolver - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.package.rst b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.package.rst index 028fbabd..0355c124 100644 --- a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.package.rst +++ b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.resolvers.package.rst @@ -8,7 +8,6 @@ Submodules :maxdepth: 4 polywrap_uri_resolvers.resolvers.package.package_resolver - polywrap_uri_resolvers.resolvers.package.package_to_wrapper_resolver Module contents --------------- diff --git a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.rst b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.rst index 325c2026..0681ef4c 100644 --- a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.rst +++ b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.rst @@ -9,7 +9,6 @@ Subpackages polywrap_uri_resolvers.resolvers polywrap_uri_resolvers.types - polywrap_uri_resolvers.utils Submodules ---------- diff --git a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.types.cache.in_memory_wrapper_cache.rst b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.types.cache.in_memory_wrapper_cache.rst deleted file mode 100644 index 68ce2d79..00000000 --- a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.types.cache.in_memory_wrapper_cache.rst +++ /dev/null @@ -1,7 +0,0 @@ -polywrap\_uri\_resolvers.types.cache.in\_memory\_wrapper\_cache module -====================================================================== - -.. automodule:: polywrap_uri_resolvers.types.cache.in_memory_wrapper_cache - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.types.cache.resolution_result_cache.in_memory_resolution_result_cache.rst b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.types.cache.resolution_result_cache.in_memory_resolution_result_cache.rst new file mode 100644 index 00000000..62251c5d --- /dev/null +++ b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.types.cache.resolution_result_cache.in_memory_resolution_result_cache.rst @@ -0,0 +1,7 @@ +polywrap\_uri\_resolvers.types.cache.resolution\_result\_cache.in\_memory\_resolution\_result\_cache module +=========================================================================================================== + +.. automodule:: polywrap_uri_resolvers.types.cache.resolution_result_cache.in_memory_resolution_result_cache + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.types.cache.resolution_result_cache.resolution_result_cache.rst b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.types.cache.resolution_result_cache.resolution_result_cache.rst new file mode 100644 index 00000000..fbe1f990 --- /dev/null +++ b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.types.cache.resolution_result_cache.resolution_result_cache.rst @@ -0,0 +1,7 @@ +polywrap\_uri\_resolvers.types.cache.resolution\_result\_cache.resolution\_result\_cache module +=============================================================================================== + +.. automodule:: polywrap_uri_resolvers.types.cache.resolution_result_cache.resolution_result_cache + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.types.cache.resolution_result_cache.rst b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.types.cache.resolution_result_cache.rst new file mode 100644 index 00000000..5fc52a7c --- /dev/null +++ b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.types.cache.resolution_result_cache.rst @@ -0,0 +1,19 @@ +polywrap\_uri\_resolvers.types.cache.resolution\_result\_cache package +====================================================================== + +Submodules +---------- + +.. toctree:: + :maxdepth: 4 + + polywrap_uri_resolvers.types.cache.resolution_result_cache.in_memory_resolution_result_cache + polywrap_uri_resolvers.types.cache.resolution_result_cache.resolution_result_cache + +Module contents +--------------- + +.. automodule:: polywrap_uri_resolvers.types.cache.resolution_result_cache + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.types.cache.rst b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.types.cache.rst index ebc84ccd..10d242c6 100644 --- a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.types.cache.rst +++ b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.types.cache.rst @@ -1,14 +1,13 @@ polywrap\_uri\_resolvers.types.cache package ============================================ -Submodules ----------- +Subpackages +----------- .. toctree:: :maxdepth: 4 - polywrap_uri_resolvers.types.cache.in_memory_wrapper_cache - polywrap_uri_resolvers.types.cache.wrapper_cache + polywrap_uri_resolvers.types.cache.resolution_result_cache Module contents --------------- diff --git a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.types.cache.wrapper_cache.rst b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.types.cache.wrapper_cache.rst deleted file mode 100644 index 552de53a..00000000 --- a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.types.cache.wrapper_cache.rst +++ /dev/null @@ -1,7 +0,0 @@ -polywrap\_uri\_resolvers.types.cache.wrapper\_cache module -========================================================== - -.. automodule:: polywrap_uri_resolvers.types.cache.wrapper_cache - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.types.rst b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.types.rst index 5d186106..35b270a8 100644 --- a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.types.rst +++ b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.types.rst @@ -8,7 +8,6 @@ Subpackages :maxdepth: 4 polywrap_uri_resolvers.types.cache - polywrap_uri_resolvers.types.uri_resolution_context Submodules ---------- @@ -17,8 +16,6 @@ Submodules :maxdepth: 4 polywrap_uri_resolvers.types.static_resolver_like - polywrap_uri_resolvers.types.uri_redirect - polywrap_uri_resolvers.types.uri_resolver_like Module contents --------------- diff --git a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.types.uri_redirect.rst b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.types.uri_redirect.rst deleted file mode 100644 index ad6f2d20..00000000 --- a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.types.uri_redirect.rst +++ /dev/null @@ -1,7 +0,0 @@ -polywrap\_uri\_resolvers.types.uri\_redirect module -=================================================== - -.. automodule:: polywrap_uri_resolvers.types.uri_redirect - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.types.uri_resolution_context.rst b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.types.uri_resolution_context.rst deleted file mode 100644 index 413cf7e9..00000000 --- a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.types.uri_resolution_context.rst +++ /dev/null @@ -1,19 +0,0 @@ -polywrap\_uri\_resolvers.types.uri\_resolution\_context package -=============================================================== - -Submodules ----------- - -.. toctree:: - :maxdepth: 4 - - polywrap_uri_resolvers.types.uri_resolution_context.uri_resolution_context - polywrap_uri_resolvers.types.uri_resolution_context.uri_resolution_step - -Module contents ---------------- - -.. automodule:: polywrap_uri_resolvers.types.uri_resolution_context - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.types.uri_resolution_context.uri_resolution_context.rst b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.types.uri_resolution_context.uri_resolution_context.rst deleted file mode 100644 index 6b5887ce..00000000 --- a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.types.uri_resolution_context.uri_resolution_context.rst +++ /dev/null @@ -1,7 +0,0 @@ -polywrap\_uri\_resolvers.types.uri\_resolution\_context.uri\_resolution\_context module -======================================================================================= - -.. automodule:: polywrap_uri_resolvers.types.uri_resolution_context.uri_resolution_context - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.types.uri_resolution_context.uri_resolution_step.rst b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.types.uri_resolution_context.uri_resolution_step.rst deleted file mode 100644 index b6c68a07..00000000 --- a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.types.uri_resolution_context.uri_resolution_step.rst +++ /dev/null @@ -1,7 +0,0 @@ -polywrap\_uri\_resolvers.types.uri\_resolution\_context.uri\_resolution\_step module -==================================================================================== - -.. automodule:: polywrap_uri_resolvers.types.uri_resolution_context.uri_resolution_step - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.types.uri_resolver_like.rst b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.types.uri_resolver_like.rst deleted file mode 100644 index e5c0fcf0..00000000 --- a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.types.uri_resolver_like.rst +++ /dev/null @@ -1,7 +0,0 @@ -polywrap\_uri\_resolvers.types.uri\_resolver\_like module -========================================================= - -.. automodule:: polywrap_uri_resolvers.types.uri_resolver_like - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.utils.build_clean_uri_history.rst b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.utils.build_clean_uri_history.rst deleted file mode 100644 index 0d210b38..00000000 --- a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.utils.build_clean_uri_history.rst +++ /dev/null @@ -1,7 +0,0 @@ -polywrap\_uri\_resolvers.utils.build\_clean\_uri\_history module -================================================================ - -.. automodule:: polywrap_uri_resolvers.utils.build_clean_uri_history - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.utils.get_env_from_uri_history.rst b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.utils.get_env_from_uri_history.rst deleted file mode 100644 index 276e1cba..00000000 --- a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.utils.get_env_from_uri_history.rst +++ /dev/null @@ -1,7 +0,0 @@ -polywrap\_uri\_resolvers.utils.get\_env\_from\_uri\_history module -================================================================== - -.. automodule:: polywrap_uri_resolvers.utils.get_env_from_uri_history - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.utils.get_uri_resolution_path.rst b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.utils.get_uri_resolution_path.rst deleted file mode 100644 index 1e90a114..00000000 --- a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.utils.get_uri_resolution_path.rst +++ /dev/null @@ -1,7 +0,0 @@ -polywrap\_uri\_resolvers.utils.get\_uri\_resolution\_path module -================================================================ - -.. automodule:: polywrap_uri_resolvers.utils.get_uri_resolution_path - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.utils.rst b/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.utils.rst deleted file mode 100644 index bedd0f05..00000000 --- a/docs/source/polywrap-uri-resolvers/polywrap_uri_resolvers.utils.rst +++ /dev/null @@ -1,20 +0,0 @@ -polywrap\_uri\_resolvers.utils package -====================================== - -Submodules ----------- - -.. toctree:: - :maxdepth: 4 - - polywrap_uri_resolvers.utils.build_clean_uri_history - polywrap_uri_resolvers.utils.get_env_from_uri_history - polywrap_uri_resolvers.utils.get_uri_resolution_path - -Module contents ---------------- - -.. automodule:: polywrap_uri_resolvers.utils - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/polywrap-wasm/polywrap_wasm.imports.rst b/docs/source/polywrap-wasm/polywrap_wasm.imports.rst index 5e814e8d..535cc5f0 100644 --- a/docs/source/polywrap-wasm/polywrap_wasm.imports.rst +++ b/docs/source/polywrap-wasm/polywrap_wasm.imports.rst @@ -8,7 +8,6 @@ Subpackages :maxdepth: 4 polywrap_wasm.imports.types - polywrap_wasm.imports.utils Submodules ---------- diff --git a/docs/source/polywrap-wasm/polywrap_wasm.imports.utils.rst b/docs/source/polywrap-wasm/polywrap_wasm.imports.utils.rst deleted file mode 100644 index 7a040966..00000000 --- a/docs/source/polywrap-wasm/polywrap_wasm.imports.utils.rst +++ /dev/null @@ -1,18 +0,0 @@ -polywrap\_wasm.imports.utils package -==================================== - -Submodules ----------- - -.. toctree:: - :maxdepth: 4 - - polywrap_wasm.imports.utils.unsync_invoke - -Module contents ---------------- - -.. automodule:: polywrap_wasm.imports.utils - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/polywrap-wasm/polywrap_wasm.imports.utils.unsync_invoke.rst b/docs/source/polywrap-wasm/polywrap_wasm.imports.utils.unsync_invoke.rst deleted file mode 100644 index 34db2358..00000000 --- a/docs/source/polywrap-wasm/polywrap_wasm.imports.utils.unsync_invoke.rst +++ /dev/null @@ -1,7 +0,0 @@ -polywrap\_wasm.imports.utils.unsync\_invoke module -================================================== - -.. automodule:: polywrap_wasm.imports.utils.unsync_invoke - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/polywrap-wasm/polywrap_wasm.types.invoke_result.rst b/docs/source/polywrap-wasm/polywrap_wasm.types.invoke_result.rst new file mode 100644 index 00000000..07b07c8b --- /dev/null +++ b/docs/source/polywrap-wasm/polywrap_wasm.types.invoke_result.rst @@ -0,0 +1,7 @@ +polywrap\_wasm.types.invoke\_result module +========================================== + +.. automodule:: polywrap_wasm.types.invoke_result + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/polywrap-wasm/polywrap_wasm.types.rst b/docs/source/polywrap-wasm/polywrap_wasm.types.rst index 0e2faa7a..842a37de 100644 --- a/docs/source/polywrap-wasm/polywrap_wasm.types.rst +++ b/docs/source/polywrap-wasm/polywrap_wasm.types.rst @@ -7,7 +7,9 @@ Submodules .. toctree:: :maxdepth: 4 + polywrap_wasm.types.invoke_result polywrap_wasm.types.state + polywrap_wasm.types.wasm_invoke_options Module contents --------------- diff --git a/docs/source/polywrap-wasm/polywrap_wasm.types.wasm_invoke_options.rst b/docs/source/polywrap-wasm/polywrap_wasm.types.wasm_invoke_options.rst new file mode 100644 index 00000000..d7504249 --- /dev/null +++ b/docs/source/polywrap-wasm/polywrap_wasm.types.wasm_invoke_options.rst @@ -0,0 +1,7 @@ +polywrap\_wasm.types.wasm\_invoke\_options module +================================================= + +.. automodule:: polywrap_wasm.types.wasm_invoke_options + :members: + :undoc-members: + :show-inheritance: diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/configures/base_configure.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/configures/base_configure.py index 0dfcb7e1..2cd2109f 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/configures/base_configure.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/configures/base_configure.py @@ -1,15 +1,11 @@ """This module contains the base configure class for the client config builder.""" -from abc import ABC +from typing import cast from ..types import BuilderConfig, ClientConfigBuilder -class BaseConfigure(ClientConfigBuilder, ABC): - """BaseConfigure is the base configure class for the client config builder. - - Attributes: - config (BuilderConfig): The internal configuration. - """ +class BaseConfigure: + """BaseConfigure is the base configure class for the client config builder.""" config: BuilderConfig @@ -27,4 +23,4 @@ def add(self, config: BuilderConfig) -> ClientConfigBuilder: self.config.wrappers.update(config.wrappers) if config.packages: self.config.packages.update(config.packages) - return self + return cast(ClientConfigBuilder, self) diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/configures/env_configure.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/configures/env_configure.py index 6157c3c0..dc97a60f 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/configures/env_configure.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/configures/env_configure.py @@ -1,5 +1,4 @@ """This module contains the env configure class for the client config builder.""" -from abc import ABC from typing import Any, Dict, List, Union, cast from polywrap_core import Uri @@ -7,7 +6,7 @@ from ..types import BuilderConfig, ClientConfigBuilder -class EnvConfigure(ClientConfigBuilder, ABC): +class EnvConfigure: """Allows configuring the environment variables.""" config: BuilderConfig @@ -23,12 +22,12 @@ def get_envs(self) -> Dict[Uri, Any]: def set_env(self, uri: Uri, env: Any) -> ClientConfigBuilder: """Set the env by uri in the builder's config, overiding any existing values.""" self.config.envs[uri] = env - return self + return cast(ClientConfigBuilder, self) def set_envs(self, uri_envs: Dict[Uri, Any]) -> ClientConfigBuilder: """Set the envs in the builder's config, overiding any existing values.""" self.config.envs.update(uri_envs) - return self + return cast(ClientConfigBuilder, self) def add_env(self, uri: Uri, env: Any) -> ClientConfigBuilder: """Add an env for the given uri. @@ -40,24 +39,24 @@ def add_env(self, uri: Uri, env: Any) -> ClientConfigBuilder: self.config.envs[uri] = new_env else: self.config.envs[uri] = env - return self + return cast(ClientConfigBuilder, self) def add_envs(self, uri_envs: Dict[Uri, Any]) -> ClientConfigBuilder: """Add a list of envs to the builder's config.""" for uri, env in uri_envs.items(): self.add_env(uri, env) - return self + return cast(ClientConfigBuilder, self) def remove_env(self, uri: Uri) -> ClientConfigBuilder: """Remove the env for the given uri.""" self.config.envs.pop(uri, None) - return self + return cast(ClientConfigBuilder, self) def remove_envs(self, uris: List[Uri]) -> ClientConfigBuilder: """Remove the envs for the given uris.""" for uri in uris: self.remove_env(uri) - return self + return cast(ClientConfigBuilder, self) @staticmethod def _merge_envs(env1: Dict[str, Any], env2: Dict[str, Any]) -> Dict[str, Any]: diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/configures/interface_configure.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/configures/interface_configure.py index 7fb81ebb..a3087b54 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/configures/interface_configure.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/configures/interface_configure.py @@ -1,13 +1,12 @@ """This module contains the interface configure class for the client config builder.""" -from abc import ABC -from typing import Dict, List, Union +from typing import Dict, List, Union, cast from polywrap_core import Uri from ..types import BuilderConfig, ClientConfigBuilder -class InterfaceConfigure(ClientConfigBuilder, ABC): +class InterfaceConfigure: """Allows configuring the interface-implementations.""" config: BuilderConfig @@ -32,7 +31,7 @@ def add_interface_implementations( self.config.interfaces[interface_uri].append(implementation_uri) else: self.config.interfaces[interface_uri] = implementations_uris - return self + return cast(ClientConfigBuilder, self) def remove_interface_implementations( self, interface_uri: Uri, implementations_uris: List[Uri] @@ -43,9 +42,9 @@ def remove_interface_implementations( for uri in self.config.interfaces[interface_uri] if uri not in implementations_uris ] - return self + return cast(ClientConfigBuilder, self) def remove_interface(self, interface_uri: Uri) -> ClientConfigBuilder: """Remove the interface for the given uri.""" self.config.interfaces.pop(interface_uri, None) - return self + return cast(ClientConfigBuilder, self) diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/configures/package_configure.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/configures/package_configure.py index e8de2f14..1568538a 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/configures/package_configure.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/configures/package_configure.py @@ -1,13 +1,12 @@ """This module contains the package configure class for the client config builder.""" -from abc import ABC -from typing import Dict, List, Union +from typing import Dict, List, Union, cast from polywrap_core import Uri, WrapPackage from ..types import BuilderConfig, ClientConfigBuilder -class PackageConfigure(ClientConfigBuilder, ABC): +class PackageConfigure: """Allows configuring the WRAP packages.""" config: BuilderConfig @@ -23,20 +22,20 @@ def get_packages(self) -> Dict[Uri, WrapPackage]: def set_package(self, uri: Uri, package: WrapPackage) -> ClientConfigBuilder: """Set the package by uri in the builder's config, overiding any existing values.""" self.config.packages[uri] = package - return self + return cast(ClientConfigBuilder, self) def set_packages(self, uri_packages: Dict[Uri, WrapPackage]) -> ClientConfigBuilder: """Set the packages in the builder's config, overiding any existing values.""" self.config.packages.update(uri_packages) - return self + return cast(ClientConfigBuilder, self) def remove_package(self, uri: Uri) -> ClientConfigBuilder: """Remove the package for the given uri.""" self.config.packages.pop(uri, None) - return self + return cast(ClientConfigBuilder, self) def remove_packages(self, uris: List[Uri]) -> ClientConfigBuilder: """Remove the packages for the given uris.""" for uri in uris: self.remove_package(uri) - return self + return cast(ClientConfigBuilder, self) diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/configures/redirect_configure.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/configures/redirect_configure.py index 0b2b5aff..dd5f989f 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/configures/redirect_configure.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/configures/redirect_configure.py @@ -1,13 +1,12 @@ """This module contains the redirect configure class for the client config builder.""" -from abc import ABC -from typing import Dict, List, Union +from typing import Dict, List, Union, cast from polywrap_core import Uri from ..types import BuilderConfig, ClientConfigBuilder -class RedirectConfigure(ClientConfigBuilder, ABC): +class RedirectConfigure: """Allows configuring the URI redirects.""" config: BuilderConfig @@ -24,20 +23,20 @@ def set_redirect(self, from_uri: Uri, to_uri: Uri) -> ClientConfigBuilder: """Set the redirect from a URI to another URI in the builder's config,\ overiding any existing values.""" self.config.redirects[from_uri] = to_uri - return self + return cast(ClientConfigBuilder, self) def set_redirects(self, uri_redirects: Dict[Uri, Uri]) -> ClientConfigBuilder: """Set the redirects in the builder's config, overiding any existing values.""" self.config.redirects.update(uri_redirects) - return self + return cast(ClientConfigBuilder, self) def remove_redirect(self, uri: Uri) -> ClientConfigBuilder: """Remove the redirect for the given uri.""" self.config.redirects.pop(uri, None) - return self + return cast(ClientConfigBuilder, self) def remove_redirects(self, uris: List[Uri]) -> ClientConfigBuilder: """Remove the redirects for the given uris.""" for uri in uris: self.remove_redirect(uri) - return self + return cast(ClientConfigBuilder, self) diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/configures/resolver_configure.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/configures/resolver_configure.py index 8134d81f..9a6401f1 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/configures/resolver_configure.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/configures/resolver_configure.py @@ -1,13 +1,12 @@ """This module contains the resolver configure class for the client config builder.""" -from abc import ABC -from typing import List +from typing import List, cast from polywrap_core import UriResolver from ..types import BuilderConfig, ClientConfigBuilder -class ResolverConfigure(ClientConfigBuilder, ABC): +class ResolverConfigure: """Allows configuring the URI resolvers.""" config: BuilderConfig @@ -19,10 +18,10 @@ def get_resolvers(self) -> List[UriResolver]: def add_resolver(self, resolver: UriResolver) -> ClientConfigBuilder: """Add a resolver to the builder's config.""" self.config.resolvers.append(resolver) - return self + return cast(ClientConfigBuilder, self) def add_resolvers(self, resolvers_list: List[UriResolver]) -> ClientConfigBuilder: """Add a list of resolvers to the builder's config.""" for resolver in resolvers_list: self.add_resolver(resolver) - return self + return cast(ClientConfigBuilder, self) diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/configures/wrapper_configure.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/configures/wrapper_configure.py index e0572ce8..1abd86c1 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/configures/wrapper_configure.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/configures/wrapper_configure.py @@ -1,13 +1,12 @@ """This module contains the wrapper configure class for the client config builder.""" -from abc import ABC -from typing import Dict, List, Union +from typing import Dict, List, Union, cast from polywrap_core import Uri, Wrapper from ..types import BuilderConfig, ClientConfigBuilder -class WrapperConfigure(ClientConfigBuilder, ABC): +class WrapperConfigure: """Allows configuring the wrappers.""" config: BuilderConfig @@ -23,20 +22,20 @@ def get_wrappers(self) -> Dict[Uri, Wrapper]: def set_wrapper(self, uri: Uri, wrapper: Wrapper) -> ClientConfigBuilder: """Set the wrapper by uri in the builder's config, overiding any existing values.""" self.config.wrappers[uri] = wrapper - return self + return cast(ClientConfigBuilder, self) def set_wrappers(self, uri_wrappers: Dict[Uri, Wrapper]) -> ClientConfigBuilder: """Set the wrappers in the builder's config, overiding any existing values.""" self.config.wrappers.update(uri_wrappers) - return self + return cast(ClientConfigBuilder, self) def remove_wrapper(self, uri: Uri) -> ClientConfigBuilder: """Remove the wrapper for the given uri.""" self.config.wrappers.pop(uri, None) - return self + return cast(ClientConfigBuilder, self) def remove_wrappers(self, uris: List[Uri]) -> ClientConfigBuilder: """Remove the wrappers for the given uris.""" for uri in uris: self.remove_wrapper(uri) - return self + return cast(ClientConfigBuilder, self) diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/polywrap_client_config_builder.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/polywrap_client_config_builder.py index d392c0fc..edf3bb29 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/polywrap_client_config_builder.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/polywrap_client_config_builder.py @@ -23,7 +23,7 @@ ResolverConfigure, WrapperConfigure, ) -from .types import BuilderConfig, BuildOptions +from .types import BuilderConfig, BuildOptions, ClientConfigBuilder class PolywrapClientConfigBuilder( @@ -34,6 +34,7 @@ class PolywrapClientConfigBuilder( RedirectConfigure, ResolverConfigure, WrapperConfigure, + ClientConfigBuilder, ): """Defines the default polywrap client config builder for\ building a ClientConfig object for the Polywrap Client. @@ -43,6 +44,28 @@ class PolywrapClientConfigBuilder( PolywrapClientConfigBuilder provides a simple interface for setting\ the redirects, wrappers, packages, and other configuration options\ for the Polywrap Client. + + Examples: + >>> from polywrap_client_config_builder import PolywrapClientConfigBuilder + >>> from polywrap_uri_resolvers import RecursiveResolver + >>> from polywrap_core import Uri + >>> config = ( + ... PolywrapClientConfigBuilder() + ... .set_env(Uri.from_str("test/uri"), {"hello": "world"}) + ... .add_interface_implementations( + ... Uri.from_str("test/interface"), + ... [Uri.from_str("test/impl1"), Uri.from_str("test/impl2")], + ... ) + ... .set_redirect(Uri("test", "from"), Uri("test", "to")) + ... .set_env(Uri("test", "to"), {"foo": "bar"}) + ... .build() + ... ) + >>> config.envs + {Uri("test", "uri"): {'hello': 'world'}, Uri("test", "to"): {'foo': 'bar'}} + >>> config.interfaces + {Uri("test", "interface"): [Uri("test", "impl1"), Uri("test", "impl2")]} + >>> isinstance(config.resolver, RecursiveResolver) + True """ def __init__(self): diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/types/build_options.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/types/build_options.py index a9ff21a8..d146483e 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/types/build_options.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/types/build_options.py @@ -10,7 +10,7 @@ class BuildOptions: """BuildOptions defines the options for build method of the client config builder. - Attributes: + Args: resolution_result_cache: The Resolution Result Cache. resolver: The URI resolver. """ diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/types/builder_config.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/types/builder_config.py index d94ac526..3f671c06 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/types/builder_config.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/types/builder_config.py @@ -9,7 +9,7 @@ class BuilderConfig: """BuilderConfig defines the internal configuration for the client config builder. - Attributes: + Args: envs (Dict[Uri, Any]): The environment variables for the wrappers. interfaces (Dict[Uri, List[Uri]]): The interfaces and their implementations. wrappers (Dict[Uri, Wrapper]): The wrappers. diff --git a/packages/polywrap-client-config-builder/polywrap_client_config_builder/types/client_config_builder.py b/packages/polywrap-client-config-builder/polywrap_client_config_builder/types/client_config_builder.py index bb0bcebd..b13d2c40 100644 --- a/packages/polywrap-client-config-builder/polywrap_client_config_builder/types/client_config_builder.py +++ b/packages/polywrap-client-config-builder/polywrap_client_config_builder/types/client_config_builder.py @@ -1,6 +1,5 @@ """This module contains the client config builder class.""" # pylint: disable=too-many-public-methods -from abc import abstractmethod from typing import Any, Dict, List, Optional, Protocol, Union from polywrap_core import ClientConfig, Uri, UriResolver, WrapPackage, Wrapper @@ -14,171 +13,171 @@ class ClientConfigBuilder(Protocol): config: BuilderConfig - @abstractmethod def build(self, options: Optional[BuildOptions] = None) -> ClientConfig: """Build the ClientConfig object from the builder's config.""" + ... - @abstractmethod def add(self, config: BuilderConfig) -> "ClientConfigBuilder": """Add the values from the given config to the builder's config.""" + ... # ENV CONFIGURE - @abstractmethod def get_env(self, uri: Uri) -> Union[Any, None]: """Return the env for the given uri.""" + ... - @abstractmethod def get_envs(self) -> Dict[Uri, Any]: """Return the envs from the builder's config.""" + ... - @abstractmethod def set_env(self, uri: Uri, env: Any) -> "ClientConfigBuilder": """Set the env by uri in the builder's config, overiding any existing values.""" + ... - @abstractmethod def set_envs(self, uri_envs: Dict[Uri, Any]) -> "ClientConfigBuilder": """Set the envs in the builder's config, overiding any existing values.""" + ... - @abstractmethod def add_env(self, uri: Uri, env: Any) -> "ClientConfigBuilder": """Add an env for the given uri. If an Any is already associated with the uri, it is modified. """ + ... - @abstractmethod def add_envs(self, uri_envs: Dict[Uri, Any]) -> "ClientConfigBuilder": """Add a list of envs to the builder's config.""" + ... - @abstractmethod def remove_env(self, uri: Uri) -> "ClientConfigBuilder": """Remove the env for the given uri.""" + ... - @abstractmethod def remove_envs(self, uris: List[Uri]) -> "ClientConfigBuilder": """Remove the envs for the given uris.""" + ... # INTERFACE IMPLEMENTATIONS CONFIGURE - @abstractmethod def get_interfaces(self) -> Dict[Uri, List[Uri]]: """Return all registered interface and its implementations from the builder's config.""" + ... - @abstractmethod def get_interface_implementations(self, uri: Uri) -> Union[List[Uri], None]: """Return the interface for the given uri.""" + ... - @abstractmethod def add_interface_implementations( self, interface_uri: Uri, implementations_uris: List[Uri] ) -> "ClientConfigBuilder": """Add a list of implementation URIs for the given interface URI to the builder's config.""" + ... - @abstractmethod def remove_interface_implementations( self, interface_uri: Uri, implementations_uris: List[Uri] ) -> "ClientConfigBuilder": """Remove the implementations for the given interface uri.""" + ... - @abstractmethod def remove_interface(self, interface_uri: Uri) -> "ClientConfigBuilder": """Remove the interface for the given uri.""" + ... # PACKAGE CONFIGURE - @abstractmethod def get_package(self, uri: Uri) -> Union[WrapPackage, None]: """Return the package for the given uri.""" + ... - @abstractmethod def get_packages(self) -> Dict[Uri, WrapPackage]: """Return the packages from the builder's config.""" + ... - @abstractmethod def set_package(self, uri: Uri, package: WrapPackage) -> "ClientConfigBuilder": """Set the package by uri in the builder's config, overiding any existing values.""" + ... - @abstractmethod def set_packages( self, uri_packages: Dict[Uri, WrapPackage] ) -> "ClientConfigBuilder": """Set the packages in the builder's config, overiding any existing values.""" + ... - @abstractmethod def remove_package(self, uri: Uri) -> "ClientConfigBuilder": """Remove the package for the given uri.""" + ... - @abstractmethod def remove_packages(self, uris: List[Uri]) -> "ClientConfigBuilder": """Remove the packages for the given uris.""" + ... # REDIRECT CONFIGURE - @abstractmethod def get_redirect(self, uri: Uri) -> Union[Uri, None]: """Return the redirect for the given uri.""" + ... - @abstractmethod def get_redirects(self) -> Dict[Uri, Uri]: """Return the redirects from the builder's config.""" + ... - @abstractmethod def set_redirect(self, from_uri: Uri, to_uri: Uri) -> "ClientConfigBuilder": """Set the redirect from a URI to another URI in the builder's config,\ overiding any existing values.""" + ... - @abstractmethod def set_redirects(self, uri_redirects: Dict[Uri, Uri]) -> "ClientConfigBuilder": """Set the redirects in the builder's config, overiding any existing values.""" + ... - @abstractmethod def remove_redirect(self, uri: Uri) -> "ClientConfigBuilder": """Remove the redirect for the given uri.""" + ... - @abstractmethod def remove_redirects(self, uris: List[Uri]) -> "ClientConfigBuilder": """Remove the redirects for the given uris.""" + ... # RESOLVER CONFIGURE - @abstractmethod def get_resolvers(self) -> List[UriResolver]: """Return the resolvers from the builder's config.""" + ... - @abstractmethod def add_resolver(self, resolver: UriResolver) -> "ClientConfigBuilder": """Add a resolver to the builder's config.""" + ... - @abstractmethod def add_resolvers(self, resolvers_list: List[UriResolver]) -> "ClientConfigBuilder": """Add a list of resolvers to the builder's config.""" + ... # WRAPPER CONFIGURE - @abstractmethod def get_wrapper(self, uri: Uri) -> Union[Wrapper, None]: """Return the set wrapper for the given uri.""" + ... - @abstractmethod def get_wrappers(self) -> Dict[Uri, Wrapper]: """Return the wrappers from the builder's config.""" + ... - @abstractmethod def set_wrapper(self, uri: Uri, wrapper: Wrapper) -> "ClientConfigBuilder": """Set the wrapper by uri in the builder's config, overiding any existing values.""" + ... - @abstractmethod def set_wrappers(self, uri_wrappers: Dict[Uri, Wrapper]) -> "ClientConfigBuilder": """Set the wrappers in the builder's config, overiding any existing values.""" + ... - @abstractmethod def remove_wrapper(self, uri: Uri) -> "ClientConfigBuilder": """Remove the wrapper for the given uri.""" + ... - @abstractmethod def remove_wrappers(self, uris: List[Uri]) -> "ClientConfigBuilder": """Remove the wrappers for the given uris.""" + ... __all__ = ["ClientConfigBuilder"] diff --git a/packages/polywrap-client-config-builder/pyproject.toml b/packages/polywrap-client-config-builder/pyproject.toml index 59bbc3d0..c7ada229 100644 --- a/packages/polywrap-client-config-builder/pyproject.toml +++ b/packages/polywrap-client-config-builder/pyproject.toml @@ -45,7 +45,8 @@ testpaths = [ [tool.pylint] disable = [ - + "unnecessary-ellipsis", + "too-few-public-methods" ] ignore = [ "tests/" diff --git a/packages/polywrap-client-config-builder/tests/run_doctest.py b/packages/polywrap-client-config-builder/tests/run_doctest.py new file mode 100644 index 00000000..ec9d73c5 --- /dev/null +++ b/packages/polywrap-client-config-builder/tests/run_doctest.py @@ -0,0 +1,24 @@ +# test_all.py +import doctest +from typing import Any +import unittest +import pkgutil +import polywrap_client_config_builder + +def load_tests(loader: Any, tests: Any, ignore: Any) -> Any: + """Load doctests and return TestSuite object.""" + modules = pkgutil.walk_packages( + path=polywrap_client_config_builder.__path__, + prefix=f"{polywrap_client_config_builder.__name__}.", + onerror=lambda x: None, + ) + for _, modname, _ in modules: + try: + module = __import__(modname, fromlist="dummy") + tests.addTests(doctest.DocTestSuite(module)) + except (ImportError, ValueError, AttributeError): + continue + return tests + +if __name__ == "__main__": + unittest.main() diff --git a/packages/polywrap-client/polywrap_client/client.py b/packages/polywrap-client/polywrap_client/client.py index 6b29321b..8e26cf48 100644 --- a/packages/polywrap-client/polywrap_client/client.py +++ b/packages/polywrap-client/polywrap_client/client.py @@ -11,6 +11,7 @@ Uri, UriPackage, UriPackageOrWrapper, + UriResolutionContext, UriResolutionStep, UriResolver, UriWrapper, @@ -21,24 +22,19 @@ from polywrap_core import get_implementations as core_get_implementations from polywrap_manifest import AnyWrapManifest, DeserializeManifestOptions from polywrap_msgpack import msgpack_decode, msgpack_encode -from polywrap_uri_resolvers import UriResolutionContext class PolywrapClient(Client): """Defines the Polywrap client. - Attributes: - _config (ClientConfig): The client configuration. + Args: + config (ClientConfig): The polywrap client config. """ _config: ClientConfig def __init__(self, config: ClientConfig): - """Initialize a new PolywrapClient instance. - - Args: - config (ClientConfig): The polywrap client config. - """ + """Initialize a new PolywrapClient instance.""" self._config = config def get_config(self) -> ClientConfig: @@ -86,9 +82,13 @@ def get_implementations( Args: uri (Uri): URI of the interface. apply_resolution (bool): If True, apply resolution to the URI and interfaces. + resolution_context (Optional[UriResolutionContext]): A URI resolution context Returns: Optional[List[Uri]]: List of implementations or None if not found. + + Raises: + WrapGetImplementationsError: If the URI cannot be resolved. """ interfaces: Dict[Uri, List[Uri]] = self.get_interfaces() if not apply_resolution: @@ -114,7 +114,8 @@ def get_file( Args: uri (Uri): The wrapper URI. - (GetFile: The for getting the file. + path (str): The path to the file. + encoding (Optional[str]): The encoding of the file. Returns: Union[bytes, str]: The file contents. @@ -129,7 +130,7 @@ def get_manifest( Args: uri (Uri): The wrapper URI. - (Optional[GetManifest): The for getting the manifest. + options (Optional[DeserializeManifestOptions]): The manifest options. Returns: AnyWrapManifest: The manifest. @@ -143,10 +144,15 @@ def try_resolve_uri( """Try to resolve the given URI. Args: - (TryResolveUriUriPackageOrWrapper]): The for resolving the URI. + uri (Uri): The URI to resolve. + resolution_context (Optional[UriResolutionContext]):\ + The resolution context. Returns: UriPackageOrWrapper: The resolved URI, package or wrapper. + + Raises: + UriResolutionError: If the URI cannot be resolved. """ uri_resolver = self._config.resolver resolution_context = resolution_context or UriResolutionContext() @@ -167,6 +173,10 @@ def load_wrapper( Returns: Wrapper: initialized wrapper instance. + + Raises: + UriResolutionError: If the URI cannot be resolved. + RuntimeError: If the URI cannot be resolved. """ resolution_context = resolution_context or UriResolutionContext() @@ -208,10 +218,23 @@ def invoke( """Invoke the given wrapper URI. Args: - (InvokerUriPackageOrWrapper]): The for invoking the wrapper. + uri (Uri): The wrapper URI. + method (str): The method to invoke. + args (Optional[Any]): The arguments to pass to the method. + env (Optional[Any]): The environment variables to pass. + resolution_context (Optional[UriResolutionContext]):\ + The resolution context. + encode_result (Optional[bool]): If True, encode the result. Returns: Any: The result of the invocation. + + Raises: + RuntimeError: If the URI cannot be resolved. + MsgpackError: If the data cannot be encoded/decoded. + ManifestError: If the manifest is invalid. + WrapError: If something went wrong during the invocation. + UriResolutionError: If the URI cannot be resolved. """ resolution_context = resolution_context or UriResolutionContext() load_wrapper_context = resolution_context.create_sub_history_context() diff --git a/packages/polywrap-core/polywrap_core/types/__init__.py b/packages/polywrap-core/polywrap_core/types/__init__.py index 1ce2c342..4559c269 100644 --- a/packages/polywrap-core/polywrap_core/types/__init__.py +++ b/packages/polywrap-core/polywrap_core/types/__init__.py @@ -1,4 +1,5 @@ """This module contains all the core types used in the various polywrap packages.""" +from .clean_resolution_step import * from .client import * from .config import * from .errors import * diff --git a/packages/polywrap-core/polywrap_core/types/clean_resolution_step.py b/packages/polywrap-core/polywrap_core/types/clean_resolution_step.py new file mode 100644 index 00000000..9b14e766 --- /dev/null +++ b/packages/polywrap-core/polywrap_core/types/clean_resolution_step.py @@ -0,0 +1,4 @@ +"""This module contains CleanResolutionStep type.""" +from typing import List, Union + +CleanResolutionStep = List[Union[str, "CleanResolutionStep"]] diff --git a/packages/polywrap-core/polywrap_core/types/client.py b/packages/polywrap-core/polywrap_core/types/client.py index 5df1f119..02dc27dd 100644 --- a/packages/polywrap-core/polywrap_core/types/client.py +++ b/packages/polywrap-core/polywrap_core/types/client.py @@ -11,7 +11,7 @@ class Client(InvokerClient, Protocol): - """Client interface defines core set of functionalities\ + """Client protocol defines core set of functionalities\ for interacting with a wrapper.""" def get_interfaces(self) -> Dict[Uri, List[Uri]]: diff --git a/packages/polywrap-core/polywrap_core/types/config.py b/packages/polywrap-core/polywrap_core/types/config.py index 4b124877..9673fcaf 100644 --- a/packages/polywrap-core/polywrap_core/types/config.py +++ b/packages/polywrap-core/polywrap_core/types/config.py @@ -10,9 +10,9 @@ @dataclass(slots=True, kw_only=True) class ClientConfig: - """Client configuration. + """Defines Client configuration dataclass. - Attributes: + Args: envs (Dict[Uri, Any]): Dictionary of environments \ where key is URI and value is env. interfaces (Dict[Uri, List[Uri]]): Dictionary of interfaces \ diff --git a/packages/polywrap-core/polywrap_core/types/errors.py b/packages/polywrap-core/polywrap_core/types/errors.py index e89e9ea0..54732eff 100644 --- a/packages/polywrap-core/polywrap_core/types/errors.py +++ b/packages/polywrap-core/polywrap_core/types/errors.py @@ -28,17 +28,26 @@ class WrapError(Exception): class WrapAbortError(WrapError): """Raises when a wrapper aborts execution. - Attributes: + Args: invoke_options (InvokeOptions): InvokeOptions for the invocation\ that was aborted. message: The message provided by the wrapper. """ uri: Uri + """The URI of the wrapper.""" + method: str + """The method that was invoked.""" + message: str + """The message provided by the wrapper.""" + invoke_args: Optional[str] = None + """The arguments that were passed to the wrapper.""" + invoke_env: Optional[str] = None + """The environment variables that were passed to the wrapper.""" def __init__( self, @@ -90,8 +99,8 @@ def __init__( class WrapInvocationError(WrapAbortError): """Raises when there is an error invoking a wrapper. - Attributes: - invoke_options (InvokeOptions): InvokeOptions for the invocation \ + Args: + invoke_options (InvokeOptions): InvokeOptions for the invocation\ that was aborted. message: The message provided by the wrapper. """ @@ -100,13 +109,16 @@ class WrapInvocationError(WrapAbortError): class WrapGetImplementationsError(WrapError): """Raises when there is an error getting implementations of an interface. - Attributes: + Args: uri (Uri): URI of the interface. - message: The message provided by the wrapper. + message (str): The message provided by the wrapper. """ uri: Uri + """The URI of the interface.""" + message: str + """The message provided by the wrapper.""" def __init__(self, uri: Uri, message: str): """Initialize a new instance of WrapGetImplementationsError.""" diff --git a/packages/polywrap-core/polywrap_core/types/file_reader.py b/packages/polywrap-core/polywrap_core/types/file_reader.py index 848c69fd..268a7eb1 100644 --- a/packages/polywrap-core/polywrap_core/types/file_reader.py +++ b/packages/polywrap-core/polywrap_core/types/file_reader.py @@ -5,7 +5,7 @@ class FileReader(Protocol): - """File reader interface.""" + """FileReader protocol used by UriResolver.""" def read_file(self, file_path: str) -> bytes: """Read a file from the given file path. diff --git a/packages/polywrap-core/polywrap_core/types/invocable.py b/packages/polywrap-core/polywrap_core/types/invocable.py index 847cfdae..efb15102 100644 --- a/packages/polywrap-core/polywrap_core/types/invocable.py +++ b/packages/polywrap-core/polywrap_core/types/invocable.py @@ -26,7 +26,7 @@ class InvocableResult: class Invocable(Protocol): - """Invocable interface.""" + """Defines Invocable protocol.""" def invoke( self, diff --git a/packages/polywrap-core/polywrap_core/types/invoke_options.py b/packages/polywrap-core/polywrap_core/types/invoke_options.py index 8cab91d6..0db5df23 100644 --- a/packages/polywrap-core/polywrap_core/types/invoke_options.py +++ b/packages/polywrap-core/polywrap_core/types/invoke_options.py @@ -6,7 +6,7 @@ class InvokeOptions(Protocol): - """InvokeOptions holds the options for an invocation.""" + """InvokeOptions protocol exposes the core options for an invocation.""" @property def uri(self) -> Uri: @@ -32,3 +32,6 @@ def env(self) -> Any: def resolution_context(self) -> Optional[UriResolutionContext]: """A URI resolution context.""" ... + + +__all__ = ["InvokeOptions"] diff --git a/packages/polywrap-core/polywrap_core/types/invoker.py b/packages/polywrap-core/polywrap_core/types/invoker.py index 16083a5c..37db229b 100644 --- a/packages/polywrap-core/polywrap_core/types/invoker.py +++ b/packages/polywrap-core/polywrap_core/types/invoker.py @@ -10,7 +10,7 @@ class Invoker(Protocol): - """Invoker interface defines the methods for invoking a wrapper.""" + """Invoker protocol defines the methods for invoking a wrapper.""" def invoke( self, diff --git a/packages/polywrap-core/polywrap_core/types/invoker_client.py b/packages/polywrap-core/polywrap_core/types/invoker_client.py index 66d3eaff..ff41a43a 100644 --- a/packages/polywrap-core/polywrap_core/types/invoker_client.py +++ b/packages/polywrap-core/polywrap_core/types/invoker_client.py @@ -8,7 +8,7 @@ class InvokerClient(Invoker, UriResolverHandler, Protocol): - """InvokerClient interface defines core set of functionalities\ + """InvokerClient protocol defines core set of functionalities\ for resolving and invoking a wrapper.""" diff --git a/packages/polywrap-core/polywrap_core/types/uri.py b/packages/polywrap-core/polywrap_core/types/uri.py index 425b7a9a..4d1ef475 100644 --- a/packages/polywrap-core/polywrap_core/types/uri.py +++ b/packages/polywrap-core/polywrap_core/types/uri.py @@ -17,7 +17,16 @@ class Uri: `:///` where the scheme is always "wrap" and the \ authority is the URI scheme of the underlying wrapper. + Args: + authority (str): The authority of the URI. This is used to determine \ + which URI resolver to use. + path (str): The path of the URI. This is used to determine the \ + location of the wrapper. + Examples: + >>> uri = Uri("ipfs", "QmHASH") + >>> uri.uri + "wrap://ipfs/QmHASH" >>> uri = Uri.from_str("ipfs/QmHASH") >>> uri.uri "wrap://ipfs/QmHASH" @@ -40,14 +49,6 @@ class Uri: Traceback (most recent call last): ... TypeError: expected string or bytes-like object - - Attributes: - scheme (str): The scheme of the URI. Defaults to "wrap". This helps \ - differentiate Polywrap URIs from other URI schemes. - authority (str): The authority of the URI. This is used to determine \ - which URI resolver to use. - path (str): The path of the URI. This is used to determine the \ - location of the wrapper. """ URI_REGEX = re.compile( @@ -55,6 +56,9 @@ class Uri: ) # https://www.rfc-editor.org/rfc/rfc3986#appendix-B scheme = "wrap" + """The scheme of the URI. Defaults to "wrap". This helps \ + differentiate Polywrap URIs from other URI schemes.""" + _authority: str _path: str diff --git a/packages/polywrap-core/polywrap_core/types/uri_package.py b/packages/polywrap-core/polywrap_core/types/uri_package.py index 63b61948..b86bb9fe 100644 --- a/packages/polywrap-core/polywrap_core/types/uri_package.py +++ b/packages/polywrap-core/polywrap_core/types/uri_package.py @@ -11,13 +11,16 @@ class UriPackage: """UriPackage is a dataclass that contains a URI and a package. - Attributes: - uri (Uri): The URI. - package (Package): The package. + Args: + uri (Uri): The URI of the wrap package. + package (WrapPackage): The wrap package. """ uri: Uri + """The URI of the wrap package.""" + package: WrapPackage + """The wrap package.""" __all__ = ["UriPackage"] diff --git a/packages/polywrap-core/polywrap_core/types/uri_package_wrapper.py b/packages/polywrap-core/polywrap_core/types/uri_package_wrapper.py index a4c3e5da..4d4a80d5 100644 --- a/packages/polywrap-core/polywrap_core/types/uri_package_wrapper.py +++ b/packages/polywrap-core/polywrap_core/types/uri_package_wrapper.py @@ -1,4 +1,22 @@ -"""UriPackageOrWrapper is a Union type alias for a URI, a package, or a wrapper.""" +"""UriPackageOrWrapper is a Union type alias for a URI, a package, or a wrapper. + +UriPackageOrWrapper = Union[Uri, UriWrapper, UriPackage] + +Examples: + >>> from polywrap_core.types import UriPackageOrWrapper + >>> from polywrap_core.types import Uri + >>> from polywrap_core.types import UriPackage + >>> from polywrap_core.types import UriWrapper + >>> result: UriPackageOrWrapper = Uri("authority", "path") + >>> match result: + ... case Uri(uri): + ... print(uri) + ... case _: + ... print("Not a URI") + ... + wrap://authority/path + +""" from __future__ import annotations from typing import Union diff --git a/packages/polywrap-core/polywrap_core/types/uri_resolution_context.py b/packages/polywrap-core/polywrap_core/types/uri_resolution_context.py index 4b852595..bffb103e 100644 --- a/packages/polywrap-core/polywrap_core/types/uri_resolution_context.py +++ b/packages/polywrap-core/polywrap_core/types/uri_resolution_context.py @@ -8,7 +8,7 @@ class UriResolutionContext: """Represents the context of a uri resolution. - Attributes: + Args: resolving_uri_set (Set[Uri]): A set of uris that\ are currently being resolved. resolution_path (List[Uri]): A list of uris in the order that\ @@ -18,8 +18,13 @@ class UriResolutionContext: """ resolving_uri_set: Set[Uri] + """A set of uris that are currently being resolved.""" + resolution_path: List[Uri] + """A list of uris in the order that they are being resolved.""" + history: List[UriResolutionStep] + """A list of steps that have been taken to resolve the uri.""" __slots__ = ("resolving_uri_set", "resolution_path", "history") @@ -29,16 +34,7 @@ def __init__( resolution_path: Optional[List[Uri]] = None, history: Optional[List[UriResolutionStep]] = None, ): - """Initialize a new instance of UriResolutionContext. - - Args: - resolving_uri_set (Optional[Set[Uri]]): A set of uris that\ - are currently being resolved. - resolution_path (Optional[List[Uri]]): A list of uris in the order that\ - they are being resolved. - history (Optional[List[UriResolutionStep]]): A list of steps \ - that have been taken to resolve the uri. - """ + """Initialize a new instance of UriResolutionContext.""" self.resolving_uri_set = resolving_uri_set or set() self.resolution_path = resolution_path or [] self.history = history or [] diff --git a/packages/polywrap-core/polywrap_core/types/uri_resolution_step.py b/packages/polywrap-core/polywrap_core/types/uri_resolution_step.py index 4ababc33..b2ef95aa 100644 --- a/packages/polywrap-core/polywrap_core/types/uri_resolution_step.py +++ b/packages/polywrap-core/polywrap_core/types/uri_resolution_step.py @@ -11,7 +11,7 @@ class UriResolutionStep: """Represents a single step in the resolution of a uri. - Attributes: + Args: source_uri (Uri): The uri that was resolved. result (Any): The result of the resolution. description (Optional[str]): A description of the resolution step. diff --git a/packages/polywrap-core/polywrap_core/types/uri_resolver.py b/packages/polywrap-core/polywrap_core/types/uri_resolver.py index 0de1f60a..1df16efb 100644 --- a/packages/polywrap-core/polywrap_core/types/uri_resolver.py +++ b/packages/polywrap-core/polywrap_core/types/uri_resolver.py @@ -10,7 +10,7 @@ class UriResolver(Protocol): - """Defines interface for wrapper uri resolver.""" + """Defines protocol for wrapper uri resolver.""" def try_resolve_uri( self, diff --git a/packages/polywrap-core/polywrap_core/types/uri_resolver_handler.py b/packages/polywrap-core/polywrap_core/types/uri_resolver_handler.py index ca1140b5..8dd67a87 100644 --- a/packages/polywrap-core/polywrap_core/types/uri_resolver_handler.py +++ b/packages/polywrap-core/polywrap_core/types/uri_resolver_handler.py @@ -8,7 +8,7 @@ class UriResolverHandler(Protocol): - """Uri resolver handler interface.""" + """Uri resolver handler protocol.""" def try_resolve_uri( self, uri: Uri, resolution_context: Optional[UriResolutionContext] = None diff --git a/packages/polywrap-core/polywrap_core/types/uri_wrapper.py b/packages/polywrap-core/polywrap_core/types/uri_wrapper.py index 8930220e..0cab0fc0 100644 --- a/packages/polywrap-core/polywrap_core/types/uri_wrapper.py +++ b/packages/polywrap-core/polywrap_core/types/uri_wrapper.py @@ -11,8 +11,8 @@ class UriWrapper: """UriWrapper is a dataclass that contains a URI and a wrapper. - Attributes: - uri (Uri): The URI. + Args: + uri (Uri): The URI of the wrapper. wrapper (Wrapper): The wrapper. """ diff --git a/packages/polywrap-core/polywrap_core/types/wrap_package.py b/packages/polywrap-core/polywrap_core/types/wrap_package.py index e9f4b30e..c7171c10 100644 --- a/packages/polywrap-core/polywrap_core/types/wrap_package.py +++ b/packages/polywrap-core/polywrap_core/types/wrap_package.py @@ -9,7 +9,7 @@ class WrapPackage(Protocol): - """Wrapper package interface.""" + """Defines protocol for representing the wrap package.""" def create_wrapper(self) -> Wrapper: """Create a new wrapper instance from the wrapper package. diff --git a/packages/polywrap-core/polywrap_core/types/wrapper.py b/packages/polywrap-core/polywrap_core/types/wrapper.py index 303893e6..1b45f766 100644 --- a/packages/polywrap-core/polywrap_core/types/wrapper.py +++ b/packages/polywrap-core/polywrap_core/types/wrapper.py @@ -9,7 +9,7 @@ class Wrapper(Invocable, Protocol): - """Defines the interface for a wrapper.""" + """Defines the protocol for a wrapper.""" def get_file( self, path: str, encoding: Optional[str] = "utf-8" diff --git a/packages/polywrap-core/polywrap_core/utils/build_clean_uri_history.py b/packages/polywrap-core/polywrap_core/utils/build_clean_uri_history.py index a22dd0f1..7a32fa1e 100644 --- a/packages/polywrap-core/polywrap_core/utils/build_clean_uri_history.py +++ b/packages/polywrap-core/polywrap_core/utils/build_clean_uri_history.py @@ -1,9 +1,7 @@ """This module contains an utility function for building a clean history of URI resolution steps.""" -from typing import List, Optional, Union +from typing import List, Optional -from ..types import UriPackage, UriResolutionStep, UriWrapper - -CleanResolutionStep = List[Union[str, "CleanResolutionStep"]] +from ..types import CleanResolutionStep, UriPackage, UriResolutionStep, UriWrapper def build_clean_uri_history( @@ -12,8 +10,8 @@ def build_clean_uri_history( """Build a clean history of the URI resolution steps. Args: - history: A list of URI resolution steps. - depth: The depth of the history to build. + history (List[UriResolutionStep]): A list of URI resolution steps. + depth (Optional[int]): The depth of the history to build. Returns: CleanResolutionStep: A clean history of the URI resolution steps. @@ -71,3 +69,6 @@ def _build_clean_history_step(step: UriResolutionStep) -> str: if step.description else f"{step.source_uri} => uri ({uri})" ) + + +__all__ = ["build_clean_uri_history"] diff --git a/packages/polywrap-core/polywrap_core/utils/get_env_from_resolution_path.py b/packages/polywrap-core/polywrap_core/utils/get_env_from_resolution_path.py index 33bc4ac2..fe97c80d 100644 --- a/packages/polywrap-core/polywrap_core/utils/get_env_from_resolution_path.py +++ b/packages/polywrap-core/polywrap_core/utils/get_env_from_resolution_path.py @@ -10,8 +10,8 @@ def get_env_from_resolution_path( """Get environment variable from URI resolution history. Args: - uri_history: List of URIs from the URI resolution history - client: Polywrap client instance to use for getting the env by URI + uri_history (List[Uri]): List of URIs from the URI resolution history + client (Client): Polywrap client instance to use for getting the env by URI Returns: env if found, None otherwise @@ -20,3 +20,6 @@ def get_env_from_resolution_path( if env := client.get_env_by_uri(uri): return env return None + + +__all__ = ["get_env_from_resolution_path"] diff --git a/packages/polywrap-core/polywrap_core/utils/get_implementations.py b/packages/polywrap-core/polywrap_core/utils/get_implementations.py index 53c39231..0f8a7544 100644 --- a/packages/polywrap-core/polywrap_core/utils/get_implementations.py +++ b/packages/polywrap-core/polywrap_core/utils/get_implementations.py @@ -32,6 +32,9 @@ def get_implementations( client (Optional[InvokerClient]): The client to use for resolving the URI. resolution_context (Optional[UriResolutionContext]): The resolution context to use. + Raises: + WrapGetImplementationsError: If the URI cannot be resolved. + Returns: Optional[List[Uri]]: List of implementations or None if not found. """ @@ -47,3 +50,6 @@ def get_implementations( final_implementations = final_implementations.union(impls) return list(final_implementations) if final_implementations else None + + +__all__ = ["get_implementations"] diff --git a/packages/polywrap-core/tests/run_doctest.py b/packages/polywrap-core/tests/run_doctest.py new file mode 100644 index 00000000..3fc4848e --- /dev/null +++ b/packages/polywrap-core/tests/run_doctest.py @@ -0,0 +1,24 @@ +# test_all.py +import doctest +from typing import Any +import unittest +import pkgutil +import polywrap_msgpack + +def load_tests(loader: Any, tests: Any, ignore: Any) -> Any: + """Load doctests and return TestSuite object.""" + modules = pkgutil.walk_packages( + path=polywrap_msgpack.__path__, + prefix=f"{polywrap_msgpack.__name__}.", + onerror=lambda x: None, + ) + for _, modname, _ in modules: + try: + module = __import__(modname, fromlist="dummy") + tests.addTests(doctest.DocTestSuite(module)) + except (ImportError, ValueError, AttributeError): + continue + return tests + +if __name__ == "__main__": + unittest.main() diff --git a/packages/polywrap-core/tests/test_get_implementations.py b/packages/polywrap-core/tests/test_get_implementations.py index b8e3cd84..37cb7647 100644 --- a/packages/polywrap-core/tests/test_get_implementations.py +++ b/packages/polywrap-core/tests/test_get_implementations.py @@ -1,9 +1,9 @@ from polywrap_core import ( - Any, Client, Uri, get_implementations, ) +from typing import Any import pytest interface_1 = Uri.from_str("wrap://ens/interface-1.eth") diff --git a/packages/polywrap-manifest/polywrap_manifest/manifest.py b/packages/polywrap-manifest/polywrap_manifest/manifest.py index d0be947c..5e21da18 100644 --- a/packages/polywrap-manifest/polywrap_manifest/manifest.py +++ b/packages/polywrap-manifest/polywrap_manifest/manifest.py @@ -15,7 +15,7 @@ class DeserializeManifestOptions: """Options for deserializing a manifest from msgpack encoded bytes. - Attributes: + Args: no_validate: If true, do not validate the manifest. """ diff --git a/packages/polywrap-msgpack/polywrap_msgpack/__init__.py b/packages/polywrap-msgpack/polywrap_msgpack/__init__.py index 096032d9..5d8019c8 100644 --- a/packages/polywrap-msgpack/polywrap_msgpack/__init__.py +++ b/packages/polywrap-msgpack/polywrap_msgpack/__init__.py @@ -12,23 +12,3 @@ from .errors import * from .extensions import * from .sanitize import * - -__all__ = [ - # Serializer - "msgpack_decode", - "msgpack_encode", - # Extensions - "decode_ext_hook", - "encode_ext_hook", - "ExtensionTypes", - # Sanitizers - "sanitize", - # Extention types - "GenericMap", - # Errors - "MsgpackError", - "MsgpackDecodeError", - "MsgpackEncodeError", - "MsgpackExtError", - "MsgpackSanitizeError", -] diff --git a/packages/polywrap-msgpack/polywrap_msgpack/decoder.py b/packages/polywrap-msgpack/polywrap_msgpack/decoder.py index a768be9b..5de64824 100644 --- a/packages/polywrap-msgpack/polywrap_msgpack/decoder.py +++ b/packages/polywrap-msgpack/polywrap_msgpack/decoder.py @@ -10,7 +10,7 @@ from .extensions import ExtensionTypes, GenericMap -def decode_ext_hook(code: int, data: bytes) -> Any: +def _decode_ext_hook(code: int, data: bytes) -> Any: """Extension hook for extending the msgpack supported types. Args: @@ -30,7 +30,7 @@ def decode_ext_hook(code: int, data: bytes) -> Any: def msgpack_decode(val: bytes) -> Any: - """Decode msgpack bytes into a valid python object. + r"""Decode msgpack bytes into a valid python object. Args: val (bytes): msgpack encoded bytes @@ -41,10 +41,30 @@ def msgpack_decode(val: bytes) -> Any: Returns: Any: any python object + + Examples: + >>> from polywrap_msgpack import msgpack_encode + >>> from polywrap_msgpack import msgpack_decode + >>> from polywrap_msgpack import GenericMap + >>> msgpack_decode(msgpack_encode({"a": 1})) + {'a': 1} + >>> msgpack_decode(msgpack_encode(GenericMap({"a": 1}))) + GenericMap({'a': 1}) + >>> msgpack_decode(msgpack_encode([{"a": 2}, {"b": 4}])) + [{'a': 2}, {'b': 4}] + >>> msgpack_decode(b"\xc1") + Traceback (most recent call last): + ... + polywrap_msgpack.errors.MsgpackDecodeError: Failed to decode msgpack data """ try: return msgpack.unpackb( # pyright: ignore[reportUnknownMemberType] - val, ext_hook=decode_ext_hook + val, ext_hook=_decode_ext_hook ) except Exception as e: raise MsgpackDecodeError("Failed to decode msgpack data") from e + + +__all__ = [ + "msgpack_decode", +] diff --git a/packages/polywrap-msgpack/polywrap_msgpack/encoder.py b/packages/polywrap-msgpack/polywrap_msgpack/encoder.py index 71ea9c16..a210ca0e 100644 --- a/packages/polywrap-msgpack/polywrap_msgpack/encoder.py +++ b/packages/polywrap-msgpack/polywrap_msgpack/encoder.py @@ -12,7 +12,7 @@ from .sanitize import sanitize -def encode_ext_hook(obj: Any) -> ExtType: +def _encode_ext_hook(obj: Any) -> ExtType: """Extension hook for extending the msgpack supported types. Args: @@ -38,17 +38,31 @@ def encode_ext_hook(obj: Any) -> ExtType: def msgpack_encode(value: Any) -> bytes: - """Encode any python object into msgpack bytes. + r"""Encode any python object into msgpack bytes. Args: value (Any): any valid python object Raises: + MsgpackExtError: when given object is not a supported extension type MsgpackEncodeError: when sanitized object is not msgpack serializable MsgpackSanitizeError: when given object is not sanitizable Returns: bytes: encoded msgpack value + + Examples: + >>> from polywrap_msgpack import msgpack_encode + >>> from polywrap_msgpack import msgpack_decode + >>> from polywrap_msgpack import GenericMap + >>> msgpack_encode({"a": 1}) + b'\x81\xa1a\x01' + >>> msgpack_encode(GenericMap({"a": 1})) + b'\xd6\x01\x81\xa1a\x01' + >>> msgpack_encode({1.0: 1}) + Traceback (most recent call last): + ... + polywrap_msgpack.errors.MsgpackSanitizeError: Failed to sanitize object """ try: sanitized = sanitize(value) @@ -56,6 +70,11 @@ def msgpack_encode(value: Any) -> bytes: raise MsgpackSanitizeError("Failed to sanitize object") from e try: - return msgpack.packb(sanitized, default=encode_ext_hook, use_bin_type=True) + return msgpack.packb(sanitized, default=_encode_ext_hook, use_bin_type=True) except Exception as e: raise MsgpackEncodeError("Failed to encode object") from e + + +__all__ = [ + "msgpack_encode", +] diff --git a/packages/polywrap-msgpack/polywrap_msgpack/errors.py b/packages/polywrap-msgpack/polywrap_msgpack/errors.py index c008c6e0..ab0540bd 100644 --- a/packages/polywrap-msgpack/polywrap_msgpack/errors.py +++ b/packages/polywrap-msgpack/polywrap_msgpack/errors.py @@ -20,3 +20,12 @@ class MsgpackExtError(MsgpackError): class MsgpackSanitizeError(MsgpackError): """Raised when there is an error sanitizing a python object\ into a msgpack encoder compatible format.""" + + +__all__ = [ + "MsgpackError", + "MsgpackDecodeError", + "MsgpackEncodeError", + "MsgpackExtError", + "MsgpackSanitizeError", +] diff --git a/packages/polywrap-msgpack/polywrap_msgpack/extensions/generic_map.py b/packages/polywrap-msgpack/polywrap_msgpack/extensions/generic_map.py index ec6c294f..01bb974e 100644 --- a/packages/polywrap-msgpack/polywrap_msgpack/extensions/generic_map.py +++ b/packages/polywrap-msgpack/polywrap_msgpack/extensions/generic_map.py @@ -6,7 +6,34 @@ class GenericMap(MutableMapping[K, V]): - """GenericMap is a type that can be used to represent generic map extension type in msgpack.""" + """GenericMap is a type that can be used to represent generic map extension type in msgpack. + + Examples: + >>> from polywrap_msgpack import GenericMap + >>> GenericMap({1: 2, 3: 4}) + GenericMap({1: 2, 3: 4}) + >>> map = GenericMap({1: 2, 3: 4}) + >>> map[5] = 6 + >>> map + GenericMap({1: 2, 3: 4, 5: 6}) + >>> map[7] + Traceback (most recent call last): + ... + KeyError: 7 + >>> 7 in map + False + >>> 1 in map + True + >>> len(map) + 3 + >>> del map[1] + >>> map + GenericMap({3: 4, 5: 6}) + >>> del map[7] + Traceback (most recent call last): + ... + KeyError: 7 + """ _map: Dict[K, V] diff --git a/packages/polywrap-msgpack/polywrap_msgpack/sanitize.py b/packages/polywrap-msgpack/polywrap_msgpack/sanitize.py index 93d8ba1b..6c7407a2 100644 --- a/packages/polywrap-msgpack/polywrap_msgpack/sanitize.py +++ b/packages/polywrap-msgpack/polywrap_msgpack/sanitize.py @@ -18,6 +18,29 @@ def sanitize(value: Any) -> Any: Returns: Any: msgpack compatible sanitized value + + Examples: + >>> sanitize({"a": 1}) + {'a': 1} + >>> sanitize({1, 2, 3}) + [1, 2, 3] + >>> sanitize((1, 2, 3)) + [1, 2, 3] + >>> sanitize([{1}, (2, 3), [4]]) + [[1], [2, 3], [4]] + >>> class Foo: pass + >>> foo = Foo() + >>> foo.bar = 1 + >>> sanitize(foo) + {'bar': 1} + >>> sanitize({1: 1}) + Traceback (most recent call last): + ... + ValueError: Dict key must be string, got 1 of type + >>> sanitize(GenericMap({1: 2})) + Traceback (most recent call last): + ... + ValueError: GenericMap key must be string, got 1 of type """ if isinstance(value, GenericMap): dictionary: Dict[Any, Any] = cast( @@ -61,3 +84,6 @@ def sanitize(value: Any) -> Any: if hasattr(value, "__dict__"): return {k: sanitize(v) for k, v in cast(Dict[Any, Any], vars(value)).items()} return value + + +__all__ = ["sanitize"] diff --git a/packages/polywrap-msgpack/tests/run_doctest.py b/packages/polywrap-msgpack/tests/run_doctest.py new file mode 100644 index 00000000..3fc4848e --- /dev/null +++ b/packages/polywrap-msgpack/tests/run_doctest.py @@ -0,0 +1,24 @@ +# test_all.py +import doctest +from typing import Any +import unittest +import pkgutil +import polywrap_msgpack + +def load_tests(loader: Any, tests: Any, ignore: Any) -> Any: + """Load doctests and return TestSuite object.""" + modules = pkgutil.walk_packages( + path=polywrap_msgpack.__path__, + prefix=f"{polywrap_msgpack.__name__}.", + onerror=lambda x: None, + ) + for _, modname, _ in modules: + try: + module = __import__(modname, fromlist="dummy") + tests.addTests(doctest.DocTestSuite(module)) + except (ImportError, ValueError, AttributeError): + continue + return tests + +if __name__ == "__main__": + unittest.main() diff --git a/packages/polywrap-msgpack/tox.ini b/packages/polywrap-msgpack/tox.ini index 3f8af3b6..aab2128e 100644 --- a/packages/polywrap-msgpack/tox.ini +++ b/packages/polywrap-msgpack/tox.ini @@ -10,7 +10,7 @@ commands = commands = isort --check-only polywrap_msgpack black --check polywrap_msgpack - pycln --check polywrap_msgpack --disable-all-dunder-policy + ; pycln --check polywrap_msgpack --disable-all-dunder-policy pylint polywrap_msgpack pydocstyle polywrap_msgpack @@ -26,4 +26,4 @@ commands = commands = isort polywrap_msgpack black polywrap_msgpack - pycln polywrap_msgpack --disable-all-dunder-policy + ; pycln polywrap_msgpack --disable-all-dunder-policy diff --git a/packages/polywrap-plugin/polywrap_plugin/module.py b/packages/polywrap-plugin/polywrap_plugin/module.py index fea82e2e..4af8484b 100644 --- a/packages/polywrap-plugin/polywrap_plugin/module.py +++ b/packages/polywrap-plugin/polywrap_plugin/module.py @@ -17,16 +17,19 @@ @dataclass(kw_only=True, slots=True) -class InvokeOptions: - """InvokeOptions is a dataclass that holds the options for an invocation. - - Attributes: - uri: The URI of the wrapper. - method: The method to invoke. - args: The arguments to pass to the method. - env: The environment variables to set for the invocation. - resolution_context: A URI resolution context. - client: The client to use for subinvocations. +class PluginInvokeOptions: + """PluginInvokeOptions is a dataclass that holds the options for an invocation. + + Args: + uri (URI): The URI of the wrapper. + method (str): The method to invoke. + args (Optional[Any]): The arguments to pass to the method. + env (Optional[Any]): The environment variables to set\ + for the invocation. + resolution_context (Optional[UriResolutionContext]): \ + A URI resolution context. + client (Optional[InvokerClient]): The client to use\ + for subinvocations. """ uri: Uri @@ -40,31 +43,34 @@ class InvokeOptions: class PluginModule(Generic[TConfig], ABC): """PluginModule is the base class for all plugin modules. - Attributes: - config: The configuration of the plugin. + Args: + config (TConfig): The configuration of the plugin. """ config: TConfig def __init__(self, config: TConfig): - """Initialize a new PluginModule instance. - - Args: - config: The configuration of the plugin. - """ + """Initialize a new PluginModule instance.""" self.config = config def __wrap_invoke__( self, - options: InvokeOptions, + options: PluginInvokeOptions, ) -> Any: """Invoke a method on the plugin. Args: - options: The options to use when invoking the plugin. + options (PluginInvokeOptions): The options\ + to use when invoking the plugin. Returns: The result of the plugin method invocation. + + Raises: + WrapInvocationError: If the plugin method is not defined\ + or is not callable. + WrapAbortError: If the plugin method raises an exception. + MsgpackDecodeError: If the plugin method returns invalid msgpack. """ if not hasattr(self, options.method): raise WrapInvocationError( diff --git a/packages/polywrap-plugin/polywrap_plugin/package.py b/packages/polywrap-plugin/polywrap_plugin/package.py index 4592a348..ef18d9c5 100644 --- a/packages/polywrap-plugin/polywrap_plugin/package.py +++ b/packages/polywrap-plugin/polywrap_plugin/package.py @@ -14,21 +14,16 @@ class PluginPackage(WrapPackage, Generic[TConfig]): """PluginPackage implements IWrapPackage interface for the plugin. - Attributes: - module: The plugin module. - manifest: The manifest of the plugin. + Args: + module (PluginModule[TConfig]): The plugin module. + manifest (AnyWrapManifest): The manifest of the plugin. """ module: PluginModule[TConfig] manifest: AnyWrapManifest def __init__(self, module: PluginModule[TConfig], manifest: AnyWrapManifest): - """Initialize a new PluginPackage instance. - - Args: - module: The plugin module. - manifest: The manifest of the plugin. - """ + """Initialize a new PluginPackage instance.""" self.module = module self.manifest = manifest diff --git a/packages/polywrap-plugin/polywrap_plugin/resolution_context_override_client.py b/packages/polywrap-plugin/polywrap_plugin/resolution_context_override_client.py index 3700f72f..53456685 100644 --- a/packages/polywrap-plugin/polywrap_plugin/resolution_context_override_client.py +++ b/packages/polywrap-plugin/polywrap_plugin/resolution_context_override_client.py @@ -9,7 +9,8 @@ class ResolutionContextOverrideClient(InvokerClient): Args: client (InvokerClient): The wrapped client. - resolution_context (Optional[UriResolutionContext]): The resolution context to use. + resolution_context (Optional[UriResolutionContext]): \ + The resolution context to use. """ client: InvokerClient @@ -45,6 +46,12 @@ def invoke( Returns: Any: invocation result. + + Raises: + WrapInvocationError: If the plugin method is not defined\ + or is not callable. + WrapAbortError: If the plugin method raises an exception. + MsgpackDecodeError: If the plugin method returns invalid msgpack. """ return self.client.invoke( uri, diff --git a/packages/polywrap-plugin/polywrap_plugin/wrapper.py b/packages/polywrap-plugin/polywrap_plugin/wrapper.py index ac947758..d8b9dd9d 100644 --- a/packages/polywrap-plugin/polywrap_plugin/wrapper.py +++ b/packages/polywrap-plugin/polywrap_plugin/wrapper.py @@ -12,7 +12,7 @@ ) from polywrap_manifest import AnyWrapManifest -from .module import InvokeOptions, PluginModule +from .module import PluginInvokeOptions, PluginModule from .resolution_context_override_client import ResolutionContextOverrideClient TConfig = TypeVar("TConfig") @@ -22,9 +22,9 @@ class PluginWrapper(Wrapper, Generic[TConfig]): """PluginWrapper implements the Wrapper interface for plugin wrappers. - Attributes: - module: The plugin module. - manifest: The manifest of the plugin. + Args: + module (PluginModule[TConfig]): The plugin module. + manifest (AnyWrapManifest): The manifest of the plugin. """ module: PluginModule[TConfig] @@ -33,12 +33,7 @@ class PluginWrapper(Wrapper, Generic[TConfig]): def __init__( self, module: PluginModule[TConfig], manifest: AnyWrapManifest ) -> None: - """Initialize a new PluginWrapper instance. - - Args: - module: The plugin module. - manifest: The manifest of the plugin. - """ + """Initialize a new PluginWrapper instance.""" self.module = module self.manifest = manifest @@ -64,8 +59,14 @@ def invoke( Returns: InvocableResult: Result of the invocation. + + Raises: + WrapInvocationError: If the plugin method is not defined\ + or is not callable. + WrapAbortError: If the plugin method raises an exception. + MsgpackDecodeError: If the plugin method returns invalid msgpack. """ - options = InvokeOptions( + options = PluginInvokeOptions( uri=uri, method=method, args=args, @@ -89,6 +90,9 @@ def get_file( Returns: Union[str, bytes]: The file contents + + Raises: + NotImplementedError: This method is not implemented for plugins. """ raise NotImplementedError("client.get_file(..) is not implemented for plugins") diff --git a/packages/polywrap-plugin/tests/test_plugin_module.py b/packages/polywrap-plugin/tests/test_plugin_module.py index a308a276..c61d619c 100644 --- a/packages/polywrap-plugin/tests/test_plugin_module.py +++ b/packages/polywrap-plugin/tests/test_plugin_module.py @@ -1,13 +1,13 @@ from polywrap_core import InvokerClient, Uri from polywrap_plugin import PluginModule -from polywrap_plugin.module import InvokeOptions +from polywrap_plugin.module import PluginInvokeOptions def test_plugin_module( greeting_module: PluginModule[None], client: InvokerClient ): result = greeting_module.__wrap_invoke__( - InvokeOptions( + PluginInvokeOptions( uri=Uri.from_str("plugin/greeting"), method="greeting", args={"name": "Joe"}, client=client ), ) diff --git a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/errors.py b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/errors.py index ed4e1b0d..c25490d5 100644 --- a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/errors.py +++ b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/errors.py @@ -10,18 +10,18 @@ class UriResolutionError(Exception): class InfiniteLoopError(UriResolutionError): - """Raised when an infinite loop is detected while resolving a URI.""" + """Raised when an infinite loop is detected while resolving a URI. + + Args: + uri (Uri): The URI that caused the infinite loop. + history (List[UriResolutionStep]): The resolution history. + """ uri: Uri history: List[UriResolutionStep] def __init__(self, uri: Uri, history: List[UriResolutionStep]): - """Initialize a new InfiniteLoopError instance. - - Args: - uri (Uri): The URI that caused the infinite loop. - history (List[UriResolutionStep]): The resolution history. - """ + """Initialize a new InfiniteLoopError instance.""" self.uri = uri self.history = history super().__init__( @@ -35,21 +35,29 @@ class UriResolverExtensionError(UriResolutionError): class UriResolverExtensionNotFoundError(UriResolverExtensionError): - """Raised when an extension resolver wrapper could not be found for a URI.""" + """Raised when an extension resolver wrapper could not be found for a URI. + + Args: + uri (Uri): The URI that caused the error. + history (List[UriResolutionStep]): The resolution history. + """ uri: Uri history: List[UriResolutionStep] def __init__(self, uri: Uri, history: List[UriResolutionStep]): - """Initialize a new UriResolverExtensionNotFoundError instance. - - Args: - uri (Uri): The URI that caused the error. - history (List[UriResolutionStep]): The resolution history. - """ + """Initialize a new UriResolverExtensionNotFoundError instance.""" self.uri = uri self.history = history super().__init__( f"Could not find an extension resolver wrapper for the URI: {uri.uri}\n" f"History: {json.dumps(build_clean_uri_history(history), indent=2)}" ) + + +__all__ = [ + "UriResolutionError", + "InfiniteLoopError", + "UriResolverExtensionError", + "UriResolverExtensionNotFoundError", +] diff --git a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/abc/resolver_with_history.py b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/abc/resolver_with_history.py index 5755cf50..5cf67df6 100644 --- a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/abc/resolver_with_history.py +++ b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/abc/resolver_with_history.py @@ -70,3 +70,6 @@ def _try_resolve_uri( resolution_context (IUriResolutionContext[UriPackageOrWrapper]):\ The resolution context to update. """ + + +__all__ = ["ResolverWithHistory"] diff --git a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/aggregator/__init__.py b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/aggregator/__init__.py index dd95cc95..74139217 100644 --- a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/aggregator/__init__.py +++ b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/aggregator/__init__.py @@ -1,2 +1,3 @@ """This package contains the resolvers for aggregator resolvers.""" from .uri_resolver_aggregator import * +from .uri_resolver_aggregator_base import * diff --git a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/aggregator/uri_resolver_aggregator.py b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/aggregator/uri_resolver_aggregator.py index 4d6ecc3b..d27f57f4 100644 --- a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/aggregator/uri_resolver_aggregator.py +++ b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/aggregator/uri_resolver_aggregator.py @@ -13,7 +13,7 @@ class UriResolverAggregator(UriResolverAggregatorBase): the uri with each of them. If a resolver returns a value\ other than the resolving uri, the value is returned. - Attributes: + Args: resolvers (List[UriResolver]): The list of resolvers to aggregate. step_description (Optional[str]): The description of the resolution\ step. Defaults to the class name. @@ -27,13 +27,7 @@ class UriResolverAggregator(UriResolverAggregatorBase): def __init__( self, resolvers: List[UriResolver], step_description: Optional[str] = None ): - """Initialize a new UriResolverAggregator instance. - - Args: - resolvers (List[UriResolver]): The list of resolvers to aggregate. - step_description (Optional[str]): The description of the resolution\ - step. Defaults to the class name. - """ + """Initialize a new UriResolverAggregator instance.""" self._step_description = step_description or self.__class__.__name__ self._resolvers = resolvers super().__init__() @@ -47,3 +41,6 @@ def get_resolvers( ) -> List[UriResolver]: """Get the list of resolvers to aggregate.""" return self._resolvers + + +__all__ = ["UriResolverAggregator"] diff --git a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/aggregator/uri_resolver_aggregator_base.py b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/aggregator/uri_resolver_aggregator_base.py index 98d47488..53ceafb0 100644 --- a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/aggregator/uri_resolver_aggregator_base.py +++ b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/aggregator/uri_resolver_aggregator_base.py @@ -79,3 +79,6 @@ def try_resolve_uri( ) resolution_context.track_step(step) return uri + + +__all__ = ["UriResolverAggregatorBase"] diff --git a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/cache/resolution_result_cache_resolver.py b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/cache/resolution_result_cache_resolver.py index 247ccde2..cb3dd7d5 100644 --- a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/cache/resolution_result_cache_resolver.py +++ b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/cache/resolution_result_cache_resolver.py @@ -19,17 +19,22 @@ class ResolutionResultCacheResolver(UriResolver): The URI resolution result can be a URI, IWrapPackage, Wrapper, or Error. Errors are not cached by default and can be cached by setting the cache_errors option to True. - Attributes: + Args: resolver_to_cache (UriResolver): The URI resolver to cache. cache (ResolutionResultCache): The resolution result cache. - options (ResolutionResultCacheResolverOptions): The options to use. + cache_errors (bool): Whether to cache errors. """ __slots__ = ("resolver_to_cache", "cache", "cache_errors") resolver_to_cache: UriResolver + """The URI resolver to cache.""" + cache: ResolutionResultCache + """The resolution result cache.""" + cache_errors: bool + """Whether to cache errors.""" def __init__( self, @@ -37,13 +42,7 @@ def __init__( cache: ResolutionResultCache, cache_errors: bool = False, ): - """Initialize a new ResolutionResultCacheResolver instance. - - Args: - resolver_to_cache (UriResolver): The URI resolver to cache. - cache (ResolutionResultCache): The resolution result cache. - options (ResolutionResultCacheResolverOptions): The options to use. - """ + """Initialize a new ResolutionResultCacheResolver instance.""" self.resolver_to_cache = resolver_to_cache self.cache = cache self.cache_errors = cache_errors @@ -112,3 +111,6 @@ def try_resolve_uri( ) ) return result + + +__all__ = ["ResolutionResultCacheResolver"] diff --git a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/extensions/extendable_uri_resolver.py b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/extensions/extendable_uri_resolver.py index e2c27b9e..c89d931c 100644 --- a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/extensions/extendable_uri_resolver.py +++ b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/extensions/extendable_uri_resolver.py @@ -16,34 +16,32 @@ class ExtendableUriResolver(UriResolverAggregatorBase): The aggregated extension wrapper resolver is then used to resolve\ the uri to a wrapper. - Attributes: - DEFAULT_EXT_INTERFACE_URIS (List[Uri]): The default list of extension\ + Args: + ext_interface_uris (Optional[List[Uri]]): The list of extension\ + interface uris. Defaults to the default list of extension\ interface uris. - ext_interface_uris (List[Uri]): The list of extension interface uris. - resolver_name (str): The name of the resolver. + resolver_name (Optional[str]): The name of the resolver. Defaults\ + to the class name. """ DEFAULT_EXT_INTERFACE_URIS = [ Uri.from_str("wrap://ens/wraps.eth:uri-resolver-ext@1.1.0"), Uri.from_str("wrap://ens/wraps.eth:uri-resolver-ext@1.0.0"), ] + """The default list of extension interface uris.""" + ext_interface_uris: List[Uri] + """The list of extension interface uris.""" + resolver_name: str + """The name of the resolver.""" def __init__( self, ext_interface_uris: Optional[List[Uri]] = None, resolver_name: Optional[str] = None, ): - """Initialize a new ExtendableUriResolver instance. - - Args: - ext_interface_uris (Optional[List[Uri]]): The list of extension\ - interface uris. Defaults to the default list of extension\ - interface uris. - resolver_name (Optional[str]): The name of the resolver. Defaults\ - to the class name. - """ + """Initialize a new ExtendableUriResolver instance.""" self.ext_interface_uris = ext_interface_uris or self.DEFAULT_EXT_INTERFACE_URIS self.resolver_name = resolver_name or self.__class__.__name__ super().__init__() @@ -65,3 +63,6 @@ def get_resolvers( ) return [ExtensionWrapperUriResolver(uri) for uri in uri_resolvers_uris] + + +__all__ = ["ExtendableUriResolver"] diff --git a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/extensions/extension_wrapper_uri_resolver.py b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/extensions/extension_wrapper_uri_resolver.py index 5862b99a..54b09854 100644 --- a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/extensions/extension_wrapper_uri_resolver.py +++ b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/extensions/extension_wrapper_uri_resolver.py @@ -42,20 +42,17 @@ class ExtensionWrapperUriResolver(UriResolver): The extension wrapper is resolved using the extension wrapper uri resolver.\ The extension wrapper is then used to resolve the uri to a wrapper. - Attributes: + Args: extension_wrapper_uri (Uri): The uri of the extension wrapper. """ __slots__ = ("extension_wrapper_uri",) extension_wrapper_uri: Uri + """The uri of the extension wrapper.""" def __init__(self, extension_wrapper_uri: Uri): - """Initialize a new ExtensionWrapperUriResolver instance. - - Args: - extension_wrapper_uri (Uri): The uri of the extension wrapper. - """ + """Initialize a new ExtensionWrapperUriResolver instance.""" self.extension_wrapper_uri = extension_wrapper_uri def get_step_description(self) -> str: @@ -159,3 +156,6 @@ def _try_resolve_uri_with_extension( return UriPackage(uri=uri, package=package) return uri + + +__all__ = ["ExtensionWrapperUriResolver", "MaybeUriOrManifest"] diff --git a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/extensions/uri_resolver_extension_file_reader.py b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/extensions/uri_resolver_extension_file_reader.py index c5106917..b045248e 100644 --- a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/extensions/uri_resolver_extension_file_reader.py +++ b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/extensions/uri_resolver_extension_file_reader.py @@ -11,15 +11,20 @@ class UriResolverExtensionFileReader(FileReader): The extension wrapper is used to read files by invoking the getFile method.\ The getFile method is invoked with the path of the file to read. - Attributes: + Args: extension_uri (Uri): The uri of the extension wrapper. wrapper_uri (Uri): The uri of the wrapper that uses the extension wrapper. invoker (Invoker): The invoker used to invoke the getFile method. """ extension_uri: Uri + """The uri of the extension wrapper.""" + wrapper_uri: Uri + """The uri of the wrapper that uses the extension wrapper.""" + invoker: Invoker + """The invoker used to invoke the getFile method.""" def __init__( self, @@ -27,13 +32,7 @@ def __init__( wrapper_uri: Uri, invoker: Invoker, ): - """Initialize a new UriResolverExtensionFileReader instance. - - Args: - extension_uri (Uri): The uri of the extension wrapper. - wrapper_uri (Uri): The uri of the wrapper that uses the extension wrapper. - invoker (Invoker): The invoker used to invoke the getFile method. - """ + """Initialize a new UriResolverExtensionFileReader instance.""" self.extension_uri = extension_uri self.wrapper_uri = wrapper_uri self.invoker = invoker @@ -57,3 +56,6 @@ def read_file(self, file_path: str) -> bytes: f"File not found at path: {path}, using resolver: {self.extension_uri}" ) return result + + +__all__ = ["UriResolverExtensionFileReader"] diff --git a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/legacy/base_resolver.py b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/legacy/base_resolver.py index fd3c8582..ec372fac 100644 --- a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/legacy/base_resolver.py +++ b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/legacy/base_resolver.py @@ -15,18 +15,18 @@ class BaseUriResolver(UriResolver): - """Defines the base URI resolver.""" + """Defines the base URI resolver. + + Args: + file_reader (FileReader): The file reader to use. + redirects (Dict[Uri, Uri]): The redirects to use. + """ _fs_resolver: FsUriResolver _redirect_resolver: RedirectUriResolver def __init__(self, file_reader: FileReader, redirects: Dict[Uri, Uri]): - """Initialize a new BaseUriResolver instance. - - Args: - file_reader (FileReader): The file reader to use. - redirects (Dict[Uri, Uri]): The redirects to use. - """ + """Initialize a new BaseUriResolver instance.""" self._fs_resolver = FsUriResolver(file_reader) self._redirect_resolver = RedirectUriResolver(redirects) @@ -53,3 +53,6 @@ def try_resolve_uri( return self._fs_resolver.try_resolve_uri( redirected_uri, client, resolution_context ) + + +__all__ = ["BaseUriResolver"] diff --git a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/legacy/fs_resolver.py b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/legacy/fs_resolver.py index ade7ff60..87c738bb 100644 --- a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/legacy/fs_resolver.py +++ b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/legacy/fs_resolver.py @@ -31,16 +31,16 @@ def read_file(self, file_path: str) -> bytes: class FsUriResolver(UriResolver): - """Defines a URI resolver that resolves file system URIs.""" + """Defines a URI resolver that resolves file system URIs. + + Args: + file_reader (FileReader): The file reader used to read files. + """ file_reader: FileReader def __init__(self, file_reader: FileReader): - """Initialize a new FsUriResolver instance. - - Args: - file_reader (FileReader): The file reader used to read files. - """ + """Initialize a new FsUriResolver instance.""" self.file_reader = file_reader def try_resolve_uri( @@ -76,3 +76,6 @@ def try_resolve_uri( file_reader=self.file_reader, ), ) + + +__all__ = ["FsUriResolver", "SimpleFileReader"] diff --git a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/legacy/package_to_wrapper_resolver.py b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/legacy/package_to_wrapper_resolver.py index 7cc45eea..23c96768 100644 --- a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/legacy/package_to_wrapper_resolver.py +++ b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/legacy/package_to_wrapper_resolver.py @@ -21,7 +21,7 @@ class PackageToWrapperResolverOptions: """Defines the options for the PackageToWrapperResolver. - Attributes: + Args: deserialize_manifest_options (DeserializeManifestOptions): The options\ to use when deserializing the manifest. """ @@ -37,7 +37,7 @@ class PackageToWrapperResolver(ResolverWithHistory): If result is a wrapper, it returns it back.\ In case of a package, it creates a wrapper and returns it back. - Attributes: + Args: resolver (UriResolver): The URI resolver to cache. options (PackageToWrapperResolverOptions): The options to use. """ @@ -50,12 +50,7 @@ def __init__( resolver: UriResolver, options: Optional[PackageToWrapperResolverOptions] = None, ) -> None: - """Initialize a new PackageToWrapperResolver instance. - - Args: - resolver (UriResolver): The URI resolver to cache. - options (PackageToWrapperResolverOptions): The options to use. - """ + """Initialize a new PackageToWrapperResolver instance.""" self.resolver = resolver self.options = options super().__init__() @@ -100,3 +95,6 @@ def get_step_description(self) -> str: str: The description of the resolution step. """ return self.__class__.__name__ + + +__all__ = ["PackageToWrapperResolver", "PackageToWrapperResolverOptions"] diff --git a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/legacy/redirect_resolver.py b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/legacy/redirect_resolver.py index 3e34ab67..5b46d97c 100644 --- a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/legacy/redirect_resolver.py +++ b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/legacy/redirect_resolver.py @@ -5,16 +5,16 @@ class RedirectUriResolver(UriResolver): - """Defines the redirect URI resolver.""" + """Defines the redirect URI resolver. + + Args: + redirects (Dict[Uri, Uri]): The redirects to use. + """ _redirects: Dict[Uri, Uri] def __init__(self, redirects: Dict[Uri, Uri]): - """Initialize a new RedirectUriResolver instance. - - Args: - redirects (Dict[Uri, Uri]): The redirects to use. - """ + """Initialize a new RedirectUriResolver instance.""" self._redirects = redirects def try_resolve_uri( @@ -34,3 +34,6 @@ def try_resolve_uri( Uri: The resolved URI. """ return self._redirects[uri] if uri in self._redirects else uri + + +__all__ = ["RedirectUriResolver"] diff --git a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/legacy/wrapper_cache/in_memory_wrapper_cache.py b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/legacy/wrapper_cache/in_memory_wrapper_cache.py index 16975e64..cd61684a 100644 --- a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/legacy/wrapper_cache/in_memory_wrapper_cache.py +++ b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/legacy/wrapper_cache/in_memory_wrapper_cache.py @@ -7,13 +7,11 @@ class InMemoryWrapperCache(WrapperCache): - """InMemoryWrapperCache is an in-memory implementation of the wrapper cache interface. - - Attributes: - map (Dict[Uri, UriWrapper]): The map of uris to wrappers. - """ + """InMemoryWrapperCache is an in-memory implementation\ + of the wrapper cache interface.""" map: Dict[Uri, UriWrapper] + """The map of uris to wrappers.""" def __init__(self): """Initialize a new InMemoryWrapperCache instance.""" @@ -26,3 +24,6 @@ def get(self, uri: Uri) -> Union[UriWrapper, None]: def set(self, uri: Uri, wrapper: UriWrapper) -> None: """Set a wrapper in the cache by its uri.""" self.map[uri] = wrapper + + +__all__ = ["InMemoryWrapperCache"] diff --git a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/legacy/wrapper_cache/wrapper_cache.py b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/legacy/wrapper_cache/wrapper_cache.py index 9825b59b..89ab55cf 100644 --- a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/legacy/wrapper_cache/wrapper_cache.py +++ b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/legacy/wrapper_cache/wrapper_cache.py @@ -18,3 +18,6 @@ def get(self, uri: Uri) -> Union[UriWrapper, None]: @abstractmethod def set(self, uri: Uri, wrapper: UriWrapper) -> None: """Set a wrapper in the cache by its uri.""" + + +__all__ = ["WrapperCache"] diff --git a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/legacy/wrapper_cache_resolver.py b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/legacy/wrapper_cache_resolver.py index 08ac0748..e6498274 100644 --- a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/legacy/wrapper_cache_resolver.py +++ b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/legacy/wrapper_cache_resolver.py @@ -20,7 +20,7 @@ class WrapperCacheResolverOptions: """Defines the options for the WrapperCacheResolver. - Attributes: + Args: deserialize_manifest_options (DeserializeManifestOptions): The options\ to use when deserializing the manifest. end_on_redirect (Optional[bool]): Whether to end the resolution\ @@ -38,10 +38,10 @@ class WrapperCacheResolver(UriResolver): If result is an uri or package, it returns it back without caching.\ If result is a wrapper, it caches the wrapper and returns it back. - Attributes: + Args: resolver_to_cache (UriResolver): The URI resolver to cache. cache (WrapperCache): The cache to use. - options (CacheResolverOptions): The options to use. + options (Optional[WrapperCacheResolverOptions]): The options to use. """ __slots__ = ("resolver_to_cache", "cache", "options") @@ -56,13 +56,7 @@ def __init__( cache: WrapperCache, options: Optional[WrapperCacheResolverOptions] = None, ): - """Initialize a new PackageToWrapperCacheResolver instance. - - Args: - resolver_to_cache (UriResolver): The URI resolver to cache. - cache (WrapperCache): The cache to use. - options (CacheResolverOptions): The options to use. - """ + """Initialize a new PackageToWrapperCacheResolver instance.""" self.resolver_to_cache = resolver_to_cache self.cache = cache self.options = options @@ -129,3 +123,6 @@ def try_resolve_uri( ) ) return result + + +__all__ = ["WrapperCacheResolver", "WrapperCacheResolverOptions"] diff --git a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/package/package_resolver.py b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/package/package_resolver.py index 496aa659..abb82b4f 100644 --- a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/package/package_resolver.py +++ b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/package/package_resolver.py @@ -12,7 +12,12 @@ class PackageResolver(ResolverWithHistory): - """Defines a resolver that resolves a uri to a package.""" + """Defines a resolver that resolves a uri to a package. + + Args: + uri (Uri): The uri to resolve. + package (WrapPackage): The wrap package to return. + """ __slots__ = ("uri", "package") @@ -20,12 +25,7 @@ class PackageResolver(ResolverWithHistory): package: WrapPackage def __init__(self, uri: Uri, package: WrapPackage): - """Initialize a new PackageResolver instance. - - Args: - uri (Uri): The uri to resolve. - package (WrapPackage): The wrap package to return. - """ + """Initialize a new PackageResolver instance.""" self.uri = uri self.package = package super().__init__() @@ -61,3 +61,6 @@ def _try_resolve_uri( UriPackageOrWrapper: The resolved URI package, wrapper, or URI. """ return uri if uri != self.uri else UriPackage(uri=uri, package=self.package) + + +__all__ = ["PackageResolver"] diff --git a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/recursive/recursive_resolver.py b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/recursive/recursive_resolver.py index 06a69e13..6b4f05bb 100644 --- a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/recursive/recursive_resolver.py +++ b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/recursive/recursive_resolver.py @@ -25,11 +25,7 @@ class RecursiveResolver(UriResolver): resolver: UriResolver def __init__(self, resolver: UriResolver): - """Initialize a new RecursiveResolver instance. - - Args: - resolver (UriResolver): The resolver to use. - """ + """Initialize a new RecursiveResolver instance.""" self.resolver = resolver def try_resolve_uri( @@ -67,3 +63,6 @@ def try_resolve_uri( resolution_context.stop_resolving(uri) return uri_package_or_wrapper + + +__all__ = ["RecursiveResolver"] diff --git a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/redirect/redirect_resolver.py b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/redirect/redirect_resolver.py index 837d53ed..5bf2ae7d 100644 --- a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/redirect/redirect_resolver.py +++ b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/redirect/redirect_resolver.py @@ -11,7 +11,7 @@ class RedirectResolver(ResolverWithHistory): uri to redirect from, the uri to redirect to is returned. Otherwise, the uri to resolve\ is returned. - Attributes: + Args: from_uri (Uri): The uri to redirect from. to_uri (Uri): The uri to redirect to. """ @@ -22,12 +22,7 @@ class RedirectResolver(ResolverWithHistory): to_uri: Uri def __init__(self, from_uri: Uri, to_uri: Uri) -> None: - """Initialize a new RedirectResolver instance. - - Args: - from_uri (Uri): The uri to redirect from. - to_uri (Uri): The uri to redirect to. - """ + """Initialize a new RedirectResolver instance.""" self.from_uri = from_uri self.to_uri = to_uri super().__init__() @@ -61,3 +56,6 @@ def _try_resolve_uri( UriPackageOrWrapper: The resolved URI package, wrapper, or URI. """ return uri if uri != self.from_uri else self.to_uri + + +__all__ = ["RedirectResolver"] diff --git a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/static/static_resolver.py b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/static/static_resolver.py index cd1db81d..4a2e9e09 100644 --- a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/static/static_resolver.py +++ b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/static/static_resolver.py @@ -16,7 +16,7 @@ class StaticResolver(UriResolver): """Defines the static URI resolver. - Attributes: + Args: uri_map (StaticResolverLike): The URI map to use. """ @@ -25,11 +25,7 @@ class StaticResolver(UriResolver): uri_map: StaticResolverLike def __init__(self, uri_map: StaticResolverLike): - """Initialize a new StaticResolver instance. - - Args: - uri_map (StaticResolverLike): The URI map to use. - """ + """Initialize a new StaticResolver instance.""" self.uri_map = uri_map def try_resolve_uri( @@ -69,3 +65,6 @@ def try_resolve_uri( ) resolution_context.track_step(step) return uri_package_or_wrapper + + +__all__ = ["StaticResolver"] diff --git a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/wrapper/wrapper_resolver.py b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/wrapper/wrapper_resolver.py index 4d39d230..fdd97983 100644 --- a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/wrapper/wrapper_resolver.py +++ b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/resolvers/wrapper/wrapper_resolver.py @@ -14,7 +14,7 @@ class WrapperResolver(ResolverWithHistory): """Defines the wrapper resolver. - Attributes: + Args: uri (Uri): The uri to resolve. wrapper (Wrapper): The wrapper to use. """ @@ -25,12 +25,7 @@ class WrapperResolver(ResolverWithHistory): wrapper: Wrapper def __init__(self, uri: Uri, wrapper: Wrapper): - """Initialize a new WrapperResolver instance. - - Args: - uri (Uri): The uri to resolve. - wrapper (Wrapper): The wrapper to use. - """ + """Initialize a new WrapperResolver instance.""" self.uri = uri self.wrapper = wrapper super().__init__() @@ -60,3 +55,6 @@ def _try_resolve_uri( UriPackageOrWrapper: The resolved URI, wrap package, or wrapper. """ return uri if uri != self.uri else UriWrapper(uri=uri, wrapper=self.wrapper) + + +__all__ = ["WrapperResolver"] diff --git a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/types/__init__.py b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/types/__init__.py index b5019260..eab11c6a 100644 --- a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/types/__init__.py +++ b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/types/__init__.py @@ -1,5 +1,3 @@ """This package contains the types used by the polywrap-uri-resolvers package.""" from .cache import * from .static_resolver_like import * -from .uri_redirect import * -from .uri_resolver_like import * diff --git a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/types/cache/resolution_result_cache/in_memory_resolution_result_cache.py b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/types/cache/resolution_result_cache/in_memory_resolution_result_cache.py index 035833e6..780b15f8 100644 --- a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/types/cache/resolution_result_cache/in_memory_resolution_result_cache.py +++ b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/types/cache/resolution_result_cache/in_memory_resolution_result_cache.py @@ -9,14 +9,10 @@ class InMemoryResolutionResultCache(ResolutionResultCache): """InMemoryResolutionResultCache is an in-memory implementation \ - of the resolution result cache interface. - - Attributes: - map (Dict[Uri, Union[UriPackageOrWrapper, UriResolutionError]]):\ - The map of uris to resolution result. - """ + of the resolution result cache protocol.""" map: Dict[Uri, Union[UriPackageOrWrapper, UriResolutionError]] + """The map of uris to resolution result.""" def __init__(self): """Initialize a new InMemoryResolutionResultCache instance.""" @@ -35,3 +31,6 @@ def set( def __str__(self) -> str: """Display cache as a string.""" return f"{self.map}" + + +__all__ = ["InMemoryResolutionResultCache"] diff --git a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/types/cache/resolution_result_cache/resolution_result_cache.py b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/types/cache/resolution_result_cache/resolution_result_cache.py index 154eb71c..15534198 100644 --- a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/types/cache/resolution_result_cache/resolution_result_cache.py +++ b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/types/cache/resolution_result_cache/resolution_result_cache.py @@ -8,7 +8,7 @@ class ResolutionResultCache(Protocol): - """Defines a cache interface for caching resolution results by uri. + """Defines a cache protocol for caching resolution results by uri. This is used by the resolution result resolver to cache resolution results\ for a given uri. @@ -27,3 +27,6 @@ def set( def __str__(self) -> str: """Display cache as a string.""" ... + + +__all__ = ["ResolutionResultCache"] diff --git a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/types/uri_redirect.py b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/types/uri_redirect.py deleted file mode 100644 index 27268492..00000000 --- a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/types/uri_redirect.py +++ /dev/null @@ -1,17 +0,0 @@ -"""This module contains the UriRedirect type.""" -from dataclasses import dataclass - -from polywrap_core import Uri - - -@dataclass(slots=True, kw_only=True) -class UriRedirect: - """UriRedirect is a type that represents a redirect from one uri to another. - - Attributes: - from_uri (Uri): The uri to redirect from. - to_uri (Uri): The uri to redirect to. - """ - - from_uri: Uri - to_uri: Uri diff --git a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/types/uri_resolver_like.py b/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/types/uri_resolver_like.py deleted file mode 100644 index 2a64d1ba..00000000 --- a/packages/polywrap-uri-resolvers/polywrap_uri_resolvers/types/uri_resolver_like.py +++ /dev/null @@ -1,29 +0,0 @@ -"""This module contains the type definition for UriResolverLike. - -UriResolverLike is a type that represents a union of types\ - that can be used as a UriResolver. - ->>> UriResolverLike = Union[ -... StaticResolverLike, -... UriPackageOrWrapper, -... UriRedirect, -... UriResolver, -... List[UriResolverLike], -... ] -""" -from __future__ import annotations - -from typing import List, Union - -from polywrap_core import UriPackageOrWrapper, UriResolver - -from .static_resolver_like import StaticResolverLike -from .uri_redirect import UriRedirect - -UriResolverLike = Union[ - StaticResolverLike, - UriPackageOrWrapper, - UriRedirect, - UriResolver, - List["UriResolverLike"], -] diff --git a/packages/polywrap-uri-resolvers/tests/integration/extension_resolver/mocker.py b/packages/polywrap-uri-resolvers/tests/integration/extension_resolver/mocker.py index 6108f930..62b39297 100644 --- a/packages/polywrap-uri-resolvers/tests/integration/extension_resolver/mocker.py +++ b/packages/polywrap-uri-resolvers/tests/integration/extension_resolver/mocker.py @@ -1,13 +1,12 @@ import os -from typing import Dict, Optional -from polywrap_core import Any, InvokerClient, Uri, UriPackage +from typing import Any, Dict, Optional +from polywrap_core import InvokerClient, Uri, UriPackage from polywrap_plugin import PluginModule, PluginPackage -from polywrap_uri_resolvers import ( - MaybeUriOrManifest, - WasmPackage, -) from polywrap_test_cases import get_path_to_test_wrappers +from polywrap_uri_resolvers import MaybeUriOrManifest +from polywrap_wasm import WasmPackage + class MockPluginExtensionResolver(PluginModule[None]): URI = Uri.from_str("wrap://package/test-resolver") diff --git a/packages/polywrap-uri-resolvers/tests/integration/resolution_result_cache_resolver/conftest.py b/packages/polywrap-uri-resolvers/tests/integration/resolution_result_cache_resolver/conftest.py index 1ceebe11..cb436ee7 100644 --- a/packages/polywrap-uri-resolvers/tests/integration/resolution_result_cache_resolver/conftest.py +++ b/packages/polywrap-uri-resolvers/tests/integration/resolution_result_cache_resolver/conftest.py @@ -8,13 +8,13 @@ UriResolutionStep, UriWrapper, UriPackage, + UriResolver, ) from polywrap_client import PolywrapClient from polywrap_uri_resolvers import ( RecursiveResolver, ResolutionResultCacheResolver, UriResolutionError, - UriResolver, InMemoryResolutionResultCache, ) diff --git a/packages/polywrap-wasm/polywrap_wasm/buffer.py b/packages/polywrap-wasm/polywrap_wasm/buffer.py index d61f8f65..0593403f 100644 --- a/packages/polywrap-wasm/polywrap_wasm/buffer.py +++ b/packages/polywrap-wasm/polywrap_wasm/buffer.py @@ -20,10 +20,10 @@ def read_bytes( """Read bytes from a memory buffer. Args: - memory_pointer: The pointer to the memory buffer. - memory_length: The length of the memory buffer. - offset: The offset to start reading from. - length: The number of bytes to read. + memory_pointer (BufferPointer): The pointer to the memory buffer. + memory_length (int): The length of the memory buffer. + offset (Optional[int]): The offset to start reading from. + length (Optional[int]): The number of bytes to read. """ result = bytearray(memory_length) buffer = (ctypes.c_ubyte * memory_length).from_buffer(result) @@ -38,10 +38,10 @@ def read_string( """Read a UTF-8 encoded string from a memory buffer. Args: - memory_pointer: The pointer to the memory buffer. - memory_length: The length of the memory buffer. - offset: The offset to start reading from. - length: The number of bytes to read. + memory_pointer (BufferPointer): The pointer to the memory buffer. + memory_length (int): The length of the memory buffer. + offset (int): The offset to start reading from. + length (int): The number of bytes to read. """ value = read_bytes(memory_pointer, memory_length, offset, length) return value.decode("utf-8") @@ -56,10 +56,10 @@ def write_bytes( """Write bytes to a memory buffer. Args: - memory_pointer: The pointer to the memory buffer. - memory_length: The length of the memory buffer. - value: The bytes to write. - value_offset: The offset to start writing to. + memory_pointer (BufferPointer): The pointer to the memory buffer. + memory_length (int): The length of the memory buffer. + value (bytes): The bytes to write. + value_offset (int): The offset to start writing to. """ mem_cpy(memory_pointer, memory_length, bytearray(value), len(value), value_offset) @@ -73,10 +73,10 @@ def write_string( """Write a UTF-8 encoded string to a memory buffer. Args: - memory_pointer: The pointer to the memory buffer. - memory_length: The length of the memory buffer. - value: The string to write. - value_offset: The offset to start writing to. + memory_pointer (BufferPointer): The pointer to the memory buffer. + memory_length (int): The length of the memory buffer. + value (str): The string to write. + value_offset (int): The offset to start writing to. """ value_buffer = value.encode("utf-8") write_bytes( @@ -97,11 +97,11 @@ def mem_cpy( """Copy bytearray from the given value to a memory buffer. Args: - memory_pointer: The pointer to the memory buffer. - memory_length: The length of the memory buffer. - value: The bytearray to copy. - value_length: The length of the bytearray to copy. - value_offset: The offset to start copying from. + memory_pointer (BufferPointer): The pointer to the memory buffer. + memory_length (int): The length of the memory buffer. + value (bytearray): The bytearray to copy. + value_length (int): The length of the bytearray to copy. + value_offset (int): The offset to start copying from. """ current_value = bytearray( read_bytes( diff --git a/packages/polywrap-wasm/polywrap_wasm/constants.py b/packages/polywrap-wasm/polywrap_wasm/constants.py index 3fcc99cd..67ccd309 100644 --- a/packages/polywrap-wasm/polywrap_wasm/constants.py +++ b/packages/polywrap-wasm/polywrap_wasm/constants.py @@ -1,5 +1,9 @@ """This module contains the constants used by polywrap-wasm package.""" + WRAP_MANIFEST_PATH = "wrap.info" +"""Default path to the wrap manifest file.""" + WRAP_MODULE_PATH = "wrap.wasm" +"""Default path to the wrap module file.""" __all__ = ["WRAP_MANIFEST_PATH", "WRAP_MODULE_PATH"] diff --git a/packages/polywrap-wasm/polywrap_wasm/exports.py b/packages/polywrap-wasm/polywrap_wasm/exports.py index 12f13e6d..0e5d0516 100644 --- a/packages/polywrap-wasm/polywrap_wasm/exports.py +++ b/packages/polywrap-wasm/polywrap_wasm/exports.py @@ -7,10 +7,14 @@ class WrapExports: """WrapExports is a class that contains the exports of the Wasm wrapper module. - Attributes: - _instance: The Wasm instance. - _store: The Wasm store. - _wrap_invoke: exported _wrap_invoke Wasm function. + Args: + instance (Instance): The Wasm instance. + store (Store): The Wasm store. + _wrap_invoke (Func): The exported _wrap_invoke Wasm function. + + Raises: + WasmExportNotFoundError: If the _wrap_invoke function is not exported\ + from the Wasm module. """ _instance: Instance @@ -18,15 +22,7 @@ class WrapExports: _wrap_invoke: Func def __init__(self, instance: Instance, store: Store): - """Initialize the WrapExports class. - - Args: - instance: The Wasm instance. - store: The Wasm store. - - Raises: - ExportNotFoundError: if the _wrap_invoke export is not found in the Wasm module. - """ + """Initialize the WrapExports class.""" self._instance = instance self._store = store exports = instance.exports(store) @@ -43,9 +39,9 @@ def __wrap_invoke__( """Call the exported _wrap_invoke Wasm function. Args: - method_length: The length of the method. - args_length: The length of the args. - env_length: The length of the env. + method_length (int): The length of the method. + args_length (int): The length of the args. + env_length (int): The length of the env. Returns: True if the invoke call was successful, False otherwise. diff --git a/packages/polywrap-wasm/polywrap_wasm/imports/abort.py b/packages/polywrap-wasm/polywrap_wasm/imports/abort.py index 0d0d5df0..1b92325a 100644 --- a/packages/polywrap-wasm/polywrap_wasm/imports/abort.py +++ b/packages/polywrap-wasm/polywrap_wasm/imports/abort.py @@ -19,12 +19,12 @@ def wrap_abort( """Abort the Wasm module and raise an exception. Args: - msg_ptr: The pointer to the message string in memory. - msg_len: The length of the message string in memory. - file_ptr: The pointer to the filename string in memory. - file_len: The length of the filename string in memory. - line: The line of the file at where the abort occured. - column: The column of the file at where the abort occured. + msg_ptr (int): The pointer to the message string in memory. + msg_len (int): The length of the message string in memory. + file_ptr (int): The pointer to the filename string in memory. + file_len (int): The length of the filename string in memory. + line (int): The line of the file at where the abort occured. + column (int): The column of the file at where the abort occured. Raises: WasmAbortError: since the Wasm module aborted during invocation. diff --git a/packages/polywrap-wasm/polywrap_wasm/imports/debug.py b/packages/polywrap-wasm/polywrap_wasm/imports/debug.py index 36755e32..1a75b1ea 100644 --- a/packages/polywrap-wasm/polywrap_wasm/imports/debug.py +++ b/packages/polywrap-wasm/polywrap_wasm/imports/debug.py @@ -9,8 +9,8 @@ def wrap_debug_log(self, msg_ptr: int, msg_len: int) -> None: """Print the transmitted message from the Wasm module to host stdout. Args: - ptr: The pointer to the message string in memory. - len: The length of the message string in memory. + msg_ptr (int): The pointer to the message string in memory. + msg_len (int): The length of the message string in memory. """ msg = self.read_string(msg_ptr, msg_len) print(msg) diff --git a/packages/polywrap-wasm/polywrap_wasm/imports/env.py b/packages/polywrap-wasm/polywrap_wasm/imports/env.py index df7d78b7..bf40ea91 100644 --- a/packages/polywrap-wasm/polywrap_wasm/imports/env.py +++ b/packages/polywrap-wasm/polywrap_wasm/imports/env.py @@ -12,7 +12,7 @@ def wrap_load_env(self, ptr: int) -> None: """Write the env in the shared memory at Wasm allocated empty env slot. Args: - ptr: The pointer to the empty env slot in memory. + ptr (int): The pointer to the empty env slot in memory. Raises: WasmAbortError: if the env is not set from the host. diff --git a/packages/polywrap-wasm/polywrap_wasm/imports/get_implementations.py b/packages/polywrap-wasm/polywrap_wasm/imports/get_implementations.py index 994ff671..c8b95c31 100644 --- a/packages/polywrap-wasm/polywrap_wasm/imports/get_implementations.py +++ b/packages/polywrap-wasm/polywrap_wasm/imports/get_implementations.py @@ -15,8 +15,8 @@ def wrap_get_implementations(self, uri_ptr: int, uri_len: int) -> bool: from the invoker and store it in the state. Args: - uri_ptr: The pointer to the interface URI bytes in memory. - uri_len: The length of the interface URI bytes in memory. + uri_ptr (int): The pointer to the interface URI bytes in memory. + uri_len (int): The length of the interface URI bytes in memory. """ uri = Uri.from_str( self.read_string( diff --git a/packages/polywrap-wasm/polywrap_wasm/imports/invoke.py b/packages/polywrap-wasm/polywrap_wasm/imports/invoke.py index 045cdf01..1e3f49d3 100644 --- a/packages/polywrap-wasm/polywrap_wasm/imports/invoke.py +++ b/packages/polywrap-wasm/polywrap_wasm/imports/invoke.py @@ -14,8 +14,8 @@ def wrap_invoke_args(self, method_ptr: int, args_ptr: int) -> None: at Wasm allocated empty method and args slots. Args: - method_ptr: The pointer to the empty method name string slot in memory. - args_ptr: The pointer to the empty method args bytes slot in memory. + method_ptr (int): The pointer to the empty method name string slot in memory. + args_ptr (int): The pointer to the empty method args bytes slot in memory. Raises: WasmAbortError: if the method or args are not set from the host. @@ -41,8 +41,8 @@ def wrap_invoke_result(self, ptr: int, length: int) -> None: in the shared memory by the Wasm module in the state. Args: - ptr: The pointer to the result bytes in memory. - length: The length of the result bytes in memory. + ptr (int): The pointer to the result bytes in memory. + length (int): The length of the result bytes in memory. """ result = self.read_bytes( ptr, @@ -55,8 +55,8 @@ def wrap_invoke_error(self, ptr: int, length: int): in the shared memory by the Wasm module in the state. Args: - ptr: The pointer to the error string in memory. - length: The length of the error string in memory. + ptr (int): The pointer to the error string in memory. + length (int): The length of the error string in memory. """ error = self.read_string( ptr, diff --git a/packages/polywrap-wasm/polywrap_wasm/imports/subinvoke.py b/packages/polywrap-wasm/polywrap_wasm/imports/subinvoke.py index a1cdd5aa..126c1f85 100644 --- a/packages/polywrap-wasm/polywrap_wasm/imports/subinvoke.py +++ b/packages/polywrap-wasm/polywrap_wasm/imports/subinvoke.py @@ -21,12 +21,12 @@ def wrap_subinvoke( """Subinvoke a function of any wrapper from the Wasm module. Args: - uri_ptr: The pointer to the uri string in memory. - uri_len: The length of the uri string in memory. - method_ptr: The pointer to the method string in memory. - method_len: The length of the method string in memory. - args_ptr: The pointer to the args bytes in memory. - args_len: The length of the args bytes in memory. + uri_ptr (int): The pointer to the uri string in memory. + uri_len (int): The length of the uri string in memory. + method_ptr (int): The pointer to the method string in memory. + method_len (int): The length of the method string in memory. + args_ptr (int): The pointer to the args bytes in memory. + args_len (int): The length of the args bytes in memory. Returns: True if the subinvocation was successful, False otherwise. @@ -68,7 +68,7 @@ def wrap_subinvoke_result(self, ptr: int) -> None: """Write the result of the subinvocation to shared memory. Args: - ptr: The pointer to the empty result bytes slot in memory. + ptr (int): The pointer to the empty result bytes slot in memory. """ result = self._get_subinvoke_result("__wrap_subinvoke_result") self.write_bytes(ptr, result) @@ -84,7 +84,7 @@ def wrap_subinvoke_error(self, ptr: int) -> None: at pointer to the Wasm allocated empty error message slot. Args: - ptr: The pointer to the empty error message slot in memory. + ptr (int): The pointer to the empty error message slot in memory. """ error = self._get_subinvoke_error("__wrap_subinvoke_error") error_message = repr(error) diff --git a/packages/polywrap-wasm/polywrap_wasm/imports/wrap_imports.py b/packages/polywrap-wasm/polywrap_wasm/imports/wrap_imports.py index 7246dbf6..33e9485f 100644 --- a/packages/polywrap-wasm/polywrap_wasm/imports/wrap_imports.py +++ b/packages/polywrap-wasm/polywrap_wasm/imports/wrap_imports.py @@ -29,11 +29,17 @@ class WrapImports( This class is responsible for providing all the Wasm imports to the Wasm module. + Args: + memory (Memory): The Wasm memory instance. + store (Store): The Wasm store instance. + state (State): The state of the Wasm module. + invoker (Invoker): The invoker instance. + Attributes: - memory: The Wasm memory instance. - store: The Wasm store instance. - state: The state of the Wasm module. - invoker: The invoker instance. + memory (Memory): The Wasm memory instance. + store (Store): The Wasm store instance. + state (State): The state of the Wasm module. + invoker (Invoker): The invoker instance. """ def __init__( @@ -43,14 +49,7 @@ def __init__( state: State, invoker: Optional[Invoker], ) -> None: - """Initialize the WrapImports instance. - - Args: - memory: The Wasm memory instance. - store: The Wasm store instance. - state: The state of the Wasm module. - invoker: The invoker instance. - """ + """Initialize the WrapImports instance.""" self.memory = memory self.store = store self.state = state diff --git a/packages/polywrap-wasm/polywrap_wasm/inmemory_file_reader.py b/packages/polywrap-wasm/polywrap_wasm/inmemory_file_reader.py index da5c90d5..24e916b4 100644 --- a/packages/polywrap-wasm/polywrap_wasm/inmemory_file_reader.py +++ b/packages/polywrap-wasm/polywrap_wasm/inmemory_file_reader.py @@ -7,13 +7,14 @@ class InMemoryFileReader(FileReader): - """InMemoryFileReader is an implementation of the IFileReader interface\ + """InMemoryFileReader is an implementation of the FileReader protocol\ that reads files from memory. - Attributes: - _wasm_module: The Wasm module file of the wrapper. - _wasm_manifest: The manifest of the wrapper. - _base_file_reader: The base file reader used to read any files. + Args: + base_file_reader (FileReader): The base file reader\ + used to read any files. + wasm_module (Optional[bytes]): The Wasm module file of the wrapper. + wasm_manifest (Optional[bytes]): The manifest of the wrapper. """ _wasm_manifest: Optional[bytes] diff --git a/packages/polywrap-wasm/polywrap_wasm/instance.py b/packages/polywrap-wasm/polywrap_wasm/instance.py index c1f4de53..090113b8 100644 --- a/packages/polywrap-wasm/polywrap_wasm/instance.py +++ b/packages/polywrap-wasm/polywrap_wasm/instance.py @@ -19,10 +19,10 @@ def create_instance( """Create a Wasm instance for a Wasm module. Args: - store: The Wasm store. - module: The Wasm module. - state: The state of the Wasm module. - invoker: The invoker to use for subinvocations. + store (Store): The Wasm store. + module (bytes): The Wasm module. + state (State): The state of the Wasm module. + invoker (Optional[Invoker]): The invoker to use for subinvocations. Returns: Instance: The Wasm instance. diff --git a/packages/polywrap-wasm/polywrap_wasm/linker/wrap_linker.py b/packages/polywrap-wasm/polywrap_wasm/linker/wrap_linker.py index 04da52fd..0b00600f 100644 --- a/packages/polywrap-wasm/polywrap_wasm/linker/wrap_linker.py +++ b/packages/polywrap-wasm/polywrap_wasm/linker/wrap_linker.py @@ -25,18 +25,17 @@ class WrapLinker( This class is responsible for linking all the Wasm imports to the Wasm module. + Args: + linker: The Wasm linker instance. + wrap_imports: The Wasm imports instance. + Attributes: linker: The Wasm linker instance. wrap_imports: The Wasm imports instance. """ def __init__(self, linker: Linker, wrap_imports: WrapImports) -> None: - """Initialize the WrapLinker instance. - - Args: - linker: The Wasm linker instance. - wrap_imports: The Wasm imports instance. - """ + """Initialize the WrapLinker instance.""" self.linker = linker self.wrap_imports = wrap_imports diff --git a/packages/polywrap-wasm/polywrap_wasm/memory.py b/packages/polywrap-wasm/polywrap_wasm/memory.py index 3dd34404..071cc7c9 100644 --- a/packages/polywrap-wasm/polywrap_wasm/memory.py +++ b/packages/polywrap-wasm/polywrap_wasm/memory.py @@ -14,8 +14,8 @@ def create_memory( """Create a host allocated shared memory instance for a Wasm module. Args: - store: The Wasm store. - module: The Wasm module. + store (Store): The Wasm store. + module (bytes): The Wasm module. Raises: WasmMemoryError: if the memory import is not found in the Wasm module. diff --git a/packages/polywrap-wasm/polywrap_wasm/types/__init__.py b/packages/polywrap-wasm/polywrap_wasm/types/__init__.py index 80b0f679..d5fa8523 100644 --- a/packages/polywrap-wasm/polywrap_wasm/types/__init__.py +++ b/packages/polywrap-wasm/polywrap_wasm/types/__init__.py @@ -1,2 +1,4 @@ """This module contains the core types, interfaces, and utilities of polywrap-wasm package.""" +from .invoke_result import * from .state import * +from .wasm_invoke_options import * diff --git a/packages/polywrap-wasm/polywrap_wasm/types/invoke_result.py b/packages/polywrap-wasm/polywrap_wasm/types/invoke_result.py new file mode 100644 index 00000000..10403232 --- /dev/null +++ b/packages/polywrap-wasm/polywrap_wasm/types/invoke_result.py @@ -0,0 +1,25 @@ +"""This module contains the InvokeResult type.""" +from dataclasses import dataclass +from typing import Generic, Optional, TypeVar + +E = TypeVar("E") + + +@dataclass(kw_only=True, slots=True) +class InvokeResult(Generic[E]): + """InvokeResult is a dataclass that holds the result of an invocation. + + Args: + result (Optional[bytes]): The result of an invocation. + error (Optional[E]): The error of an invocation. + """ + + result: Optional[bytes] = None + error: Optional[E] = None + + def __post_init__(self): + """Validate that either result or error is set.""" + if self.result is None and self.error is None: + raise ValueError( + "Either result or error must be set in InvokeResult instance." + ) diff --git a/packages/polywrap-wasm/polywrap_wasm/types/state.py b/packages/polywrap-wasm/polywrap_wasm/types/state.py index a09ecad6..f253c627 100644 --- a/packages/polywrap-wasm/polywrap_wasm/types/state.py +++ b/packages/polywrap-wasm/polywrap_wasm/types/state.py @@ -1,64 +1,27 @@ """This module contains the State type for holding the state of a Wasm wrapper.""" from dataclasses import dataclass -from typing import Any, Generic, Optional, TypeVar +from typing import Optional -from polywrap_core import Uri, UriResolutionContext - -E = TypeVar("E") - - -@dataclass(kw_only=True, slots=True) -class InvokeOptions: - """InvokeOptions is a dataclass that holds the options for an invocation. - - Attributes: - uri: The URI of the wrapper. - method: The method to invoke. - args: The arguments to pass to the method. - env: The environment variables to set for the invocation. - resolution_context: A URI resolution context. - """ - - uri: Uri - method: str - args: Optional[dict[str, Any]] = None - env: Optional[dict[str, Any]] = None - resolution_context: Optional[UriResolutionContext] = None - - -@dataclass(kw_only=True, slots=True) -class InvokeResult(Generic[E]): - """InvokeResult is a dataclass that holds the result of an invocation. - - Attributes: - result: The result of an invocation. - error: The error of an invocation. - """ - - result: Optional[bytes] = None - error: Optional[E] = None - - def __post_init__(self): - """Validate that either result or error is set.""" - if self.result is None and self.error is None: - raise ValueError( - "Either result or error must be set in InvokeResult instance." - ) +from .invoke_result import InvokeResult +from .wasm_invoke_options import WasmInvokeOptions @dataclass(kw_only=True, slots=True) class State: """State is a dataclass that holds the state of a Wasm wrapper. - Attributes: - invoke_options: The options used for the invocation. - invoke_result: The result of an invocation. - subinvoke_result: The result of a subinvocation. - subinvoke_implementation_result: The result of a subinvoke implementation invoke call. - get_implementations_result: The result of a get implementations call. + Args: + invoke_options (WasmInvokeOptions): \ + The options used for the invocation. + invoke_result (Optional[InvokeResult[str]]): \ + The result of an invocation. + subinvoke_result (Optional[InvokeResult[Exception]]): \ + The result of a subinvocation. + get_implementations_result (Optional[bytes]) : \ + The result of a get implementations call. """ - invoke_options: InvokeOptions + invoke_options: WasmInvokeOptions invoke_result: Optional[InvokeResult[str]] = None subinvoke_result: Optional[InvokeResult[Exception]] = None get_implementations_result: Optional[bytes] = None diff --git a/packages/polywrap-wasm/polywrap_wasm/types/wasm_invoke_options.py b/packages/polywrap-wasm/polywrap_wasm/types/wasm_invoke_options.py new file mode 100644 index 00000000..217f806a --- /dev/null +++ b/packages/polywrap-wasm/polywrap_wasm/types/wasm_invoke_options.py @@ -0,0 +1,26 @@ +"""This module contains the InvokeOptions type for a Wasm wrapper.""" +from dataclasses import dataclass +from typing import Any, Optional + +from polywrap_core import Uri, UriResolutionContext + + +@dataclass(kw_only=True, slots=True) +class WasmInvokeOptions: + """WasmInvokeOptions is a dataclass that holds the options for an invocation. + + Args: + uri (Uri): The URI of the wrapper. + method (str): The method to invoke. + args (Optional[dict[str, Any]]): The arguments to pass to the method. + env (Optional[dict[str, Any]]): The environment variables to set\ + for the invocation. + resolution_context (Optional[UriResolutionContext]): \ + A URI resolution context. + """ + + uri: Uri + method: str + args: Optional[dict[str, Any]] = None + env: Optional[dict[str, Any]] = None + resolution_context: Optional[UriResolutionContext] = None diff --git a/packages/polywrap-wasm/polywrap_wasm/wasm_package.py b/packages/polywrap-wasm/polywrap_wasm/wasm_package.py index 7ab92c74..11d7cf0d 100644 --- a/packages/polywrap-wasm/polywrap_wasm/wasm_package.py +++ b/packages/polywrap-wasm/polywrap_wasm/wasm_package.py @@ -14,12 +14,15 @@ class WasmPackage(WrapPackage): - """WasmPackage is a type that represents a Wasm WRAP package. - - Attributes: - file_reader: The file reader used to read the package files. - manifest: The manifest of the wrapper. - wasm_module: The Wasm module file of the wrapper. + """WasmPackage implements the WRAP package protocol for a Wasm WRAP package. + + Args: + file_reader (FileReader): The file reader used to read\ + the package files. + manifest (Optional[Union[bytes, AnyWrapManifest]]): \ + The manifest of the wrapper. + wasm_module (Optional[bytes]): The Wasm module file\ + of the wrapper. """ file_reader: FileReader @@ -47,7 +50,16 @@ def get_manifest( """Get the manifest of the wrapper. Args: - options: The options to use when getting the manifest. + options (Optional[DeserializeManifestOptions]): The options\ + to use when getting the manifest. + + Returns: + AnyWrapManifest: The manifest of the wrapper. + + Raises: + OSError: If the manifest file could not be read due to system errors. + MsgpackDecodeError: If the encoded manifest fails to decode. + ManifestError: If the manifest is not valid. """ if isinstance(self.manifest, AnyWrapManifest): return self.manifest @@ -61,6 +73,9 @@ def get_manifest( def get_wasm_module(self) -> bytes: """Get the Wasm module of the wrapper if it exists or return an error. + Raises: + OSError: If the wasm module file could not be read due to system errors. + Returns: The Wasm module of the wrapper or an error. """ @@ -72,7 +87,17 @@ def get_wasm_module(self) -> bytes: return self.wasm_module def create_wrapper(self) -> Wrapper: - """Create a new WasmWrapper instance.""" + """Create a new WasmWrapper instance. + + Returns: + WasmWrapper: The Wasm wrapper instance. + + Raises: + OSError: If the wasm module or manifest could not be read\ + due to system errors. + MsgpackDecodeError: If the encoded manifest fails to decode. + ManifestError: If the manifest is not valid. + """ wasm_module = self.get_wasm_module() wasm_manifest = self.get_manifest() diff --git a/packages/polywrap-wasm/polywrap_wasm/wasm_wrapper.py b/packages/polywrap-wasm/polywrap_wasm/wasm_wrapper.py index a15fab67..a886673d 100644 --- a/packages/polywrap-wasm/polywrap_wasm/wasm_wrapper.py +++ b/packages/polywrap-wasm/polywrap_wasm/wasm_wrapper.py @@ -19,16 +19,16 @@ from .exports import WrapExports from .instance import create_instance -from .types.state import InvokeOptions, State +from .types.state import State, WasmInvokeOptions class WasmWrapper(Wrapper): - """WasmWrapper implements the Wrapper interface for Wasm wrappers. + """WasmWrapper implements the Wrapper protocol for Wasm wrappers. - Attributes: - file_reader: The file reader used to read the wrapper files. - wasm_module: The Wasm module file of the wrapper. - manifest: The manifest of the wrapper. + Args: + file_reader (FileReader): The file reader used to read the wrapper files. + wasm_module (bytes): The Wasm module file of the wrapper. + manifest (AnyWrapManifest): The manifest of the wrapper. """ file_reader: FileReader @@ -57,7 +57,8 @@ def get_file( """Get a file from the wrapper. Args: - options: The options to use when getting the file. + path (str): The path of the file to get. + encoding (Optional[str]): The encoding to use when reading the file. Returns: The file contents as string or bytes according to encoding or an error. @@ -71,9 +72,9 @@ def create_wasm_instance( """Create a new Wasm instance for the wrapper. Args: - store: The Wasm store to use when creating the instance. - state: The Wasm wrapper state to use when creating the instance. - client: The client to use when creating the instance. + store (Store): The Wasm store to use when creating the instance. + state (State): The Wasm wrapper state to use when creating the instance. + client (Optional[Invoker]): The client to use when creating the instance. Returns: The Wasm instance of the wrapper Wasm module. @@ -97,8 +98,17 @@ def invoke( """Invoke the wrapper. Args: - options: The options to use when invoking the wrapper. - client: The client to use when invoking the wrapper. + uri (Uri): The Wasm wrapper uri. + method (str): The method to invoke. + args (Optional[Dict[str, Any]]): The args to invoke with. + env (Optional[Dict[str, Any]]): The env to use when invoking. + resolution_context (Optional[UriResolutionContext]): \ + The URI resolution context to use during invocation. + client (Optional[Invoker]): The invoker to use during invocation. + + Raises: + WrapError: If the invocation uri or method are not defined. + MsgpackError: If failed to encode/decode data to/from msgpack. Returns: The result of the invocation or an error. @@ -115,7 +125,7 @@ def invoke( ) state = State( - invoke_options=InvokeOptions( + invoke_options=WasmInvokeOptions( uri=uri, method=method, args=args,