diff --git a/docs/changelog.md b/docs/changelog.md index bed3fec..d42d2bc 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,5 +1,9 @@ # Changelog +## v0.2.7 + +- Clean up an unused and obsolete `DEFAULT_ADAPTER_CONFIGS` symbol. + ## v0.2.6 - Ensure `MetadataFetcher`'s outgoing IPFS http/s requests get re-routed to `IPFSAdapter` under default configuration. diff --git a/docs/index.md b/docs/index.md index 05009c7..1fb3b67 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,6 +1,6 @@ # Getting Started -Documentation for version: **v0.2.6** +Documentation for version: **v0.2.7** ## Overview diff --git a/offchain/metadata/pipelines/metadata_pipeline.py b/offchain/metadata/pipelines/metadata_pipeline.py index 7d7fc48..eb3c7b9 100644 --- a/offchain/metadata/pipelines/metadata_pipeline.py +++ b/offchain/metadata/pipelines/metadata_pipeline.py @@ -3,13 +3,7 @@ from offchain.concurrency import batched_parmap from offchain.logger.logging import logger -from offchain.metadata.adapters import ( # type: ignore[attr-defined] - ARWeaveAdapter, - DataURIAdapter, - HTTPAdapter, - IPFSAdapter, -) -from offchain.metadata.adapters.base_adapter import Adapter, AdapterConfig +from offchain.metadata.adapters import Adapter, AdapterConfig, DEFAULT_ADAPTER_CONFIGS from offchain.metadata.fetchers.base_fetcher import BaseFetcher from offchain.metadata.fetchers.metadata_fetcher import MetadataFetcher from offchain.metadata.models.metadata import Metadata @@ -23,31 +17,6 @@ from offchain.metadata.registries.parser_registry import ParserRegistry from offchain.web3.contract_caller import ContractCaller -# TODO(luke): move the data repo's usage of this symbol to the new file, then remove this -DEFAULT_ADAPTER_CONFIGS: list[AdapterConfig] = [ - AdapterConfig( - adapter_cls=ARWeaveAdapter, - mount_prefixes=["ar://"], - host_prefixes=["https://arweave.net/"], - kwargs={"pool_connections": 100, "pool_maxsize": 1000, "max_retries": 0}, - ), - AdapterConfig(adapter_cls=DataURIAdapter, mount_prefixes=["data:"]), - AdapterConfig( - adapter_cls=IPFSAdapter, - mount_prefixes=[ - "ipfs://", - "https://gateway.pinata.cloud/", - "https://ipfs.io/", - ], - host_prefixes=["https://gateway.pinata.cloud/ipfs/"], - kwargs={"pool_connections": 100, "pool_maxsize": 1000, "max_retries": 0}, - ), - AdapterConfig( - adapter_cls=HTTPAdapter, - mount_prefixes=["https://", "http://"], - kwargs={"pool_connections": 100, "pool_maxsize": 1000, "max_retries": 0}, - ), -] DEFAULT_PARSERS = ( ParserRegistry.get_all_collection_parsers() @@ -80,10 +49,6 @@ def __init__( self.contract_caller = contract_caller or ContractCaller() self.fetcher = fetcher or MetadataFetcher(async_adapter_configs=adapter_configs) if adapter_configs is None: - # TODO(luke): move the line below to the file's import section once this - # file's DEFAULT_ADAPTER_CONFIGS is gone - from offchain.metadata.adapters import DEFAULT_ADAPTER_CONFIGS - adapter_configs = DEFAULT_ADAPTER_CONFIGS for adapter_config in adapter_configs: self.mount_adapter( diff --git a/pyproject.toml b/pyproject.toml index 5b3c268..b3910ce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "offchain" -version = "0.2.6" +version = "0.2.7" description = "Open source metadata processing framework" authors = ["Zora eng "] readme = "README.md"