diff --git a/api/tzprofiles/.dockerignore b/api/tzprofiles/.dockerignore index be4140ec..0d200bb2 100644 --- a/api/tzprofiles/.dockerignore +++ b/api/tzprofiles/.dockerignore @@ -4,7 +4,7 @@ # Add metadata and build files !tzprofiles !pyproject.toml -!pdm.lock +!*.lock !README.md # Add Python code diff --git a/api/tzprofiles/.gitignore b/api/tzprofiles/.gitignore index 6a945192..92350b33 100644 --- a/api/tzprofiles/.gitignore +++ b/api/tzprofiles/.gitignore @@ -10,7 +10,7 @@ !**/Dockerfile !**/Makefile !**/pyproject.toml -!**/pdm.lock +!**/*.lock !**/README.md !**/.keep diff --git a/api/tzprofiles/Makefile b/api/tzprofiles/Makefile new file mode 100644 index 00000000..03f7500d --- /dev/null +++ b/api/tzprofiles/Makefile @@ -0,0 +1,46 @@ +.ONESHELL: +.PHONY: $(MAKECMDGOALS) +MAKEFLAGS += --no-print-directory +## +## 🚧 DipDup developer tools +## +PACKAGE=tzprofiles +TAG=latest +COMPOSE=deploy/compose.yaml + +help: ## Show this help (default) + @grep -Fh "##" $(MAKEFILE_LIST) | grep -Fv grep -F | sed -e 's/\\$$//' | sed -e 's/##//' + +all: ## Run an entire CI pipeline + make format lint + +format: ## Format with all tools + make black + +lint: ## Lint with all tools + make ruff mypy + +## + +black: ## Format with black + black . + +ruff: ## Lint with ruff + ruff check --fix . + +mypy: ## Lint with mypy + mypy --no-incremental --exclude ${PACKAGE} . + +## + +image: ## Build Docker image + docker buildx build . -t ${PACKAGE}:${TAG} + +up: ## Run Compose stack + docker-compose -f ${COMPOSE} up -d --build + docker-compose -f ${COMPOSE} logs -f + +down: ## Stop Compose stack + docker-compose -f ${COMPOSE} down + +## \ No newline at end of file diff --git a/api/tzprofiles/README.md b/api/tzprofiles/README.md index a31ee182..ed158394 100644 --- a/api/tzprofiles/README.md +++ b/api/tzprofiles/README.md @@ -6,9 +6,9 @@ DipDup indexer for Tezos Profiles This project is based on [DipDup](https://dipdup.io), a framework for building featureful dapps. -You need a Linux/macOS system with Python 3.11 installed. Use our installer for easy setup: +You need a Linux/macOS system with Python 3.11 installed. To install DipDup with pipx for the current user: -```bash +```shell curl -Lsf https://dipdup.io/install.py | python3 ``` @@ -16,25 +16,38 @@ See the [Installation](https://dipdup.io/docs/installation) page for all options ## Usage -Run the indexer in-memory: +Run the indexer in memory: -```bash +```shell dipdup run ``` Store data in SQLite database: -```bash -dipdup -c . -c configs/dipdup.sqlite.yml run +```shell +dipdup -c . -c configs/dipdup.sqlite.yaml run ``` -Or spawn a docker-compose stack: +Or spawn a Compose stack with PostgreSQL and Hasura: -```bash -cp deploy/.env.default deploy/.env -# Edit .env before running -docker-compose -f deploy/compose.yaml up +```shell +cd deploy +cp .env.default .env +# Edit .env file before running +docker-compose up ``` + +## Development setup + +To set up the development environment: + +```shell +pdm install +$(pdm venv activate) +``` + +Run `make all` to run full CI check or `make help` to see other available commands. + ## Usage For now, only a GraphQL API is available at `/v1/graphql` (to be used with diff --git a/api/tzprofiles/configs/dipdup.compose.yaml b/api/tzprofiles/configs/dipdup.compose.yaml index 98824f36..ff2b5e1a 100644 --- a/api/tzprofiles/configs/dipdup.compose.yaml +++ b/api/tzprofiles/configs/dipdup.compose.yaml @@ -17,6 +17,4 @@ sentry: environment: ${SENTRY_ENVIRONMENT:-""} prometheus: - host: 0.0.0.0 - -logging: ${LOGLEVEL:-INFO} \ No newline at end of file + host: 0.0.0.0 \ No newline at end of file diff --git a/api/tzprofiles/configs/dipdup.sqlite.yaml b/api/tzprofiles/configs/dipdup.sqlite.yaml index 2ad3ded7..51a04be4 100644 --- a/api/tzprofiles/configs/dipdup.sqlite.yaml +++ b/api/tzprofiles/configs/dipdup.sqlite.yaml @@ -1,5 +1,3 @@ database: kind: sqlite - path: ${SQLITE_PATH:-/tmp/tzprofiles.sqlite} - -logging: ${LOGLEVEL:-INFO} \ No newline at end of file + path: ${SQLITE_PATH:-/tmp/tzprofiles.sqlite} \ No newline at end of file diff --git a/api/tzprofiles/configs/dipdup.swarm.yaml b/api/tzprofiles/configs/dipdup.swarm.yaml index edf123dd..346334d4 100644 --- a/api/tzprofiles/configs/dipdup.swarm.yaml +++ b/api/tzprofiles/configs/dipdup.swarm.yaml @@ -17,6 +17,4 @@ sentry: environment: ${SENTRY_ENVIRONMENT:-""} prometheus: - host: 0.0.0.0 - -logging: ${LOGLEVEL:-INFO} \ No newline at end of file + host: 0.0.0.0 \ No newline at end of file diff --git a/api/tzprofiles/configs/replay.yaml b/api/tzprofiles/configs/replay.yaml index 52f868e9..3d1c9de4 100644 --- a/api/tzprofiles/configs/replay.yaml +++ b/api/tzprofiles/configs/replay.yaml @@ -1,4 +1,6 @@ -# Run `dipdup new --replay configs/replay.yaml` to generate new project from this replay +# To refresh existing project run `dipdup init --base --force` after modifying this file. +# To generate a new project from this replay run `dipdup new --replay `. +# spec_version: 2.0 replay: dipdup_version: 7 @@ -13,3 +15,4 @@ replay: postgres_data_path: /var/lib/postgresql/data hasura_image: hasura/graphql-engine:latest line_length: 120 + package_manager: pdm diff --git a/api/tzprofiles/deploy/.env.default b/api/tzprofiles/deploy/.env.default index 00b262cb..dfeb321f 100644 --- a/api/tzprofiles/deploy/.env.default +++ b/api/tzprofiles/deploy/.env.default @@ -3,7 +3,6 @@ # HASURA_HOST=hasura HASURA_SECRET= -LOGLEVEL=INFO POSTGRES_DB=dipdup POSTGRES_HOST=db POSTGRES_PASSWORD= diff --git a/api/tzprofiles/deploy/sqlite.env.default b/api/tzprofiles/deploy/sqlite.env.default index 68aa3da6..986b8b0c 100644 --- a/api/tzprofiles/deploy/sqlite.env.default +++ b/api/tzprofiles/deploy/sqlite.env.default @@ -1,5 +1,4 @@ # This env file was generated automatically by DipDup. Do not edit it! # Create a copy with .env extension, fill it with your values and run DipDup with `--env-file` option. # -LOGLEVEL=INFO SQLITE_PATH=/tmp/tzprofiles.sqlite diff --git a/api/tzprofiles/deploy/swarm.env.default b/api/tzprofiles/deploy/swarm.env.default index 75bc4278..6d1f66b5 100644 --- a/api/tzprofiles/deploy/swarm.env.default +++ b/api/tzprofiles/deploy/swarm.env.default @@ -3,7 +3,6 @@ # HASURA_HOST=tzprofiles_hasura HASURA_SECRET= -LOGLEVEL=INFO POSTGRES_DB=dipdup POSTGRES_HOST=tzprofiles_db POSTGRES_PASSWORD= diff --git a/api/tzprofiles/handlers/__init__.py b/api/tzprofiles/handlers/__init__.py index 78441727..c15142c7 100644 --- a/api/tzprofiles/handlers/__init__.py +++ b/api/tzprofiles/handlers/__init__.py @@ -85,7 +85,7 @@ def __init__(self, message="Credential doesn't exist in Kepler anymore"): after=after_log(LOGGER, logging.WARNING), # type: ignore[arg-type] ) async def retrieve_claim(kepler_link: str) -> str: - orbit_id, file_hash = tuple(kepler_link.replace("kepler://", "").replace('v0:', '').split("/")) + orbit_id, file_hash = tuple(kepler_link.replace("kepler://", "").replace("v0:", "").split("/")) url = urljoin(KEPLER_ENDPOINT, orbit_id + "/" + file_hash) async with aiohttp.ClientSession() as session: async with session.get(url) as response: @@ -116,8 +116,7 @@ async def resolve_claim(kepler_link: str, checksum: str) -> dict[str, Any]: if len(errors) > 0: raise FailedVerification(claim, str(errors)) - claim_json = json.loads(claim) - return claim_json + return json.loads(claim) def validate_vc(vc: dict[str, Any], address: str) -> None: diff --git a/api/tzprofiles/hooks/on_index_rollback.py b/api/tzprofiles/hooks/on_index_rollback.py index 3d38655e..27bfef63 100644 --- a/api/tzprofiles/hooks/on_index_rollback.py +++ b/api/tzprofiles/hooks/on_index_rollback.py @@ -8,7 +8,7 @@ async def on_index_rollback( from_level: int, to_level: int, ) -> None: - await ctx.execute_sql('on_index_rollback') + await ctx.execute_sql("on_index_rollback") await ctx.rollback( index=index.name, from_level=from_level, diff --git a/api/tzprofiles/hooks/on_reindex.py b/api/tzprofiles/hooks/on_reindex.py index 0804aae3..b1ac0091 100644 --- a/api/tzprofiles/hooks/on_reindex.py +++ b/api/tzprofiles/hooks/on_reindex.py @@ -4,4 +4,4 @@ async def on_reindex( ctx: HookContext, ) -> None: - await ctx.execute_sql('on_reindex') \ No newline at end of file + await ctx.execute_sql("on_reindex") \ No newline at end of file diff --git a/api/tzprofiles/hooks/on_restart.py b/api/tzprofiles/hooks/on_restart.py index 2581b5be..90520ce0 100644 --- a/api/tzprofiles/hooks/on_restart.py +++ b/api/tzprofiles/hooks/on_restart.py @@ -4,4 +4,4 @@ async def on_restart( ctx: HookContext, ) -> None: - await ctx.execute_sql('on_restart') \ No newline at end of file + await ctx.execute_sql("on_restart") \ No newline at end of file diff --git a/api/tzprofiles/hooks/on_synchronized.py b/api/tzprofiles/hooks/on_synchronized.py index 09099e4b..62ab82d1 100644 --- a/api/tzprofiles/hooks/on_synchronized.py +++ b/api/tzprofiles/hooks/on_synchronized.py @@ -4,4 +4,4 @@ async def on_synchronized( ctx: HookContext, ) -> None: - await ctx.execute_sql('on_synchronized') \ No newline at end of file + await ctx.execute_sql("on_synchronized") \ No newline at end of file diff --git a/api/tzprofiles/hooks/resolver.py b/api/tzprofiles/hooks/resolver.py index 39958254..d2f82e0a 100644 --- a/api/tzprofiles/hooks/resolver.py +++ b/api/tzprofiles/hooks/resolver.py @@ -10,14 +10,14 @@ from tzprofiles.models import TZProfile SLEEP = 5 -_ENV_BATCH = os.getenv('BATCH') +_ENV_BATCH = os.getenv("BATCH") BATCH = int(_ENV_BATCH) if _ENV_BATCH is not None else 100 IGNORED_PROFILES = ( - 'KT1G6jaUQkRcxJcnrNLjCTn7xgD686PM2mEd', + "KT1G6jaUQkRcxJcnrNLjCTn7xgD686PM2mEd", ) async def _resolve(ctx: HookContext, profile: TZProfile): - ctx.logger.info(f'Resolving profile {profile.contract}') + ctx.logger.info("Resolving profile %s", profile.contract) if profile.contract in IGNORED_PROFILES: profile.failed = True @@ -39,12 +39,12 @@ async def _resolve(ctx: HookContext, profile: TZProfile): assert profile.account is not None await ctx.update_contract_metadata( - network='mainnet', + network="mainnet", address=profile.account, metadata=profile.metadata, ) ctx.logger.debug( - 'Resolved in %.2f, saved in %.2f seconds', + "Resolved in %.2f, saved in %.2f seconds", resolved_at - started_at, time.perf_counter() - resolved_at, ) @@ -57,24 +57,24 @@ async def resolver( ) -> None: ctx.logger.logger.level = logging.INFO # config not being used here set_logger(ctx.logger) - ctx.logger.info('Starting resolver daemon') + ctx.logger.info("Starting resolver daemon") while True: - ctx.logger.info('Starting loop') + ctx.logger.info("Starting loop") profiles = await TZProfile.filter(resolved=False).limit(BATCH).all() # .only('account') doesn't with dipdup wrapper of versioned data if not profiles: - ctx.logger.info('No profiles to resolve, sleeping %s seconds', SLEEP) + ctx.logger.info("No profiles to resolve, sleeping %s seconds", SLEEP) await asyncio.sleep(SLEEP) continue start = time.time() - ctx.logger.info('Starting batch') + ctx.logger.info("Starting batch") await asyncio.gather(*[_resolve(ctx, profile) for profile in profiles]) - ctx.logger.info('Finished batch') + ctx.logger.info("Finished batch") end = time.time() remain = start + 1 - end if remain > 0: await asyncio.sleep(remain) - ctx.logger.info('Finishing loop') + ctx.logger.info("Finishing loop") diff --git a/api/tzprofiles/models/__init__.py b/api/tzprofiles/models/__init__.py index 7852e57f..f7e77d08 100644 --- a/api/tzprofiles/models/__init__.py +++ b/api/tzprofiles/models/__init__.py @@ -1,5 +1,4 @@ from typing import Any -from typing import Dict from dipdup import fields from dipdup.models import Model @@ -42,18 +41,18 @@ def reset(self) -> None: self.ethereum = None # type: ignore[assignment] @property - def metadata(self) -> Dict[str, Any]: + def metadata(self) -> dict[str, Any]: return { - 'alias': self.alias, - 'description': self.description, - 'logo': self.logo, - 'website': self.website, - 'twitter': self.twitter, - 'domain_name': self.domain_name, - 'discord': self.discord, - 'github': self.github, - 'ethereum': self.ethereum, + "alias": self.alias, + "description": self.description, + "logo": self.logo, + "website": self.website, + "twitter": self.twitter, + "domain_name": self.domain_name, + "discord": self.discord, + "github": self.github, + "ethereum": self.ethereum, } class Meta: - table = 'tzprofiles' + table = "tzprofiles" diff --git a/api/tzprofiles/pdm.lock b/api/tzprofiles/pdm.lock index 5280a307..29b377ad 100644 --- a/api/tzprofiles/pdm.lock +++ b/api/tzprofiles/pdm.lock @@ -3,10 +3,9 @@ [metadata] groups = ["default", "dev"] -cross_platform = true -static_urls = false -lock_version = "4.3" -content_hash = "sha256:4c2974fbd83bc660a5792adf0bce2abe20d617a6741f472c8d78b48c1afafde2" +strategy = ["cross_platform"] +lock_version = "4.4" +content_hash = "sha256:a8d33b8f93e8937c1ddd42dd7cc8e38c8a37b014e4c4dd476ed74398f6eb8662" [[package]] name = "aiohttp" @@ -79,16 +78,16 @@ files = [ [[package]] name = "anyio" -version = "3.7.1" -requires_python = ">=3.7" +version = "4.1.0" +requires_python = ">=3.8" summary = "High level compatibility layer for multiple asynchronous event loop implementations" dependencies = [ "idna>=2.8", "sniffio>=1.1", ] files = [ - {file = "anyio-3.7.1-py3-none-any.whl", hash = "sha256:91dee416e570e92c64041bd18b900d1d6fa78dff7048769ce5ac5ddad004fbb5"}, - {file = "anyio-3.7.1.tar.gz", hash = "sha256:44a3c9aba0f5defa43261a8b3efb97891f2bd7d804e0e1f56419befa1adfc780"}, + {file = "anyio-4.1.0-py3-none-any.whl", hash = "sha256:56a415fbc462291813a94528a779597226619c8e78af7de0507333f700011e5f"}, + {file = "anyio-4.1.0.tar.gz", hash = "sha256:5a0bec7085176715be77df87fc66d6c9d70626bd752fcc85f57cdbee5b3760da"}, ] [[package]] @@ -129,12 +128,12 @@ files = [ [[package]] name = "async-timeout" -version = "4.0.2" -requires_python = ">=3.6" +version = "4.0.3" +requires_python = ">=3.7" summary = "Timeout context manager for asyncio programs" files = [ - {file = "async-timeout-4.0.2.tar.gz", hash = "sha256:2163e1640ddb52b7a8c80d0a67a08587e5d245cc9c553a74a847056bc2976b15"}, - {file = "async_timeout-4.0.2-py3-none-any.whl", hash = "sha256:8ca1e4fcf50d07413d66d1a5e416e42cfdf5851c981d679a09851a6853383b3c"}, + {file = "async-timeout-4.0.3.tar.gz", hash = "sha256:4640d96be84d82d02ed59ea2b7105a0f7b33abe8703703cd0ab0bf87c427522f"}, + {file = "async_timeout-4.0.3-py3-none-any.whl", hash = "sha256:7405140ff1230c310e51dc27b3145b9092d659ce68ff733fb0cefe3ee42be028"}, ] [[package]] @@ -152,19 +151,22 @@ files = [ [[package]] name = "asyncpg" -version = "0.28.0" -requires_python = ">=3.7.0" +version = "0.29.0" +requires_python = ">=3.8.0" summary = "An asyncio PostgreSQL driver" +dependencies = [ + "async-timeout>=4.0.3; python_version < \"3.12.0\"", +] files = [ - {file = "asyncpg-0.28.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a0e08fe2c9b3618459caaef35979d45f4e4f8d4f79490c9fa3367251366af207"}, - {file = "asyncpg-0.28.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b24e521f6060ff5d35f761a623b0042c84b9c9b9fb82786aadca95a9cb4a893b"}, - {file = "asyncpg-0.28.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:99417210461a41891c4ff301490a8713d1ca99b694fef05dabd7139f9d64bd6c"}, - {file = "asyncpg-0.28.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f029c5adf08c47b10bcdc857001bbef551ae51c57b3110964844a9d79ca0f267"}, - {file = "asyncpg-0.28.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ad1d6abf6c2f5152f46fff06b0e74f25800ce8ec6c80967f0bc789974de3c652"}, - {file = "asyncpg-0.28.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d7fa81ada2807bc50fea1dc741b26a4e99258825ba55913b0ddbf199a10d69d8"}, - {file = "asyncpg-0.28.0-cp311-cp311-win32.whl", hash = "sha256:f33c5685e97821533df3ada9384e7784bd1e7865d2b22f153f2e4bd4a083e102"}, - {file = "asyncpg-0.28.0-cp311-cp311-win_amd64.whl", hash = "sha256:5e7337c98fb493079d686a4a6965e8bcb059b8e1b8ec42106322fc6c1c889bb0"}, - {file = "asyncpg-0.28.0.tar.gz", hash = "sha256:7252cdc3acb2f52feaa3664280d3bcd78a46bd6c10bfd681acfffefa1120e278"}, + {file = "asyncpg-0.29.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:d4900ee08e85af01adb207519bb4e14b1cae8fd21e0ccf80fac6aa60b6da37b4"}, + {file = "asyncpg-0.29.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a65c1dcd820d5aea7c7d82a3fdcb70e096f8f70d1a8bf93eb458e49bfad036ac"}, + {file = "asyncpg-0.29.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5b52e46f165585fd6af4863f268566668407c76b2c72d366bb8b522fa66f1870"}, + {file = "asyncpg-0.29.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dc600ee8ef3dd38b8d67421359779f8ccec30b463e7aec7ed481c8346decf99f"}, + {file = "asyncpg-0.29.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:039a261af4f38f949095e1e780bae84a25ffe3e370175193174eb08d3cecab23"}, + {file = "asyncpg-0.29.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:6feaf2d8f9138d190e5ec4390c1715c3e87b37715cd69b2c3dfca616134efd2b"}, + {file = "asyncpg-0.29.0-cp311-cp311-win32.whl", hash = "sha256:1e186427c88225ef730555f5fdda6c1812daa884064bfe6bc462fd3a71c4b675"}, + {file = "asyncpg-0.29.0-cp311-cp311-win_amd64.whl", hash = "sha256:cfe73ffae35f518cfd6e4e5f5abb2618ceb5ef02a2365ce64f132601000587d3"}, + {file = "asyncpg-0.29.0.tar.gz", hash = "sha256:d1c49e1f44fffafd9a55e1a9b101590859d881d639ea2922516f5d9c512d354e"}, ] [[package]] @@ -217,7 +219,7 @@ files = [ [[package]] name = "black" -version = "23.9.1" +version = "23.11.0" requires_python = ">=3.8" summary = "The uncompromising code formatter." dependencies = [ @@ -228,13 +230,12 @@ dependencies = [ "platformdirs>=2", ] files = [ - {file = "black-23.9.1-cp311-cp311-macosx_10_16_arm64.whl", hash = "sha256:8431445bf62d2a914b541da7ab3e2b4f3bc052d2ccbf157ebad18ea126efb91f"}, - {file = "black-23.9.1-cp311-cp311-macosx_10_16_universal2.whl", hash = "sha256:8fc1ddcf83f996247505db6b715294eba56ea9372e107fd54963c7553f2b6dfe"}, - {file = "black-23.9.1-cp311-cp311-macosx_10_16_x86_64.whl", hash = "sha256:7d30ec46de88091e4316b17ae58bbbfc12b2de05e069030f6b747dfc649ad186"}, - {file = "black-23.9.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:031e8c69f3d3b09e1aa471a926a1eeb0b9071f80b17689a655f7885ac9325a6f"}, - {file = "black-23.9.1-cp311-cp311-win_amd64.whl", hash = "sha256:538efb451cd50f43aba394e9ec7ad55a37598faae3348d723b59ea8e91616300"}, - {file = "black-23.9.1-py3-none-any.whl", hash = "sha256:6ccd59584cc834b6d127628713e4b6b968e5f79572da66284532525a042549f9"}, - {file = "black-23.9.1.tar.gz", hash = "sha256:24b6b3ff5c6d9ea08a8888f6977eae858e1f340d7260cf56d70a49823236b62d"}, + {file = "black-23.11.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:cf57719e581cfd48c4efe28543fea3d139c6b6f1238b3f0102a9c73992cbb479"}, + {file = "black-23.11.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:698c1e0d5c43354ec5d6f4d914d0d553a9ada56c85415700b81dc90125aac244"}, + {file = "black-23.11.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:760415ccc20f9e8747084169110ef75d545f3b0932ee21368f63ac0fee86b221"}, + {file = "black-23.11.0-cp311-cp311-win_amd64.whl", hash = "sha256:58e5f4d08a205b11800332920e285bd25e1a75c54953e05502052738fe16b3b5"}, + {file = "black-23.11.0-py3-none-any.whl", hash = "sha256:54caaa703227c6e0c87b76326d0862184729a69b73d3b7305b6288e1d830067e"}, + {file = "black-23.11.0.tar.gz", hash = "sha256:4c68855825ff432d197229846f971bc4d6666ce90492e5b02013bcaca4d9ab05"}, ] [[package]] @@ -247,16 +248,6 @@ files = [ {file = "certifi-2023.7.22.tar.gz", hash = "sha256:539cc1d13202e33ca466e88b2807e29f4c13049d6d87031a3c110744495cb082"}, ] -[[package]] -name = "chardet" -version = "5.2.0" -requires_python = ">=3.7" -summary = "Universal encoding detector for Python 3" -files = [ - {file = "chardet-5.2.0-py3-none-any.whl", hash = "sha256:e1cf59446890a00105fe7b7912492ea04b6e6f06d4b742b2c788469e34c82970"}, - {file = "chardet-5.2.0.tar.gz", hash = "sha256:1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7"}, -] - [[package]] name = "charset-normalizer" version = "3.2.0" @@ -343,26 +334,23 @@ files = [ [[package]] name = "datamodel-code-generator" -version = "0.21.3" +version = "0.25.1" requires_python = ">=3.7,<4.0" summary = "Datamodel Code Generator" dependencies = [ - "PySnooper<2.0.0,>=0.4.1", "argcomplete<4.0,>=1.10", "black>=19.10b0", "genson<2.0,>=1.2.1", "inflect<6.0,>=4.1.0", "isort<6.0,>=4.3.21", "jinja2<4.0,>=2.10.1", - "openapi-spec-validator<=0.5.2,>=0.2.8", "packaging", - "prance>=0.18.2", - "pydantic[email]<3.0,>=1.10.0; python_version >= \"3.11\" and python_version < \"4.0\"", - "toml<1.0.0,>=0.10.0", + "pydantic[email]!=2.4.0,<3.0,>=1.10.0; python_version >= \"3.11\" and python_version < \"4.0\"", + "pyyaml>=6.0.1", ] files = [ - {file = "datamodel_code_generator-0.21.3-py3-none-any.whl", hash = "sha256:42b4fbf167a2352d5b7e5ee83dd57f0999683a0ebcac3b97f26c3ac135198957"}, - {file = "datamodel_code_generator-0.21.3.tar.gz", hash = "sha256:a8f05509b7632d18f3f4bfa8a313769cbe0754dac3715d25d26c71d2c0d2e0d4"}, + {file = "datamodel_code_generator-0.25.1-py3-none-any.whl", hash = "sha256:87fc3585f497fbe194f3b436376955e68dd2d875b0af517d1efef8f36ab29e9c"}, + {file = "datamodel_code_generator-0.25.1.tar.gz", hash = "sha256:1f991527e6433aa08100be60d876303f71e7c33823fbd6b2e54ad344e8928392"}, ] [[package]] @@ -387,23 +375,23 @@ files = [ [[package]] name = "dipdup" -version = "7.0.0" +version = "7.2.0" requires_python = "<3.12,>=3.11" summary = "Modular framework for creating selective indexers and featureful backends for dapps" dependencies = [ "APScheduler~=3.8", "aiohttp~=3.8", "aiolimiter~=1.0", - "anyio~=3.3", + "anyio>=4.1.0", "async-lru~=2.0", "asyncclick~=8.0", - "asyncpg~=0.28.0", - "datamodel-code-generator~=0.21.1", + "asyncpg~=0.29.0", + "datamodel-code-generator~=0.25.0", "eth-abi~=4.0", - "lru-dict~=1.2", + "lru-dict~=1.3.0", "orjson~=3.9", "prometheus-client~=0.17", - "pyarrow~=12.0", + "pyarrow<15,>=14.0.1", "pycryptodome~=3.17", "pydantic~=1.10.11", "pyhumps~=3.0", @@ -419,8 +407,8 @@ dependencies = [ "web3~=6.2", ] files = [ - {file = "dipdup-7.0.0-py3-none-any.whl", hash = "sha256:fff15430a1cc12a182876f5678f08ac3f596d16a994303e3ba341e7064164fd2"}, - {file = "dipdup-7.0.0.tar.gz", hash = "sha256:3403218f61b8b2dd3b75d2725ffb56b62d3e8fcbeafe76a4080c01e2e5ffa17d"}, + {file = "dipdup-7.2.0-py3-none-any.whl", hash = "sha256:28e5c7313bbfe6308c7eef90263f3080a0aa90bdc889522960f82af1316f4d4e"}, + {file = "dipdup-7.2.0.tar.gz", hash = "sha256:fccce3aa912b6e54210c5bdcc7410f77d44e3818ce99bf23677f057e98b4a7ca"}, ] [[package]] @@ -684,70 +672,41 @@ files = [ {file = "jsonschema-4.17.3.tar.gz", hash = "sha256:0f864437ab8b6076ba6707453ef8f98a6a0d512a80e93f8abdb676f737ecb60d"}, ] -[[package]] -name = "jsonschema-spec" -version = "0.1.6" -requires_python = ">=3.7.0,<4.0.0" -summary = "JSONSchema Spec with object-oriented paths" -dependencies = [ - "PyYAML>=5.1", - "jsonschema<4.18.0,>=4.0.0", - "pathable<0.5.0,>=0.4.1", - "requests<3.0.0,>=2.31.0", -] -files = [ - {file = "jsonschema_spec-0.1.6-py3-none-any.whl", hash = "sha256:f2206d18c89d1824c1f775ba14ed039743b41a9167bd2c5bdb774b66b3ca0bbf"}, - {file = "jsonschema_spec-0.1.6.tar.gz", hash = "sha256:90215863b56e212086641956b20127ccbf6d8a3a38343dad01d6a74d19482f76"}, -] - -[[package]] -name = "lazy-object-proxy" -version = "1.9.0" -requires_python = ">=3.7" -summary = "A fast and thorough lazy object proxy." -files = [ - {file = "lazy-object-proxy-1.9.0.tar.gz", hash = "sha256:659fb5809fa4629b8a1ac5106f669cfc7bef26fbb389dda53b3e010d1ac4ebae"}, - {file = "lazy_object_proxy-1.9.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:946d27deaff6cf8452ed0dba83ba38839a87f4f7a9732e8f9fd4107b21e6ff07"}, - {file = "lazy_object_proxy-1.9.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:79a31b086e7e68b24b99b23d57723ef7e2c6d81ed21007b6281ebcd1688acb0a"}, - {file = "lazy_object_proxy-1.9.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f699ac1c768270c9e384e4cbd268d6e67aebcfae6cd623b4d7c3bfde5a35db59"}, - {file = "lazy_object_proxy-1.9.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:bfb38f9ffb53b942f2b5954e0f610f1e721ccebe9cce9025a38c8ccf4a5183a4"}, - {file = "lazy_object_proxy-1.9.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:189bbd5d41ae7a498397287c408617fe5c48633e7755287b21d741f7db2706a9"}, - {file = "lazy_object_proxy-1.9.0-cp311-cp311-win32.whl", hash = "sha256:81fc4d08b062b535d95c9ea70dbe8a335c45c04029878e62d744bdced5141586"}, - {file = "lazy_object_proxy-1.9.0-cp311-cp311-win_amd64.whl", hash = "sha256:f2457189d8257dd41ae9b434ba33298aec198e30adf2dcdaaa3a28b9994f6adb"}, -] - [[package]] name = "lru-dict" -version = "1.2.0" +version = "1.3.0" +requires_python = ">=3.8" summary = "An Dict like LRU container." files = [ - {file = "lru-dict-1.2.0.tar.gz", hash = "sha256:13c56782f19d68ddf4d8db0170041192859616514c706b126d0df2ec72a11bd7"}, - {file = "lru_dict-1.2.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b20b7c9beb481e92e07368ebfaa363ed7ef61e65ffe6e0edbdbaceb33e134124"}, - {file = "lru_dict-1.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22147367b296be31cc858bf167c448af02435cac44806b228c9be8117f1bfce4"}, - {file = "lru_dict-1.2.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:34a3091abeb95e707f381a8b5b7dc8e4ee016316c659c49b726857b0d6d1bd7a"}, - {file = "lru_dict-1.2.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:877801a20f05c467126b55338a4e9fa30e2a141eb7b0b740794571b7d619ee11"}, - {file = "lru_dict-1.2.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7d3336e901acec897bcd318c42c2b93d5f1d038e67688f497045fc6bad2c0be7"}, - {file = "lru_dict-1.2.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:8dafc481d2defb381f19b22cc51837e8a42631e98e34b9e0892245cc96593deb"}, - {file = "lru_dict-1.2.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:87bbad3f5c3de8897b8c1263a9af73bbb6469fb90e7b57225dad89b8ef62cd8d"}, - {file = "lru_dict-1.2.0-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:25f9e0bc2fe8f41c2711ccefd2871f8a5f50a39e6293b68c3dec576112937aad"}, - {file = "lru_dict-1.2.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:ae301c282a499dc1968dd633cfef8771dd84228ae9d40002a3ea990e4ff0c469"}, - {file = "lru_dict-1.2.0-cp311-cp311-win32.whl", hash = "sha256:c9617583173a29048e11397f165501edc5ae223504a404b2532a212a71ecc9ed"}, - {file = "lru_dict-1.2.0-cp311-cp311-win_amd64.whl", hash = "sha256:6b7a031e47421d4b7aa626b8c91c180a9f037f89e5d0a71c4bb7afcf4036c774"}, - {file = "lru_dict-1.2.0-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:21b3090928c7b6cec509e755cc3ab742154b33660a9b433923bd12c37c448e3e"}, - {file = "lru_dict-1.2.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aaecd7085212d0aa4cd855f38b9d61803d6509731138bf798a9594745953245b"}, - {file = "lru_dict-1.2.0-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ead83ac59a29d6439ddff46e205ce32f8b7f71a6bd8062347f77e232825e3d0a"}, - {file = "lru_dict-1.2.0-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:312b6b2a30188586fe71358f0f33e4bac882d33f5e5019b26f084363f42f986f"}, - {file = "lru_dict-1.2.0-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:b30122e098c80e36d0117810d46459a46313421ce3298709170b687dc1240b02"}, - {file = "lru_dict-1.2.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:f010cfad3ab10676e44dc72a813c968cd586f37b466d27cde73d1f7f1ba158c2"}, - {file = "lru_dict-1.2.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:20f5f411f7751ad9a2c02e80287cedf69ae032edd321fe696e310d32dd30a1f8"}, - {file = "lru_dict-1.2.0-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:afdadd73304c9befaed02eb42f5f09fdc16288de0a08b32b8080f0f0f6350aa6"}, - {file = "lru_dict-1.2.0-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d7ab0c10c4fa99dc9e26b04e6b62ac32d2bcaea3aad9b81ec8ce9a7aa32b7b1b"}, - {file = "lru_dict-1.2.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:edad398d5d402c43d2adada390dd83c74e46e020945ff4df801166047013617e"}, - {file = "lru_dict-1.2.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:91d577a11b84387013815b1ad0bb6e604558d646003b44c92b3ddf886ad0f879"}, - {file = "lru_dict-1.2.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bb12f19cdf9c4f2d9aa259562e19b188ff34afab28dd9509ff32a3f1c2c29326"}, - {file = "lru_dict-1.2.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9e4c85aa8844bdca3c8abac3b7f78da1531c74e9f8b3e4890c6e6d86a5a3f6c0"}, - {file = "lru_dict-1.2.0-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5c6acbd097b15bead4de8e83e8a1030bb4d8257723669097eac643a301a952f0"}, - {file = "lru_dict-1.2.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:b6613daa851745dd22b860651de930275be9d3e9373283a2164992abacb75b62"}, + {file = "lru-dict-1.3.0.tar.gz", hash = "sha256:54fd1966d6bd1fcde781596cb86068214edeebff1db13a2cea11079e3fd07b6b"}, + {file = "lru_dict-1.3.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:20c595764695d20bdc3ab9b582e0cc99814da183544afb83783a36d6741a0dac"}, + {file = "lru_dict-1.3.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:d9b30a8f50c3fa72a494eca6be5810a1b5c89e4f0fda89374f0d1c5ad8d37d51"}, + {file = "lru_dict-1.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:9710737584650a4251b9a566cbb1a86f83437adb209c9ba43a4e756d12faf0d7"}, + {file = "lru_dict-1.3.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b84c321ae34f2f40aae80e18b6fa08b31c90095792ab64bb99d2e385143effaa"}, + {file = "lru_dict-1.3.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:eed24272b4121b7c22f234daed99899817d81d671b3ed030c876ac88bc9dc890"}, + {file = "lru_dict-1.3.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9bd13af06dab7c6ee92284fd02ed9a5613a07d5c1b41948dc8886e7207f86dfd"}, + {file = "lru_dict-1.3.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a1efc59bfba6aac33684d87b9e02813b0e2445b2f1c444dae2a0b396ad0ed60c"}, + {file = "lru_dict-1.3.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:cfaf75ac574447afcf8ad998789071af11d2bcf6f947643231f692948839bd98"}, + {file = "lru_dict-1.3.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:c95f8751e2abd6f778da0399c8e0239321d560dbc58cb063827123137d213242"}, + {file = "lru_dict-1.3.0-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:abd0c284b26b5c4ee806ca4f33ab5e16b4bf4d5ec9e093e75a6f6287acdde78e"}, + {file = "lru_dict-1.3.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:2a47740652b25900ac5ce52667b2eade28d8b5fdca0ccd3323459df710e8210a"}, + {file = "lru_dict-1.3.0-cp311-cp311-win32.whl", hash = "sha256:a690c23fc353681ed8042d9fe8f48f0fb79a57b9a45daea2f0be1eef8a1a4aa4"}, + {file = "lru_dict-1.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:efd3f4e0385d18f20f7ea6b08af2574c1bfaa5cb590102ef1bee781bdfba84bc"}, + {file = "lru_dict-1.3.0-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:f8f7824db5a64581180ab9d09842e6dd9fcdc46aac9cb592a0807cd37ea55680"}, + {file = "lru_dict-1.3.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:acd04b7e7b0c0c192d738df9c317093335e7282c64c9d1bb6b7ebb54674b4e24"}, + {file = "lru_dict-1.3.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e5c20f236f27551e3f0adbf1a987673fb1e9c38d6d284502cd38f5a3845ef681"}, + {file = "lru_dict-1.3.0-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ca3703ff03b03a1848c563bc2663d0ad813c1cd42c4d9cf75b623716d4415d9a"}, + {file = "lru_dict-1.3.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:a9fb71ba262c6058a0017ce83d343370d0a0dbe2ae62c2eef38241ec13219330"}, + {file = "lru_dict-1.3.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:f5b88a7c39e307739a3701194993455968fcffe437d1facab93546b1b8a334c1"}, + {file = "lru_dict-1.3.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2682bfca24656fb7a643621520d57b7fe684ed5fa7be008704c1235d38e16a32"}, + {file = "lru_dict-1.3.0-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:96fc87ddf569181827458ec5ad8fa446c4690cffacda66667de780f9fcefd44d"}, + {file = "lru_dict-1.3.0-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dcec98e2c7da7631f0811730303abc4bdfe70d013f7a11e174a2ccd5612a7c59"}, + {file = "lru_dict-1.3.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:6bba2863060caeaedd8386b0c8ee9a7ce4d57a7cb80ceeddf440b4eff2d013ba"}, + {file = "lru_dict-1.3.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:3c497fb60279f1e1d7dfbe150b1b069eaa43f7e172dab03f206282f4994676c5"}, + {file = "lru_dict-1.3.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8d9509d817a47597988615c1a322580c10100acad10c98dfcf3abb41e0e5877f"}, + {file = "lru_dict-1.3.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0213ab4e3d9a8d386c18e485ad7b14b615cb6f05df6ef44fb2a0746c6ea9278b"}, + {file = "lru_dict-1.3.0-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b50fbd69cd3287196796ab4d50e4cc741eb5b5a01f89d8e930df08da3010c385"}, + {file = "lru_dict-1.3.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:5247d1f011f92666010942434020ddc5a60951fefd5d12a594f0e5d9f43e3b3b"}, ] [[package]] @@ -814,7 +773,7 @@ files = [ [[package]] name = "mypy" -version = "1.5.1" +version = "1.7.1" requires_python = ">=3.8" summary = "Optional static typing for Python" dependencies = [ @@ -822,13 +781,13 @@ dependencies = [ "typing-extensions>=4.1.0", ] files = [ - {file = "mypy-1.5.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6ac9c21bfe7bc9f7f1b6fae441746e6a106e48fc9de530dea29e8cd37a2c0cc4"}, - {file = "mypy-1.5.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:51cb1323064b1099e177098cb939eab2da42fea5d818d40113957ec954fc85f4"}, - {file = "mypy-1.5.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:596fae69f2bfcb7305808c75c00f81fe2829b6236eadda536f00610ac5ec2243"}, - {file = "mypy-1.5.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:32cb59609b0534f0bd67faebb6e022fe534bdb0e2ecab4290d683d248be1b275"}, - {file = "mypy-1.5.1-cp311-cp311-win_amd64.whl", hash = "sha256:159aa9acb16086b79bbb0016145034a1a05360626046a929f84579ce1666b315"}, - {file = "mypy-1.5.1-py3-none-any.whl", hash = "sha256:f757063a83970d67c444f6e01d9550a7402322af3557ce7630d3c957386fa8f5"}, - {file = "mypy-1.5.1.tar.gz", hash = "sha256:b031b9601f1060bf1281feab89697324726ba0c0bae9d7cd7ab4b690940f0b92"}, + {file = "mypy-1.7.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4b901927f16224d0d143b925ce9a4e6b3a758010673eeded9b748f250cf4e8f7"}, + {file = "mypy-1.7.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2f7f6985d05a4e3ce8255396df363046c28bea790e40617654e91ed580ca7c51"}, + {file = "mypy-1.7.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:944bdc21ebd620eafefc090cdf83158393ec2b1391578359776c00de00e8907a"}, + {file = "mypy-1.7.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:9c7ac372232c928fff0645d85f273a726970c014749b924ce5710d7d89763a28"}, + {file = "mypy-1.7.1-cp311-cp311-win_amd64.whl", hash = "sha256:f6efc9bd72258f89a3816e3a98c09d36f079c223aa345c659622f056b760ab42"}, + {file = "mypy-1.7.1-py3-none-any.whl", hash = "sha256:f7c5d642db47376a0cc130f0de6d055056e010debdaf0707cd2b0fc7e7ef30ea"}, + {file = "mypy-1.7.1.tar.gz", hash = "sha256:fcb6d9afb1b6208b4c712af0dafdc650f518836065df0d4fb1d800f5d6773db2"}, ] [[package]] @@ -860,36 +819,6 @@ files = [ {file = "numpy-1.25.2.tar.gz", hash = "sha256:fd608e19c8d7c55021dffd43bfe5492fab8cc105cc8986f813f8c3c048b38760"}, ] -[[package]] -name = "openapi-schema-validator" -version = "0.4.4" -requires_python = ">=3.7.0,<4.0.0" -summary = "OpenAPI schema validation for Python" -dependencies = [ - "jsonschema<4.18.0,>=4.0.0", - "rfc3339-validator", -] -files = [ - {file = "openapi_schema_validator-0.4.4-py3-none-any.whl", hash = "sha256:79f37f38ef9fd5206b924ed7a6f382cea7b649b3b56383c47f1906082b7b9015"}, - {file = "openapi_schema_validator-0.4.4.tar.gz", hash = "sha256:c573e2be2c783abae56c5a1486ab716ca96e09d1c3eab56020d1dc680aa57bf8"}, -] - -[[package]] -name = "openapi-spec-validator" -version = "0.5.2" -requires_python = ">=3.7.0,<4.0.0" -summary = "OpenAPI 2.0 (aka Swagger) and OpenAPI 3 spec validator" -dependencies = [ - "jsonschema-spec<0.2.0,>=0.1.1", - "jsonschema<5.0.0,>=4.0.0", - "lazy-object-proxy<2.0.0,>=1.7.1", - "openapi-schema-validator<0.5,>=0.3.2", -] -files = [ - {file = "openapi_spec_validator-0.5.2-py3-none-any.whl", hash = "sha256:1f8db08ecbcf4ec8c558d65b65b3b7b428f81da6642f2f163e992ae3e17b229c"}, - {file = "openapi_spec_validator-0.5.2.tar.gz", hash = "sha256:ebed7f1c567780859402ad64b128e17f519d15f605f1b41d1e9a4a7a1690be07"}, -] - [[package]] name = "orjson" version = "3.9.2" @@ -929,16 +858,6 @@ files = [ {file = "parsimonious-0.9.0.tar.gz", hash = "sha256:b2ad1ae63a2f65bd78f5e0a8ac510a98f3607a43f1db2a8d46636a5d9e4a30c1"}, ] -[[package]] -name = "pathable" -version = "0.4.3" -requires_python = ">=3.7.0,<4.0.0" -summary = "Object-oriented paths" -files = [ - {file = "pathable-0.4.3-py3-none-any.whl", hash = "sha256:cdd7b1f9d7d5c8b8d3315dbf5a86b2596053ae845f056f57d97c0eefff84da14"}, - {file = "pathable-0.4.3.tar.gz", hash = "sha256:5c869d315be50776cc8a993f3af43e0c60dc01506b399643f919034ebf4cdcab"}, -] - [[package]] name = "pathspec" version = "0.11.2" @@ -959,23 +878,6 @@ files = [ {file = "platformdirs-3.10.0.tar.gz", hash = "sha256:b45696dab2d7cc691a3226759c0d3b00c47c8b6e293d96f6436f733303f77f6d"}, ] -[[package]] -name = "prance" -version = "23.6.21.0" -requires_python = ">=3.8" -summary = "Resolving Swagger/OpenAPI 2.0 and 3.0.0 Parser" -dependencies = [ - "chardet>=3.0", - "packaging>=21.3", - "requests>=2.25", - "ruamel-yaml>=0.17.10", - "six~=1.15", -] -files = [ - {file = "prance-23.6.21.0-py3-none-any.whl", hash = "sha256:6a4276fa07ed9f22feda4331097d7503c4adc3097e46ffae97425f2c1026bd9f"}, - {file = "prance-23.6.21.0.tar.gz", hash = "sha256:d8c15f8ac34019751cc4945f866d8d964d7888016d10de3592e339567177cabe"}, -] - [[package]] name = "prometheus-client" version = "0.17.1" @@ -1003,19 +905,21 @@ files = [ [[package]] name = "pyarrow" -version = "12.0.1" -requires_python = ">=3.7" +version = "14.0.1" +requires_python = ">=3.8" summary = "Python library for Apache Arrow" dependencies = [ "numpy>=1.16.6", ] files = [ - {file = "pyarrow-12.0.1-cp311-cp311-macosx_10_14_x86_64.whl", hash = "sha256:749be7fd2ff260683f9cc739cb862fb11be376de965a2a8ccbf2693b098db6c7"}, - {file = "pyarrow-12.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6895b5fb74289d055c43db3af0de6e16b07586c45763cb5e558d38b86a91e3a7"}, - {file = "pyarrow-12.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1887bdae17ec3b4c046fcf19951e71b6a619f39fa674f9881216173566c8f718"}, - {file = "pyarrow-12.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e2c9cb8eeabbadf5fcfc3d1ddea616c7ce893db2ce4dcef0ac13b099ad7ca082"}, - {file = "pyarrow-12.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:ce4aebdf412bd0eeb800d8e47db854f9f9f7e2f5a0220440acf219ddfddd4f63"}, - {file = "pyarrow-12.0.1.tar.gz", hash = "sha256:cce317fc96e5b71107bf1f9f184d5e54e2bd14bbf3f9a3d62819961f0af86fec"}, + {file = "pyarrow-14.0.1-cp311-cp311-macosx_10_14_x86_64.whl", hash = "sha256:c7331b4ed3401b7ee56f22c980608cf273f0380f77d0f73dd3c185f78f5a6220"}, + {file = "pyarrow-14.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:922e8b49b88da8633d6cac0e1b5a690311b6758d6f5d7c2be71acb0f1e14cd61"}, + {file = "pyarrow-14.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:58c889851ca33f992ea916b48b8540735055201b177cb0dcf0596a495a667b00"}, + {file = "pyarrow-14.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:30d8494870d9916bb53b2a4384948491444741cb9a38253c590e21f836b01222"}, + {file = "pyarrow-14.0.1-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:be28e1a07f20391bb0b15ea03dcac3aade29fc773c5eb4bee2838e9b2cdde0cb"}, + {file = "pyarrow-14.0.1-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:981670b4ce0110d8dcb3246410a4aabf5714db5d8ea63b15686bce1c914b1f83"}, + {file = "pyarrow-14.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:4756a2b373a28f6166c42711240643fb8bd6322467e9aacabd26b488fa41ec23"}, + {file = "pyarrow-14.0.1.tar.gz", hash = "sha256:b8b3f4fe8d4ec15e1ef9b599b94683c5216adaed78d5cb4c606180546d1e2ee1"}, ] [[package]] @@ -1138,15 +1042,6 @@ files = [ {file = "pysignalr-0.2.0.tar.gz", hash = "sha256:f8dc139b355297c2a390adfdcf5995964dcf5130233334feb921c228f1352613"}, ] -[[package]] -name = "pysnooper" -version = "1.2.0" -summary = "A poor man's debugger for Python." -files = [ - {file = "PySnooper-1.2.0-py2.py3-none-any.whl", hash = "sha256:aa859aa9a746cffc1f35e4ee469d49c3cc5185b5fc0c571feb3af3c94d2eb625"}, - {file = "PySnooper-1.2.0.tar.gz", hash = "sha256:810669e162a250a066d8662e573adbc5af770e937c5b5578f28bb7355d1c859b"}, -] - [[package]] name = "python-dotenv" version = "1.0.0" @@ -1240,19 +1135,6 @@ files = [ {file = "requests-2.31.0.tar.gz", hash = "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"}, ] -[[package]] -name = "rfc3339-validator" -version = "0.1.4" -requires_python = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -summary = "A pure python RFC3339 validator" -dependencies = [ - "six", -] -files = [ - {file = "rfc3339_validator-0.1.4-py2.py3-none-any.whl", hash = "sha256:24f6ec1eda14ef823da9e36ec7113124b39c04d50a4d3d3a3c2859577e7791fa"}, - {file = "rfc3339_validator-0.1.4.tar.gz", hash = "sha256:138a2abdf93304ad60530167e51d2dfb9549521a836871b88d7f4695d0022f6b"}, -] - [[package]] name = "rlp" version = "3.0.0" @@ -1295,27 +1177,27 @@ files = [ [[package]] name = "ruff" -version = "0.0.291" +version = "0.1.6" requires_python = ">=3.7" -summary = "An extremely fast Python linter, written in Rust." -files = [ - {file = "ruff-0.0.291-py3-none-macosx_10_7_x86_64.whl", hash = "sha256:b97d0d7c136a85badbc7fd8397fdbb336e9409b01c07027622f28dcd7db366f2"}, - {file = "ruff-0.0.291-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:6ab44ea607967171e18aa5c80335237be12f3a1523375fa0cede83c5cf77feb4"}, - {file = "ruff-0.0.291-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a04b384f2d36f00d5fb55313d52a7d66236531195ef08157a09c4728090f2ef0"}, - {file = "ruff-0.0.291-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:b727c219b43f903875b7503a76c86237a00d1a39579bb3e21ce027eec9534051"}, - {file = "ruff-0.0.291-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:87671e33175ae949702774071b35ed4937da06f11851af75cd087e1b5a488ac4"}, - {file = "ruff-0.0.291-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:b75f5801547f79b7541d72a211949754c21dc0705c70eddf7f21c88a64de8b97"}, - {file = "ruff-0.0.291-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b09b94efdcd162fe32b472b2dd5bf1c969fcc15b8ff52f478b048f41d4590e09"}, - {file = "ruff-0.0.291-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8d5b56bc3a2f83a7a1d7f4447c54d8d3db52021f726fdd55d549ca87bca5d747"}, - {file = "ruff-0.0.291-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:13f0d88e5f367b2dc8c7d90a8afdcfff9dd7d174e324fd3ed8e0b5cb5dc9b7f6"}, - {file = "ruff-0.0.291-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:b3eeee1b1a45a247758ecdc3ab26c307336d157aafc61edb98b825cadb153df3"}, - {file = "ruff-0.0.291-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:6c06006350c3bb689765d71f810128c9cdf4a1121fd01afc655c87bab4fb4f83"}, - {file = "ruff-0.0.291-py3-none-musllinux_1_2_i686.whl", hash = "sha256:fd17220611047de247b635596e3174f3d7f2becf63bd56301fc758778df9b629"}, - {file = "ruff-0.0.291-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:5383ba67ad360caf6060d09012f1fb2ab8bd605ab766d10ca4427a28ab106e0b"}, - {file = "ruff-0.0.291-py3-none-win32.whl", hash = "sha256:1d5f0616ae4cdc7a938b493b6a1a71c8a47d0300c0d65f6e41c281c2f7490ad3"}, - {file = "ruff-0.0.291-py3-none-win_amd64.whl", hash = "sha256:8a69bfbde72db8ca1c43ee3570f59daad155196c3fbe357047cd9b77de65f15b"}, - {file = "ruff-0.0.291-py3-none-win_arm64.whl", hash = "sha256:d867384a4615b7f30b223a849b52104214442b5ba79b473d7edd18da3cde22d6"}, - {file = "ruff-0.0.291.tar.gz", hash = "sha256:c61109661dde9db73469d14a82b42a88c7164f731e6a3b0042e71394c1c7ceed"}, +summary = "An extremely fast Python linter and code formatter, written in Rust." +files = [ + {file = "ruff-0.1.6-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:88b8cdf6abf98130991cbc9f6438f35f6e8d41a02622cc5ee130a02a0ed28703"}, + {file = "ruff-0.1.6-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:5c549ed437680b6105a1299d2cd30e4964211606eeb48a0ff7a93ef70b902248"}, + {file = "ruff-0.1.6-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1cf5f701062e294f2167e66d11b092bba7af6a057668ed618a9253e1e90cfd76"}, + {file = "ruff-0.1.6-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:05991ee20d4ac4bb78385360c684e4b417edd971030ab12a4fbd075ff535050e"}, + {file = "ruff-0.1.6-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:87455a0c1f739b3c069e2f4c43b66479a54dea0276dd5d4d67b091265f6fd1dc"}, + {file = "ruff-0.1.6-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:683aa5bdda5a48cb8266fcde8eea2a6af4e5700a392c56ea5fb5f0d4bfdc0240"}, + {file = "ruff-0.1.6-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:137852105586dcbf80c1717facb6781555c4e99f520c9c827bd414fac67ddfb6"}, + {file = "ruff-0.1.6-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bd98138a98d48a1c36c394fd6b84cd943ac92a08278aa8ac8c0fdefcf7138f35"}, + {file = "ruff-0.1.6-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3a0cd909d25f227ac5c36d4e7e681577275fb74ba3b11d288aff7ec47e3ae745"}, + {file = "ruff-0.1.6-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:e8fd1c62a47aa88a02707b5dd20c5ff20d035d634aa74826b42a1da77861b5ff"}, + {file = "ruff-0.1.6-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:fd89b45d374935829134a082617954120d7a1470a9f0ec0e7f3ead983edc48cc"}, + {file = "ruff-0.1.6-py3-none-musllinux_1_2_i686.whl", hash = "sha256:491262006e92f825b145cd1e52948073c56560243b55fb3b4ecb142f6f0e9543"}, + {file = "ruff-0.1.6-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:ea284789861b8b5ca9d5443591a92a397ac183d4351882ab52f6296b4fdd5462"}, + {file = "ruff-0.1.6-py3-none-win32.whl", hash = "sha256:1610e14750826dfc207ccbcdd7331b6bd285607d4181df9c1c6ae26646d6848a"}, + {file = "ruff-0.1.6-py3-none-win_amd64.whl", hash = "sha256:4558b3e178145491e9bc3b2ee3c4b42f19d19384eaa5c59d10acf6e8f8b57e33"}, + {file = "ruff-0.1.6-py3-none-win_arm64.whl", hash = "sha256:03910e81df0d8db0e30050725a5802441c2022ea3ae4fe0609b76081731accbc"}, + {file = "ruff-0.1.6.tar.gz", hash = "sha256:1b09f29b16c6ead5ea6b097ef2764b42372aebe363722f1605ecbcd2b9207184"}, ] [[package]] @@ -1401,16 +1283,6 @@ files = [ {file = "tenacity-8.0.1.tar.gz", hash = "sha256:43242a20e3e73291a28bcbcacfd6e000b02d3857a9a9fff56b297a27afdc932f"}, ] -[[package]] -name = "toml" -version = "0.10.2" -requires_python = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" -summary = "Python Library for Tom's Obvious, Minimal Language" -files = [ - {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, - {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, -] - [[package]] name = "toolz" version = "0.12.0" diff --git a/api/tzprofiles/pyproject.toml b/api/tzprofiles/pyproject.toml index d09140bc..8d97f6c4 100644 --- a/api/tzprofiles/pyproject.toml +++ b/api/tzprofiles/pyproject.toml @@ -1,10 +1,11 @@ +# Generated by DipDup 7.2.0 [project] name = "tzprofiles" version = "0.0.1" description = "DipDup indexer for Tezos Profiles" license = { text = "Apache 2.0" } authors = [ - { name = "Spruce Systems, Inc.", email = "" } + { name = "Spruce Systems, Inc.", email = "" }, ] readme = "README.md" requires-python = ">=3.11,<3.12" @@ -16,25 +17,22 @@ dependencies = [ [tool.pdm.dev-dependencies] dev = [ - "isort", "black", "ruff", "mypy", ] [tool.pdm.scripts] -_isort = "isort ." -_black = "black ." -_ruff = "ruff check --fix ." -_mypy = "mypy --no-incremental --exclude tzprofiles ." -all = { composite = ["fmt", "lint"] } -fmt = { composite = ["_isort", "_black"] } -lint = { composite = ["_ruff", "_mypy"] } -image = "docker buildx build . --load --progress plain -f deploy/Dockerfile -t tzprofiles:latest" - -[tool.isort] -line_length = 120 -force_single_line = true +help = {cmd = "make help", help = "Show this help (default)"} +all = {cmd = "make all", help = "Run an entire CI pipeline"} +format = {cmd = "make format", help = "Format with all tools"} +lint = {cmd = "make lint", help = "Lint with all tools"} +black = {cmd = "make black", help = "Format with black"} +ruff = {cmd = "make ruff", help = "Lint with ruff"} +mypy = {cmd = "make mypy", help = "Lint with mypy"} +image = {cmd = "make image", help = "Build Docker image"} +up = {cmd = "make up", help = "Run Compose stack"} +down = {cmd = "make down", help = "Stop Compose stack"} [tool.black] line-length = 120 @@ -44,10 +42,14 @@ skip-string-normalization = true [tool.ruff] line-length = 120 target-version = 'py311' +extend-select = ["B", "C4", "FA", "G", "I", "PTH", "Q", "RET", "RUF", "TCH", "UP"] +flake8-quotes = { inline-quotes = "double", multiline-quotes = "double" } +isort = { force-single-line = true} [tool.mypy] python_version = "3.11" plugins = ["pydantic.mypy"] +strict = false [build-system] requires = ["pdm-backend"] diff --git a/api/tzprofiles/types/tzprofile/tezos_parameters/default.py b/api/tzprofiles/types/tzprofile/tezos_parameters/default.py index 9219f315..4f451305 100644 --- a/api/tzprofiles/types/tzprofile/tezos_parameters/default.py +++ b/api/tzprofiles/types/tzprofile/tezos_parameters/default.py @@ -3,8 +3,6 @@ from __future__ import annotations -from typing import List - from pydantic import BaseModel from pydantic import Extra @@ -22,5 +20,5 @@ class DefaultParameter(BaseModel): class Config: extra = Extra.forbid - set: List[SetItem] + set: list[SetItem] bool: bool diff --git a/api/tzprofiles/types/tzprofile/tezos_storage.py b/api/tzprofiles/types/tzprofile/tezos_storage.py index d0333f56..1f40def6 100644 --- a/api/tzprofiles/types/tzprofile/tezos_storage.py +++ b/api/tzprofiles/types/tzprofile/tezos_storage.py @@ -3,9 +3,6 @@ from __future__ import annotations -from typing import Dict -from typing import List - from pydantic import BaseModel from pydantic import Extra @@ -23,7 +20,7 @@ class TzprofileStorage(BaseModel): class Config: extra = Extra.forbid - claims: List[Claim] + claims: list[Claim] contract_type: str - metadata: Dict[str, str] + metadata: dict[str, str] owner: str diff --git a/api/tzprofiles/types/tzprofile_old/tezos_parameters/default.py b/api/tzprofiles/types/tzprofile_old/tezos_parameters/default.py index 6267fbc5..90d76a84 100644 --- a/api/tzprofiles/types/tzprofile_old/tezos_parameters/default.py +++ b/api/tzprofiles/types/tzprofile_old/tezos_parameters/default.py @@ -3,8 +3,6 @@ from __future__ import annotations -from typing import List - from pydantic import BaseModel from pydantic import Extra @@ -22,5 +20,5 @@ class DefaultParameter(BaseModel): class Config: extra = Extra.forbid - list: List[ListItem] + list: list[ListItem] bool: bool diff --git a/api/tzprofiles/types/tzprofile_old/tezos_storage.py b/api/tzprofiles/types/tzprofile_old/tezos_storage.py index 1a3e5d1a..982dbc81 100644 --- a/api/tzprofiles/types/tzprofile_old/tezos_storage.py +++ b/api/tzprofiles/types/tzprofile_old/tezos_storage.py @@ -3,9 +3,6 @@ from __future__ import annotations -from typing import Dict -from typing import List - from pydantic import BaseModel from pydantic import Extra @@ -23,7 +20,7 @@ class TzprofileOldStorage(BaseModel): class Config: extra = Extra.forbid - claims: List[Claim] + claims: list[Claim] contract_type: str - metadata: Dict[str, str] + metadata: dict[str, str] owner: str