From 24963ce5309ddeea5c9b1966c5bdaad140de996e Mon Sep 17 00:00:00 2001 From: Yohe-Am <56622350+Yohe-Am@users.noreply.github.com> Date: Wed, 22 May 2024 14:29:13 +0300 Subject: [PATCH] fix(ci): poetry lockfile (#732) - Fixes poetry lockfile and adds pre-commit hook to prevent issue from happening --- .github/workflows/release.yml | 2 ++ .pre-commit-config.yaml | 12 ++++++++++++ poetry.lock | 18 +++++++++--------- typegraph/python/poetry.lock | 18 +++++++++--------- 4 files changed, 32 insertions(+), 18 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index baf95da7a8..5860133eee 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -180,6 +180,8 @@ jobs: wasm-opt -Oz target/wasm/wasm32-unknown-unknown/release/typegraph_core.wasm -o $WASM_FILE.opt wasm-tools component new $WASM_FILE.opt -o $WASM_FILE + python3 -m venv .venv + source .venv/bin/activate poetry install --no-root poetry run python -m wasmtime.bindgen $WASM_FILE --out-dir typegraph/python/typegraph/gen diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b4df5dfa06..ee1bfda74a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,18 @@ repos: - repo: local hooks: + - id: poetry-lock + name: "Check poetry lock" + always_run: true + language: system + entry: bash -c 'poetry check --lock' + pass_filenames: false + - id: poetry-lock-typegraph + name: "Check typegraph poetry lock" + always_run: true + language: system + entry: bash -c 'poetry -C ./typegraph/python check --lock' + pass_filenames: false - id: version name: "Lock versions" always_run: true diff --git a/poetry.lock b/poetry.lock index 3b77e3125a..25e1045370 100644 --- a/poetry.lock +++ b/poetry.lock @@ -313,7 +313,7 @@ develop = true astunparse = "^1.6.3" python-box = "^7.1.1" typing-extensions = "^4.8.0" -wasmtime = "^20.0.0" +wasmtime = "^21.0.0" [package.source] type = "directory" @@ -332,24 +332,24 @@ files = [ [[package]] name = "wasmtime" -version = "20.0.0" +version = "21.0.0" description = "A WebAssembly runtime powered by Wasmtime" optional = false python-versions = ">=3.8" files = [ - {file = "wasmtime-20.0.0-py3-none-any.whl", hash = "sha256:6d9806e34c7cebe3d2ff4ba58a0c7db3648d4d952a0b6821aed4c4d966a4b312"}, - {file = "wasmtime-20.0.0-py3-none-macosx_10_13_x86_64.whl", hash = "sha256:2ae53f5d84f071f42bf7c05da3bfe4a18e0b5ad801931188bff2e5092137213e"}, - {file = "wasmtime-20.0.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:3f9ea16cf19039c5dc11d1f9a8f024ebb0d4c6cd1cbb2d0889797326f8ba5c06"}, - {file = "wasmtime-20.0.0-py3-none-manylinux1_x86_64.whl", hash = "sha256:137c92cfde23b9ed18a85d5d1a1bfa844f1322c3bd80bc36c3b5adc3322f4a6e"}, - {file = "wasmtime-20.0.0-py3-none-manylinux2014_aarch64.whl", hash = "sha256:69505f8c1f42815c3784f77df5b3be9f4742ede56299a0f2d7d71083893e855d"}, - {file = "wasmtime-20.0.0-py3-none-win_amd64.whl", hash = "sha256:8ddb958a1b6eed88e56ec4aaae9478c273bed2e4fcd3331f29fda8d9d12def3d"}, + {file = "wasmtime-21.0.0-py3-none-any.whl", hash = "sha256:9b7ee9bb6c14586974d34c92bb7f0723161067769233c5dd8ea99c233759b48d"}, + {file = "wasmtime-21.0.0-py3-none-macosx_10_13_x86_64.whl", hash = "sha256:b10b6ec13fa04fc1d81a4f9b2d244938c67710e9279011e53397bfa071b85b3f"}, + {file = "wasmtime-21.0.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:3e245a5c03c1de46cdafcd98da6daa381cadd7bd41aae70d8bef4c8c0ea51798"}, + {file = "wasmtime-21.0.0-py3-none-manylinux1_x86_64.whl", hash = "sha256:6587515be9603f8bb0732f3b508d2034f21d407fd55879c4402032e40e1ddae6"}, + {file = "wasmtime-21.0.0-py3-none-manylinux2014_aarch64.whl", hash = "sha256:4b242b065922f65cd40d8cedb3f19269423f28d7955567fe2daca03a44c03446"}, + {file = "wasmtime-21.0.0-py3-none-win_amd64.whl", hash = "sha256:00f929d0caf58a69890df00888f9da12c2aa3ed5af4c8b7b2dca96a4996da731"}, ] [package.dependencies] importlib-resources = ">=5.10" [package.extras] -testing = ["coverage", "pycparser", "pytest", "pytest-mypy"] +testing = ["componentize-py", "coverage", "pycparser", "pytest", "pytest-mypy"] [[package]] name = "wheel" diff --git a/typegraph/python/poetry.lock b/typegraph/python/poetry.lock index 70d0cd02c5..db51a7bed4 100644 --- a/typegraph/python/poetry.lock +++ b/typegraph/python/poetry.lock @@ -89,24 +89,24 @@ files = [ [[package]] name = "wasmtime" -version = "20.0.0" +version = "21.0.0" description = "A WebAssembly runtime powered by Wasmtime" optional = false python-versions = ">=3.8" files = [ - {file = "wasmtime-20.0.0-py3-none-any.whl", hash = "sha256:6d9806e34c7cebe3d2ff4ba58a0c7db3648d4d952a0b6821aed4c4d966a4b312"}, - {file = "wasmtime-20.0.0-py3-none-macosx_10_13_x86_64.whl", hash = "sha256:2ae53f5d84f071f42bf7c05da3bfe4a18e0b5ad801931188bff2e5092137213e"}, - {file = "wasmtime-20.0.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:3f9ea16cf19039c5dc11d1f9a8f024ebb0d4c6cd1cbb2d0889797326f8ba5c06"}, - {file = "wasmtime-20.0.0-py3-none-manylinux1_x86_64.whl", hash = "sha256:137c92cfde23b9ed18a85d5d1a1bfa844f1322c3bd80bc36c3b5adc3322f4a6e"}, - {file = "wasmtime-20.0.0-py3-none-manylinux2014_aarch64.whl", hash = "sha256:69505f8c1f42815c3784f77df5b3be9f4742ede56299a0f2d7d71083893e855d"}, - {file = "wasmtime-20.0.0-py3-none-win_amd64.whl", hash = "sha256:8ddb958a1b6eed88e56ec4aaae9478c273bed2e4fcd3331f29fda8d9d12def3d"}, + {file = "wasmtime-21.0.0-py3-none-any.whl", hash = "sha256:9b7ee9bb6c14586974d34c92bb7f0723161067769233c5dd8ea99c233759b48d"}, + {file = "wasmtime-21.0.0-py3-none-macosx_10_13_x86_64.whl", hash = "sha256:b10b6ec13fa04fc1d81a4f9b2d244938c67710e9279011e53397bfa071b85b3f"}, + {file = "wasmtime-21.0.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:3e245a5c03c1de46cdafcd98da6daa381cadd7bd41aae70d8bef4c8c0ea51798"}, + {file = "wasmtime-21.0.0-py3-none-manylinux1_x86_64.whl", hash = "sha256:6587515be9603f8bb0732f3b508d2034f21d407fd55879c4402032e40e1ddae6"}, + {file = "wasmtime-21.0.0-py3-none-manylinux2014_aarch64.whl", hash = "sha256:4b242b065922f65cd40d8cedb3f19269423f28d7955567fe2daca03a44c03446"}, + {file = "wasmtime-21.0.0-py3-none-win_amd64.whl", hash = "sha256:00f929d0caf58a69890df00888f9da12c2aa3ed5af4c8b7b2dca96a4996da731"}, ] [package.dependencies] importlib-resources = ">=5.10" [package.extras] -testing = ["coverage", "pycparser", "pytest", "pytest-mypy"] +testing = ["componentize-py", "coverage", "pycparser", "pytest", "pytest-mypy"] [[package]] name = "wheel" @@ -140,4 +140,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more [metadata] lock-version = "2.0" python-versions = ">=3.8,<4.0" -content-hash = "054c721c7557b8c008b8d2baeada154e0c0b2e8b0812b34440c2bcb0f5cf525a" +content-hash = "1a8b08df1555b98d2c92c186d3b26d648451538f89f14f8174bf857ea4de8445"