From ebb322fb7ba0d1e72462118e9ddf57aa4be52337 Mon Sep 17 00:00:00 2001 From: Teo Stocco Date: Fri, 26 May 2023 19:48:18 +0200 Subject: [PATCH] chore: prepare release v0.1.9 (#323) --- Cargo.lock | 16 +++++----- dev/lock.yml | 2 +- examples/templates/new/compose.yml | 2 +- examples/templates/new/pyproject.toml | 4 +-- examples/typegraphs/petstore/petstore.py | 2 +- .../typegraphs/petstore_v3/petstore_v3.py | 3 +- libs/common/Cargo.toml | 2 +- libs/macros/Cargo.toml | 2 +- libs/typescript/Cargo.toml | 2 +- libs/xtask/Cargo.toml | 2 +- meta-cli/Cargo.toml | 2 +- typegate/native/Cargo.toml | 2 +- .../tests/runtimes/wasmedge/rust/Cargo.toml | 2 +- typegraph/core/Cargo.toml | 2 +- typegraph/python/pyproject.toml | 2 +- typegraph/python/typegraph/__init__.py | 2 +- typegraph/rust/Cargo.toml | 2 +- .../reference/typegraph/python/pydoc.json | 7 +++++ .../python/typegraph/importers/openapi.md | 21 +++++++++++++ .../python/typegraph/utils/sanitizers.md | 30 +++++++++++++++++++ whiz.yaml | 4 +-- 21 files changed, 86 insertions(+), 27 deletions(-) create mode 100644 website/docs/reference/typegraph/python/typegraph/utils/sanitizers.md diff --git a/Cargo.lock b/Cargo.lock index 36850f3940..27d34d54c8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -985,7 +985,7 @@ dependencies = [ [[package]] name = "common" -version = "0.1.9-dev.0" +version = "0.1.9" dependencies = [ "anyhow", "base64 0.21.0", @@ -3259,7 +3259,7 @@ dependencies = [ [[package]] name = "macros" -version = "0.1.9-dev.0" +version = "0.1.9" dependencies = [ "proc-macro2", "quote", @@ -3351,7 +3351,7 @@ dependencies = [ [[package]] name = "meta-cli" -version = "0.1.9-dev.0" +version = "0.1.9" dependencies = [ "anyhow", "assert_cmd", @@ -3826,7 +3826,7 @@ dependencies = [ [[package]] name = "native" -version = "0.1.9-dev.0" +version = "0.1.9" dependencies = [ "anyhow", "base64 0.21.0", @@ -7537,14 +7537,14 @@ dependencies = [ [[package]] name = "typegraph" -version = "0.1.9-dev.0" +version = "0.1.9" dependencies = [ "typegraph_core", ] [[package]] name = "typegraph_core" -version = "0.1.9-dev.0" +version = "0.1.9" dependencies = [ "anyhow", "enum_dispatch", @@ -7562,7 +7562,7 @@ checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "typescript" -version = "0.1.9-dev.0" +version = "0.1.9" dependencies = [ "anyhow", "dprint-plugin-typescript", @@ -8421,7 +8421,7 @@ dependencies = [ [[package]] name = "xtask" -version = "0.1.9-dev.0" +version = "0.1.9" dependencies = [ "anyhow", "clap", diff --git a/dev/lock.yml b/dev/lock.yml index 0971b0cc63..21bc154d3f 100644 --- a/dev/lock.yml +++ b/dev/lock.yml @@ -50,7 +50,7 @@ dev: NODE_VERSION: 19.8.1 PNPM_VERSION: 8.1.0 TYPEGRAPH_VERSION: 0.0.1 - METATYPE_VERSION: 0.1.9-dev.0 + METATYPE_VERSION: 0.1.9 TAGLINE: >- Open source, low-code backend platform for developers — build modular APIs with zero-trust and serverless deployment, no matter where and how diff --git a/examples/templates/new/compose.yml b/examples/templates/new/compose.yml index fdb98aec66..820fa76c71 100644 --- a/examples/templates/new/compose.yml +++ b/examples/templates/new/compose.yml @@ -1,6 +1,6 @@ services: typegate: - image: ghcr.io/metatypedev/typegate:v0.1.9-dev.0 + image: ghcr.io/metatypedev/typegate:v0.1.9 platform: linux/amd64 restart: always ports: diff --git a/examples/templates/new/pyproject.toml b/examples/templates/new/pyproject.toml index afece70e2f..7275976ae2 100644 --- a/examples/templates/new/pyproject.toml +++ b/examples/templates/new/pyproject.toml @@ -1,13 +1,13 @@ [tool.poetry] name = "example" -version = "0.1.9-dev.0" +version = "0.1.9" description = "" authors = [] readme = "README.md" [tool.poetry.dependencies] python = ">=3.8,<4.0" -typegraph = "0.1.9-dev.0" +typegraph = "0.1.9" [build-system] requires = ["poetry-core"] diff --git a/examples/typegraphs/petstore/petstore.py b/examples/typegraphs/petstore/petstore.py index 006b66ed5c..d0d0901b84 100644 --- a/examples/typegraphs/petstore/petstore.py +++ b/examples/typegraphs/petstore/petstore.py @@ -1,7 +1,7 @@ from typegraph import TypeGraph, policies, t from typegraph.runtimes.http import HTTPRuntime -with TypeGraph("swagger-petstore") as g: +with TypeGraph("swagger_petstore") as g: remote = HTTPRuntime("https://petstore.swagger.io/v2") public = policies.public() diff --git a/examples/typegraphs/petstore_v3/petstore_v3.py b/examples/typegraphs/petstore_v3/petstore_v3.py index fbc68de189..e99f368ade 100644 --- a/examples/typegraphs/petstore_v3/petstore_v3.py +++ b/examples/typegraphs/petstore_v3/petstore_v3.py @@ -1,4 +1,5 @@ from box import Box + from typegraph import TypeGraph, t from typegraph.importers.base.importer import Import from typegraph.importers.openapi import OpenApiImporter @@ -228,5 +229,5 @@ def import_petstore(): ) -with TypeGraph(name="petstore-v3") as g: +with TypeGraph(name="petstore_v3") as g: pass diff --git a/libs/common/Cargo.toml b/libs/common/Cargo.toml index 823146bbe3..97493f32fb 100644 --- a/libs/common/Cargo.toml +++ b/libs/common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "common" -version = "0.1.9-dev.0" +version = "0.1.9" edition = "2021" [dependencies] diff --git a/libs/macros/Cargo.toml b/libs/macros/Cargo.toml index c9534f3d9f..6661efb2db 100644 --- a/libs/macros/Cargo.toml +++ b/libs/macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "macros" -version = "0.1.9-dev.0" +version = "0.1.9" edition = "2021" [lib] diff --git a/libs/typescript/Cargo.toml b/libs/typescript/Cargo.toml index 9c4bf4d627..57ee003cde 100644 --- a/libs/typescript/Cargo.toml +++ b/libs/typescript/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "typescript" -version = "0.1.9-dev.0" +version = "0.1.9" edition = "2021" [dependencies] diff --git a/libs/xtask/Cargo.toml b/libs/xtask/Cargo.toml index fb5738bda9..37e120b9ec 100644 --- a/libs/xtask/Cargo.toml +++ b/libs/xtask/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xtask" -version = "0.1.9-dev.0" +version = "0.1.9" edition = "2021" [dependencies] diff --git a/meta-cli/Cargo.toml b/meta-cli/Cargo.toml index fa10ca98dc..417c16547f 100644 --- a/meta-cli/Cargo.toml +++ b/meta-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "meta-cli" -version = "0.1.9-dev.0" +version = "0.1.9" edition = "2021" description = "Open source, low-code backend platform for developers — build modular APIs with zero-trust and serverless deployment, no matter where and how (legacy) systems are." diff --git a/typegate/native/Cargo.toml b/typegate/native/Cargo.toml index 196457ee50..7c888b520d 100644 --- a/typegate/native/Cargo.toml +++ b/typegate/native/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "native" -version = "0.1.9-dev.0" +version = "0.1.9" edition = "2021" [lib] diff --git a/typegate/tests/runtimes/wasmedge/rust/Cargo.toml b/typegate/tests/runtimes/wasmedge/rust/Cargo.toml index ba69aacb0c..19f626a774 100644 --- a/typegate/tests/runtimes/wasmedge/rust/Cargo.toml +++ b/typegate/tests/runtimes/wasmedge/rust/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rust" -version = "0.1.9-dev.0" +version = "0.1.9" edition = "2021" [lib] diff --git a/typegraph/core/Cargo.toml b/typegraph/core/Cargo.toml index bc72e3cf81..0085cbde9b 100644 --- a/typegraph/core/Cargo.toml +++ b/typegraph/core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "typegraph_core" -version = "0.1.9-dev.0" +version = "0.1.9" edition = "2021" diff --git a/typegraph/python/pyproject.toml b/typegraph/python/pyproject.toml index 992f369266..601a501803 100644 --- a/typegraph/python/pyproject.toml +++ b/typegraph/python/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "typegraph" -version = "0.1.9-dev.0" +version = "0.1.9" description = "Open source, low-code backend platform for developers — build modular APIs with zero-trust and serverless deployment, no matter where and how (legacy) systems are." authors = ["Metatype Contributors "] license = "MPL-2.0" diff --git a/typegraph/python/typegraph/__init__.py b/typegraph/python/typegraph/__init__.py index 2fa4280b18..c2eb2c18c8 100644 --- a/typegraph/python/typegraph/__init__.py +++ b/typegraph/python/typegraph/__init__.py @@ -5,4 +5,4 @@ from typegraph import types as t # noqa from typegraph.graph.typegraph import TypeGraph # noqa -version = "0.1.9-dev.0" +version = "0.1.9" diff --git a/typegraph/rust/Cargo.toml b/typegraph/rust/Cargo.toml index 394c9f2a79..beef310a43 100644 --- a/typegraph/rust/Cargo.toml +++ b/typegraph/rust/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "typegraph" -version = "0.1.9-dev.0" +version = "0.1.9" edition = "2021" license-file = "../../LICENSE-MPL-2.0.md" diff --git a/website/docs/reference/typegraph/python/pydoc.json b/website/docs/reference/typegraph/python/pydoc.json index 2bc1586522..029a046a3f 100644 --- a/website/docs/reference/typegraph/python/pydoc.json +++ b/website/docs/reference/typegraph/python/pydoc.json @@ -81,6 +81,13 @@ "label": "typegraph.runtimes", "type": "category" }, + { + "items": [ + "docs/reference/typegraph/python/typegraph/utils/sanitizers" + ], + "label": "typegraph.utils", + "type": "category" + }, "docs/reference/typegraph/python/typegraph/injection", "docs/reference/typegraph/python/typegraph/types" ], diff --git a/website/docs/reference/typegraph/python/typegraph/importers/openapi.md b/website/docs/reference/typegraph/python/typegraph/importers/openapi.md index ac25053915..addc07aff9 100644 --- a/website/docs/reference/typegraph/python/typegraph/importers/openapi.md +++ b/website/docs/reference/typegraph/python/typegraph/importers/openapi.md @@ -3,6 +3,27 @@ sidebar_label: openapi title: typegraph.importers.openapi --- +#### ref\_to\_name + +```python +def ref_to_name(ref: str) -> str +``` + +Example match: + +`#/components/schemas/financial_connections.account_owner` + +#### create\_fn\_name + +```python +def create_fn_name(method: str, path: str) +``` + +**Example**: + + + `method`=get, `path`=/users/{id} => getUsersId + ## OpenApiImporter Objects ```python diff --git a/website/docs/reference/typegraph/python/typegraph/utils/sanitizers.md b/website/docs/reference/typegraph/python/typegraph/utils/sanitizers.md new file mode 100644 index 0000000000..5cf603902c --- /dev/null +++ b/website/docs/reference/typegraph/python/typegraph/utils/sanitizers.md @@ -0,0 +1,30 @@ +--- +sidebar_label: sanitizers +title: typegraph.utils.sanitizers +--- + +#### inject\_params + +```python +def inject_params(s: str, params: Union[None, Dict[str, str]]) +``` + +**Example**: + + + s = `"{protocol}://{hostname}"`, params= `{'protocol': 'http', 'hostname': 'example.com'}` + + returns `"http://example.com"` + +#### as\_attr + +```python +def as_attr(name: str) +``` + +Convert a string into valid attribute + +**Example**: + + + `root:some complicated/Name` => `root_some_complicated_Name` diff --git a/whiz.yaml b/whiz.yaml index cb46873ad7..40f5023464 100644 --- a/whiz.yaml +++ b/whiz.yaml @@ -20,8 +20,8 @@ typegate1: &tp TG_PORT: "7891" PACKAGED: "false" LOG_LEVEL: "DEBUG" - DYLD_LIBRARY_PATH: "$HOME/.wasmedge/lib:$DYLD_LIBRARY_PATH" - LD_LIBRARY_PATH: "$HOME/.wasmedge/lib:$LD_LIBRARY_PATH" + DYLD_LIBRARY_PATH: "$HOME/.wasmedge/lib:$DYLD_LIBRARY_PATH" # macOS + LD_LIBRARY_PATH: "$HOME/.wasmedge/lib:$LD_LIBRARY_PATH" # linux DEBUG: "true" REDIS_URL: "redis://:password@localhost:6379/0" TG_SECRET: "a4lNi0PbEItlFZbus1oeH/+wyIxi9uH6TpL8AIqIaMBNvp7SESmuUBbfUwC0prxhGhZqHw8vMDYZAGMhSZ4fLw=="