Skip to content

Commit 6b3fff0

Browse files
authored
Merge pull request #233 from polywrap/dev
prep 0.1.0b4 | /workflows/cd
2 parents 2df06e1 + 35e9f95 commit 6b3fff0

File tree

338 files changed

+10102
-2584
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

338 files changed

+10102
-2584
lines changed

.github/workflows/ci.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ jobs:
5151
- name: Config Bundle Codegen
5252
run: yarn codegen
5353
if: contains(matrix.package, 'config-bundles')
54+
- name: Client Codegen
55+
run: yarn codegen
56+
if: endsWith(matrix.package, 'polywrap-client')
57+
- name: Client Config Builder Codegen
58+
run: yarn codegen
59+
if: endsWith(matrix.package, 'polywrap-client-config-builder')
5460
- name: Typecheck
5561
run: poetry run tox -e typecheck
5662
- name: Lint

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.0b3
1+
0.1.0b4

docs/docgen.sh

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1-
sphinx-apidoc ../packages/polywrap-msgpack/polywrap_msgpack -o ./source/polywrap-msgpack -e
2-
sphinx-apidoc ../packages/polywrap-manifest/polywrap_manifest -o ./source/polywrap-manifest -e
3-
sphinx-apidoc ../packages/polywrap-core/polywrap_core -o ./source/polywrap-core -e
4-
sphinx-apidoc ../packages/polywrap-wasm/polywrap_wasm -o ./source/polywrap-wasm -e
5-
sphinx-apidoc ../packages/polywrap-plugin/polywrap_plugin -o ./source/polywrap-plugin -e
6-
sphinx-apidoc ../packages/polywrap-uri-resolvers/polywrap_uri_resolvers -o ./source/polywrap-uri-resolvers -e
7-
sphinx-apidoc ../packages/polywrap-client/polywrap_client -o ./source/polywrap-client -e
8-
sphinx-apidoc ../packages/polywrap-client-config-builder/polywrap_client_config_builder -o ./source/polywrap-client-config-builder -e
1+
sphinx-apidoc ../packages/polywrap-msgpack/polywrap_msgpack -o ./source/polywrap-msgpack -e -M -t ./source/_templates -d 2
2+
sphinx-apidoc ../packages/polywrap-manifest/polywrap_manifest -o ./source/polywrap-manifest -e -M -t ./source/_templates -d 2
3+
sphinx-apidoc ../packages/polywrap-core/polywrap_core -o ./source/polywrap-core -e -M -t ./source/_templates -d 2
4+
sphinx-apidoc ../packages/polywrap-wasm/polywrap_wasm -o ./source/polywrap-wasm -e -M -t ./source/_templates -d 2
5+
sphinx-apidoc ../packages/polywrap-plugin/polywrap_plugin -o ./source/polywrap-plugin -e -M -t ./source/_templates -d 2
6+
sphinx-apidoc ../packages/polywrap-uri-resolvers/polywrap_uri_resolvers -o ./source/polywrap-uri-resolvers -e -M -t ./source/_templates -d 2
7+
sphinx-apidoc ../packages/polywrap-client/polywrap_client -o ./source/polywrap-client -e -M -t ./source/_templates -d 2
8+
sphinx-apidoc ../packages/polywrap-client-config-builder/polywrap_client_config_builder -o ./source/polywrap-client-config-builder -e -M -t ./source/_templates -d 2
9+
sphinx-apidoc ../packages/plugins/polywrap-fs-plugin/polywrap_fs_plugin -o ./source/polywrap-fs-plugin -e -M -t ./source/_templates -d 2
10+
sphinx-apidoc ../packages/plugins/polywrap-http-plugin/polywrap_http_plugin -o ./source/polywrap-http-plugin -e -M -t ./source/_templates -d 2
11+
sphinx-apidoc ../packages/plugins/polywrap-ethereum-provider/polywrap_ethereum_provider -o ./source/polywrap-ethereum-provider -e -M -t ./source/_templates -d 2
12+
sphinx-apidoc ../packages/config-bundles/polywrap-sys-config-bundle/polywrap_sys_config_bundle -o ./source/polywrap-sys-config-bundle -e -M -t ./source/_templates -d 2
13+
sphinx-apidoc ../packages/config-bundles/polywrap-web3-config-bundle/polywrap_web3_config_bundle -o ./source/polywrap-web3-config-bundle -e -M -t ./source/_templates -d 2
14+
15+
cd ../packages/polywrap-client && python scripts/extract_readme.py && cd ../../docs
16+
cp ../packages/polywrap-client/README.rst ./source/Quickstart.rst

docs/poetry.lock

Lines changed: 1968 additions & 169 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/pyproject.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,14 @@ polywrap-plugin = { path = "../packages/polywrap-plugin", develop = true }
1818
polywrap-uri-resolvers = { path = "../packages/polywrap-uri-resolvers", develop = true }
1919
polywrap-client = { path = "../packages/polywrap-client", develop = true }
2020
polywrap-client-config-builder = { path = "../packages/polywrap-client-config-builder", develop = true }
21+
polywrap-fs-plugin = { path = "../packages/plugins/polywrap-fs-plugin", develop = true }
22+
polywrap-http-plugin = { path = "../packages/plugins/polywrap-http-plugin", develop = true }
23+
polywrap-ethereum-provider = { path = "../packages/plugins/polywrap-ethereum-provider", develop = true }
24+
polywrap-sys-config-bundle = { path = "../packages/config-bundles/polywrap-sys-config-bundle", develop = true }
25+
polywrap-web3-config-bundle = { path = "../packages/config-bundles/polywrap-web3-config-bundle", develop = true }
2126

2227
[tool.poetry.group.dev.dependencies]
2328
sphinx = "^6.1.3"
24-
sphinx-rtd-theme = "^1.2.0"
29+
sphinx-rtd-theme = "^1.2.0"
30+
myst-parser = "^2.0.0"
31+
sphinx-mdinclude = "^0.5.3"

docs/source/Quickstart.rst

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
Polywrap Client
2+
===============
3+
This package contains the implementation of polywrap python client.
4+
5+
Quickstart
6+
==========
7+
8+
Imports
9+
-------
10+
11+
>>> from polywrap_core import Uri, ClientConfig
12+
>>> from polywrap_client import PolywrapClient
13+
>>> from polywrap_client_config_builder import PolywrapClientConfigBuilder
14+
>>> from polywrap_sys_config_bundle import sys_bundle
15+
>>> from polywrap_web3_config_bundle import web3_bundle
16+
17+
Configure and Instantiate
18+
-------------------------
19+
20+
>>> builder = (
21+
... PolywrapClientConfigBuilder()
22+
... .add_bundle(sys_bundle)
23+
... .add_bundle(web3_bundle)
24+
... )
25+
>>> config = builder.build()
26+
>>> client = PolywrapClient(config)
27+
28+
Invocation
29+
----------
30+
31+
Invoke a wrapper.
32+
33+
>>> uri = Uri.from_str(
34+
... 'wrapscan.io/polywrap/ipfs-http-client'
35+
... )
36+
>>> args = {
37+
... "cid": "QmZ4d7KWCtH3xfWFwcdRXEkjZJdYNwonrCwUckGF1gRAH9",
38+
... "ipfsProvider": "https://ipfs.io",
39+
... }
40+
>>> result = client.invoke(uri=uri, method="cat", args=args, encode_result=False)
41+
>>> assert result.startswith(b"<svg")
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{%- if show_headings %}
2+
{{- [basename, "module"] | join(' ') | e | heading }}
3+
4+
{% endif -%}
5+
.. automodule:: {{ qualname }}
6+
{%- for option in automodule_options %}
7+
:{{ option }}:
8+
{%- endfor %}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{%- macro automodule(modname, options) -%}
2+
.. automodule:: {{ modname }}
3+
{%- for option in options %}
4+
:{{ option }}:
5+
{%- endfor %}
6+
{%- endmacro %}
7+
8+
{%- macro toctree(docnames) -%}
9+
.. toctree::
10+
:maxdepth: {{ maxdepth }}
11+
{% for docname in docnames %}
12+
{{ docname }}
13+
{%- endfor %}
14+
{%- endmacro %}
15+
16+
{%- if is_namespace %}
17+
{{- [pkgname, "namespace"] | join(" ") | e | heading }}
18+
{% else %}
19+
{{- [pkgname, "package"] | join(" ") | e | heading }}
20+
{% endif %}
21+
22+
{%- if subpackages %}
23+
Subpackages
24+
-----------
25+
26+
{{ toctree(subpackages) }}
27+
{% endif %}
28+
29+
{%- if submodules %}
30+
Submodules
31+
----------
32+
{% if separatemodules %}
33+
{{ toctree(submodules) }}
34+
{% else %}
35+
{%- for submodule in submodules %}
36+
{% if show_headings %}
37+
{{- [submodule, "module"] | join(" ") | e | heading(2) }}
38+
{% endif %}
39+
{{ automodule(submodule, automodule_options) }}
40+
{% endfor %}
41+
{%- endif %}
42+
{%- endif %}

docs/source/_templates/toc.rst_t

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{{ header | heading }}
2+
3+
.. automodule:: {% for docname in docnames %}{{ docname }}{%- endfor %}
4+
:members:
5+
:undoc-members:
6+
:show-inheritance:
7+
8+
API References
9+
--------------
10+
11+
.. toctree::
12+
:maxdepth: 4
13+
{% for docname in docnames %}
14+
{{ docname }}
15+
{%- endfor %}

docs/source/index.rst

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,26 @@
66
Welcome to polywrap-client's documentation!
77
===========================================
88

9+
.. include:: Quickstart.rst
10+
11+
912
.. toctree::
1013
:maxdepth: 1
1114
:caption: Contents:
1215

16+
polywrap-client/modules.rst
17+
polywrap-client-config-builder/modules.rst
18+
polywrap-fs-plugin/modules.rst
19+
polywrap-http-plugin/modules.rst
20+
polywrap-ethereum-provider/modules.rst
21+
polywrap-sys-config-bundle/modules.rst
22+
polywrap-web3-config-bundle/modules.rst
1323
polywrap-msgpack/modules.rst
1424
polywrap-manifest/modules.rst
1525
polywrap-core/modules.rst
1626
polywrap-wasm/modules.rst
1727
polywrap-plugin/modules.rst
1828
polywrap-uri-resolvers/modules.rst
19-
polywrap-client/modules.rst
20-
polywrap-client-config-builder/modules.rst
21-
2229

2330
Indices and tables
2431
==================

0 commit comments

Comments
 (0)