diff --git a/CHANGELOG.md b/CHANGELOG.md index 02d3ef8e6..26eb749b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog], and this project adheres to [Semantic Versioning]. +## [7.3.1] - 2024-01-29 + +### Fixed + +- codegen: Always cleanup jsonschemas before generating types. +- config: Make `ws_url` field optional for `evm.node` datasource. + ## [7.3.0] - 2024-01-23 ### Added diff --git a/Makefile b/Makefile index 8c5e0aaa3..0c0e9e858 100644 --- a/Makefile +++ b/Makefile @@ -77,5 +77,5 @@ before_release: ## Prepare for a new release after updating version in pyproject make demos make test make docs_build - echo "🎉 Commit changes, merge `aux/X.Y.Z`, run 'git checkout next && git pull && git tag X.Y.Z && git push origin X.Y.Z'" + echo "🎉 Commit changes, merge aux/X.Y.Z branch, tag release on next" ## \ No newline at end of file diff --git a/pdm.lock b/pdm.lock index ea71553fd..f5c5b4aa1 100644 --- a/pdm.lock +++ b/pdm.lock @@ -9,7 +9,7 @@ content_hash = "sha256:cb22f060be22021ad453feb7a64138981271902eca95a4eca834afd13 [[package]] name = "aiohttp" -version = "3.9.1" +version = "3.9.2" requires_python = ">=3.8" summary = "Async http client/server framework (asyncio)" groups = ["default", "dev"] @@ -21,22 +21,22 @@ dependencies = [ "yarl<2.0,>=1.0", ] files = [ - {file = "aiohttp-3.9.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:df9cf74b9bc03d586fc53ba470828d7b77ce51b0582d1d0b5b2fb673c0baa32d"}, - {file = "aiohttp-3.9.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ecca113f19d5e74048c001934045a2b9368d77b0b17691d905af18bd1c21275e"}, - {file = "aiohttp-3.9.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:8cef8710fb849d97c533f259103f09bac167a008d7131d7b2b0e3a33269185c0"}, - {file = "aiohttp-3.9.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bea94403a21eb94c93386d559bce297381609153e418a3ffc7d6bf772f59cc35"}, - {file = "aiohttp-3.9.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:91c742ca59045dce7ba76cab6e223e41d2c70d79e82c284a96411f8645e2afff"}, - {file = "aiohttp-3.9.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6c93b7c2e52061f0925c3382d5cb8980e40f91c989563d3d32ca280069fd6a87"}, - {file = "aiohttp-3.9.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ee2527134f95e106cc1653e9ac78846f3a2ec1004cf20ef4e02038035a74544d"}, - {file = "aiohttp-3.9.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:11ff168d752cb41e8492817e10fb4f85828f6a0142b9726a30c27c35a1835f01"}, - {file = "aiohttp-3.9.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:b8c3a67eb87394386847d188996920f33b01b32155f0a94f36ca0e0c635bf3e3"}, - {file = "aiohttp-3.9.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:c7b5d5d64e2a14e35a9240b33b89389e0035e6de8dbb7ffa50d10d8b65c57449"}, - {file = "aiohttp-3.9.1-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:69985d50a2b6f709412d944ffb2e97d0be154ea90600b7a921f95a87d6f108a2"}, - {file = "aiohttp-3.9.1-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:c9110c06eaaac7e1f5562caf481f18ccf8f6fdf4c3323feab28a93d34cc646bd"}, - {file = "aiohttp-3.9.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d737e69d193dac7296365a6dcb73bbbf53bb760ab25a3727716bbd42022e8d7a"}, - {file = "aiohttp-3.9.1-cp311-cp311-win32.whl", hash = "sha256:4ee8caa925aebc1e64e98432d78ea8de67b2272252b0a931d2ac3bd876ad5544"}, - {file = "aiohttp-3.9.1-cp311-cp311-win_amd64.whl", hash = "sha256:a34086c5cc285be878622e0a6ab897a986a6e8bf5b67ecb377015f06ed316587"}, - {file = "aiohttp-3.9.1.tar.gz", hash = "sha256:8fc49a87ac269d4529da45871e2ffb6874e87779c3d0e2ccd813c0899221239d"}, + {file = "aiohttp-3.9.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:6aaa6f99256dd1b5756a50891a20f0d252bd7bdb0854c5d440edab4495c9f973"}, + {file = "aiohttp-3.9.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a27d8c70ad87bcfce2e97488652075a9bdd5b70093f50b10ae051dfe5e6baf37"}, + {file = "aiohttp-3.9.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:54287bcb74d21715ac8382e9de146d9442b5f133d9babb7e5d9e453faadd005e"}, + {file = "aiohttp-3.9.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5bb3d05569aa83011fcb346b5266e00b04180105fcacc63743fc2e4a1862a891"}, + {file = "aiohttp-3.9.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c8534e7d69bb8e8d134fe2be9890d1b863518582f30c9874ed7ed12e48abe3c4"}, + {file = "aiohttp-3.9.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4bd9d5b989d57b41e4ff56ab250c5ddf259f32db17159cce630fd543376bd96b"}, + {file = "aiohttp-3.9.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fa6904088e6642609981f919ba775838ebf7df7fe64998b1a954fb411ffb4663"}, + {file = "aiohttp-3.9.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bda42eb410be91b349fb4ee3a23a30ee301c391e503996a638d05659d76ea4c2"}, + {file = "aiohttp-3.9.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:193cc1ccd69d819562cc7f345c815a6fc51d223b2ef22f23c1a0f67a88de9a72"}, + {file = "aiohttp-3.9.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:b9f1cb839b621f84a5b006848e336cf1496688059d2408e617af33e3470ba204"}, + {file = "aiohttp-3.9.2-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:d22a0931848b8c7a023c695fa2057c6aaac19085f257d48baa24455e67df97ec"}, + {file = "aiohttp-3.9.2-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:4112d8ba61fbd0abd5d43a9cb312214565b446d926e282a6d7da3f5a5aa71d36"}, + {file = "aiohttp-3.9.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c4ad4241b52bb2eb7a4d2bde060d31c2b255b8c6597dd8deac2f039168d14fd7"}, + {file = "aiohttp-3.9.2-cp311-cp311-win32.whl", hash = "sha256:ee2661a3f5b529f4fc8a8ffee9f736ae054adfb353a0d2f78218be90617194b3"}, + {file = "aiohttp-3.9.2-cp311-cp311-win_amd64.whl", hash = "sha256:4deae2c165a5db1ed97df2868ef31ca3cc999988812e82386d22937d9d6fed52"}, + {file = "aiohttp-3.9.2.tar.gz", hash = "sha256:b0ad0a5e86ce73f5368a164c10ada10504bf91869c05ab75d982c6048217fbf7"}, ] [[package]] @@ -258,7 +258,7 @@ files = [ [[package]] name = "black" -version = "24.1.0" +version = "24.1.1" requires_python = ">=3.8" summary = "The uncompromising code formatter." groups = ["default", "dev"] @@ -270,12 +270,12 @@ dependencies = [ "platformdirs>=2", ] files = [ - {file = "black-24.1.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6cc5a6ba3e671cfea95a40030b16a98ee7dc2e22b6427a6f3389567ecf1b5262"}, - {file = "black-24.1.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e0e367759062dcabcd9a426d12450c6d61faf1704a352a49055a04c9f9ce8f5a"}, - {file = "black-24.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:be305563ff4a2dea813f699daaffac60b977935f3264f66922b1936a5e492ee4"}, - {file = "black-24.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:6a8977774929b5db90442729f131221e58cc5d8208023c6af9110f26f75b6b20"}, - {file = "black-24.1.0-py3-none-any.whl", hash = "sha256:5134a6f6b683aa0a5592e3fd61dd3519d8acd953d93e2b8b76f9981245b65594"}, - {file = "black-24.1.0.tar.gz", hash = "sha256:30fbf768cd4f4576598b1db0202413fafea9a227ef808d1a12230c643cefe9fc"}, + {file = "black-24.1.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:fc1ec9aa6f4d98d022101e015261c056ddebe3da6a8ccfc2c792cbe0349d48b7"}, + {file = "black-24.1.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:0269dfdea12442022e88043d2910429bed717b2d04523867a85dacce535916b8"}, + {file = "black-24.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b3d64db762eae4a5ce04b6e3dd745dcca0fb9560eb931a5be97472e38652a161"}, + {file = "black-24.1.1-cp311-cp311-win_amd64.whl", hash = "sha256:5d7b06ea8816cbd4becfe5f70accae953c53c0e53aa98730ceccb0395520ee5d"}, + {file = "black-24.1.1-py3-none-any.whl", hash = "sha256:5cdc2e2195212208fbcae579b931407c1fa9997584f0a415421748aeafff1168"}, + {file = "black-24.1.1.tar.gz", hash = "sha256:48b5760dcbfe5cf97fd4fba23946681f3a81514c6ab8a45b50da67ac8fbc6c7b"}, ] [[package]] @@ -1277,16 +1277,16 @@ files = [ [[package]] name = "pytest-asyncio" -version = "0.23.3" +version = "0.23.4" requires_python = ">=3.8" summary = "Pytest support for asyncio" groups = ["dev"] dependencies = [ - "pytest>=7.0.0", + "pytest<8,>=7.0.0", ] files = [ - {file = "pytest-asyncio-0.23.3.tar.gz", hash = "sha256:af313ce900a62fbe2b1aed18e37ad757f1ef9940c6b6a88e2954de38d6b1fb9f"}, - {file = "pytest_asyncio-0.23.3-py3-none-any.whl", hash = "sha256:37a9d912e8338ee7b4a3e917381d1c95bfc8682048cb0fbc35baba316ec1faba"}, + {file = "pytest-asyncio-0.23.4.tar.gz", hash = "sha256:2143d9d9375bf372a73260e4114541485e84fca350b0b6b92674ca56ff5f7ea2"}, + {file = "pytest_asyncio-0.23.4-py3-none-any.whl", hash = "sha256:b0079dfac14b60cd1ce4691fbfb1748fe939db7d0234b5aba97197d10fbe0fef"}, ] [[package]] diff --git a/pyproject.toml b/pyproject.toml index 67745c4da..df4f09b81 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "dipdup" description = "Modular framework for creating selective indexers and featureful backends for dapps" -version = "7.3.0" +version = "7.3.1" license = { text = "MIT" } authors = [ { name = "Lev Gorodetskii", email = "dipdup@drsr.io" }, diff --git a/requirements.dev.txt b/requirements.dev.txt index 0b33d8e98..5218e9f3c 100644 --- a/requirements.dev.txt +++ b/requirements.dev.txt @@ -1,7 +1,7 @@ # This file is @generated by PDM. # Please do not edit it manually. -aiohttp==3.9.1 +aiohttp==3.9.2 aiolimiter==1.1.0 aiosignal==1.3.1 aiosqlite==0.17.0 @@ -16,7 +16,7 @@ asyncpg==0.29.0 attrs==23.2.0 babel==2.14.0 bitarray==2.9.2 -black==24.1.0 +black==24.1.1 certifi==2023.11.17 charset-normalizer==3.3.2 click==8.1.7 @@ -75,7 +75,7 @@ pypika-tortoise==0.1.6 pysignalr==0.2.0 pytest==7.4.4 pytest-aiohttp==1.0.5 -pytest-asyncio==0.23.3 +pytest-asyncio==0.23.4 pytest-cov==4.1.0 pytest-xdist==3.5.0 python-dotenv==1.0.1 diff --git a/requirements.txt b/requirements.txt index 4f4995977..864a198f9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ # This file is @generated by PDM. # Please do not edit it manually. -aiohttp==3.9.1 +aiohttp==3.9.2 aiolimiter==1.1.0 aiosignal==1.3.1 aiosqlite==0.17.0 @@ -14,7 +14,7 @@ asyncclick==8.1.7.1 asyncpg==0.29.0 attrs==23.2.0 bitarray==2.9.2 -black==24.1.0 +black==24.1.1 certifi==2023.11.17 charset-normalizer==3.3.2 click==8.1.7 diff --git a/src/demo_auction/pyproject.toml b/src/demo_auction/pyproject.toml index d05713250..2f454ca55 100644 --- a/src/demo_auction/pyproject.toml +++ b/src/demo_auction/pyproject.toml @@ -1,4 +1,4 @@ -# Generated by DipDup 7.3.0+editable +# Generated by DipDup 7.3.1+editable [project] name = "demo_auction" version = "0.0.1" diff --git a/src/demo_big_maps/pyproject.toml b/src/demo_big_maps/pyproject.toml index cbc9ea660..1a3340364 100644 --- a/src/demo_big_maps/pyproject.toml +++ b/src/demo_big_maps/pyproject.toml @@ -1,4 +1,4 @@ -# Generated by DipDup 7.3.0+editable +# Generated by DipDup 7.3.1+editable [project] name = "demo_big_maps" version = "0.0.1" diff --git a/src/demo_blank/pyproject.toml b/src/demo_blank/pyproject.toml index ed0a95835..94ac0da80 100644 --- a/src/demo_blank/pyproject.toml +++ b/src/demo_blank/pyproject.toml @@ -1,4 +1,4 @@ -# Generated by DipDup 7.3.0+editable +# Generated by DipDup 7.3.1+editable [project] name = "demo_blank" version = "0.0.1" diff --git a/src/demo_dao/pyproject.toml b/src/demo_dao/pyproject.toml index 78f3719a2..0cb3e3593 100644 --- a/src/demo_dao/pyproject.toml +++ b/src/demo_dao/pyproject.toml @@ -1,4 +1,4 @@ -# Generated by DipDup 7.3.0+editable +# Generated by DipDup 7.3.1+editable [project] name = "demo_dao" version = "0.0.1" diff --git a/src/demo_dex/pyproject.toml b/src/demo_dex/pyproject.toml index 0b2b6a1d9..3e5cb604c 100644 --- a/src/demo_dex/pyproject.toml +++ b/src/demo_dex/pyproject.toml @@ -1,4 +1,4 @@ -# Generated by DipDup 7.3.0+editable +# Generated by DipDup 7.3.1+editable [project] name = "demo_dex" version = "0.0.1" diff --git a/src/demo_domains/pyproject.toml b/src/demo_domains/pyproject.toml index c8b33fc44..ab098973f 100644 --- a/src/demo_domains/pyproject.toml +++ b/src/demo_domains/pyproject.toml @@ -1,4 +1,4 @@ -# Generated by DipDup 7.3.0+editable +# Generated by DipDup 7.3.1+editable [project] name = "demo_domains" version = "0.0.1" diff --git a/src/demo_etherlink/pyproject.toml b/src/demo_etherlink/pyproject.toml index d6d264080..10ad96563 100644 --- a/src/demo_etherlink/pyproject.toml +++ b/src/demo_etherlink/pyproject.toml @@ -1,4 +1,4 @@ -# Generated by DipDup 7.3.0+editable +# Generated by DipDup 7.3.1+editable [project] name = "demo_etherlink" version = "0.0.1" diff --git a/src/demo_events/pyproject.toml b/src/demo_events/pyproject.toml index 344b37a64..d1d473b1c 100644 --- a/src/demo_events/pyproject.toml +++ b/src/demo_events/pyproject.toml @@ -1,4 +1,4 @@ -# Generated by DipDup 7.3.0+editable +# Generated by DipDup 7.3.1+editable [project] name = "demo_events" version = "0.0.1" diff --git a/src/demo_evm_events/pyproject.toml b/src/demo_evm_events/pyproject.toml index f7108f2a1..6f2252f6e 100644 --- a/src/demo_evm_events/pyproject.toml +++ b/src/demo_evm_events/pyproject.toml @@ -1,4 +1,4 @@ -# Generated by DipDup 7.3.0+editable +# Generated by DipDup 7.3.1+editable [project] name = "demo_evm_events" version = "0.0.1" diff --git a/src/demo_factories/pyproject.toml b/src/demo_factories/pyproject.toml index b134a3ec5..42b2f1065 100644 --- a/src/demo_factories/pyproject.toml +++ b/src/demo_factories/pyproject.toml @@ -1,4 +1,4 @@ -# Generated by DipDup 7.3.0+editable +# Generated by DipDup 7.3.1+editable [project] name = "demo_factories" version = "0.0.1" diff --git a/src/demo_head/pyproject.toml b/src/demo_head/pyproject.toml index 923938287..f2249719a 100644 --- a/src/demo_head/pyproject.toml +++ b/src/demo_head/pyproject.toml @@ -1,4 +1,4 @@ -# Generated by DipDup 7.3.0+editable +# Generated by DipDup 7.3.1+editable [project] name = "demo_head" version = "0.0.1" diff --git a/src/demo_nft_marketplace/pyproject.toml b/src/demo_nft_marketplace/pyproject.toml index 3f79dc1c4..392fb1997 100644 --- a/src/demo_nft_marketplace/pyproject.toml +++ b/src/demo_nft_marketplace/pyproject.toml @@ -1,4 +1,4 @@ -# Generated by DipDup 7.3.0+editable +# Generated by DipDup 7.3.1+editable [project] name = "demo_nft_marketplace" version = "0.0.1" diff --git a/src/demo_raw/pyproject.toml b/src/demo_raw/pyproject.toml index 0e657c23a..791911bd8 100644 --- a/src/demo_raw/pyproject.toml +++ b/src/demo_raw/pyproject.toml @@ -1,4 +1,4 @@ -# Generated by DipDup 7.3.0+editable +# Generated by DipDup 7.3.1+editable [project] name = "demo_raw" version = "0.0.1" diff --git a/src/demo_token/pyproject.toml b/src/demo_token/pyproject.toml index 711cd0184..156049ce8 100644 --- a/src/demo_token/pyproject.toml +++ b/src/demo_token/pyproject.toml @@ -1,4 +1,4 @@ -# Generated by DipDup 7.3.0+editable +# Generated by DipDup 7.3.1+editable [project] name = "demo_token" version = "0.0.1" diff --git a/src/demo_token_balances/pyproject.toml b/src/demo_token_balances/pyproject.toml index 52c6ccf60..d23947bb4 100644 --- a/src/demo_token_balances/pyproject.toml +++ b/src/demo_token_balances/pyproject.toml @@ -1,4 +1,4 @@ -# Generated by DipDup 7.3.0+editable +# Generated by DipDup 7.3.1+editable [project] name = "demo_token_balances" version = "0.0.1" diff --git a/src/demo_token_transfers/pyproject.toml b/src/demo_token_transfers/pyproject.toml index 2f939a3f9..4b1af9b3e 100644 --- a/src/demo_token_transfers/pyproject.toml +++ b/src/demo_token_transfers/pyproject.toml @@ -1,4 +1,4 @@ -# Generated by DipDup 7.3.0+editable +# Generated by DipDup 7.3.1+editable [project] name = "demo_token_transfers" version = "0.0.1" diff --git a/src/demo_uniswap/pyproject.toml b/src/demo_uniswap/pyproject.toml index 643020183..7259c4eb2 100644 --- a/src/demo_uniswap/pyproject.toml +++ b/src/demo_uniswap/pyproject.toml @@ -1,4 +1,4 @@ -# Generated by DipDup 7.3.0+editable +# Generated by DipDup 7.3.1+editable [project] name = "demo_uniswap" version = "0.0.1" diff --git a/src/dipdup/codegen/__init__.py b/src/dipdup/codegen/__init__.py index 0a0f7ca5a..88c407ad4 100644 --- a/src/dipdup/codegen/__init__.py +++ b/src/dipdup/codegen/__init__.py @@ -62,7 +62,7 @@ async def init( force = any(str(path).startswith('types') for path in self._include) await self.generate_abi() - await self.generate_schemas(force) + await self.generate_schemas() await self._generate_types(force) await self._generate_models() @@ -74,7 +74,7 @@ async def init( async def generate_abi(self) -> None: ... @abstractmethod - async def generate_schemas(self, force: bool = False) -> None: ... + async def generate_schemas(self) -> None: ... @abstractmethod async def generate_hooks(self) -> None: ... diff --git a/src/dipdup/codegen/evm_subsquid.py b/src/dipdup/codegen/evm_subsquid.py index d2169af24..c208bf6bb 100644 --- a/src/dipdup/codegen/evm_subsquid.py +++ b/src/dipdup/codegen/evm_subsquid.py @@ -108,9 +108,8 @@ async def generate_abi(self) -> None: if isinstance(index_config, SubsquidEventsIndexConfig): await self._fetch_abi(index_config) - async def generate_schemas(self, force: bool = False) -> None: - if force: - self._cleanup_schemas() + async def generate_schemas(self) -> None: + self._cleanup_schemas() events: set[str] = set() functions: set[str] = set() diff --git a/src/dipdup/codegen/tezos_tzkt.py b/src/dipdup/codegen/tezos_tzkt.py index 8af3f7608..b0e093743 100644 --- a/src/dipdup/codegen/tezos_tzkt.py +++ b/src/dipdup/codegen/tezos_tzkt.py @@ -107,8 +107,10 @@ def __init__( async def generate_abi(self) -> None: pass - async def generate_schemas(self, force: bool = False) -> None: + async def generate_schemas(self) -> None: """Fetch JSONSchemas for all contracts used in config""" + self._cleanup_schemas() + self._logger.info('Fetching contract schemas') await late_tzkt_initialization( config=self._config, @@ -116,9 +118,6 @@ async def generate_schemas(self, force: bool = False) -> None: reindex_fn=None, ) - if force: - self._cleanup_schemas() - unused_operation_templates = [ t for t in self._config.templates.values() if isinstance(t, TzktOperationsIndexConfig) ]