Skip to content

Commit dad9d36

Browse files
authored
Merge pull request #96 from ourzora/BACK-1791
BACK-1791: clean up and update offchain to v0.2.7
2 parents b348972 + c9048a2 commit dad9d36

File tree

4 files changed

+7
-38
lines changed

4 files changed

+7
-38
lines changed

docs/changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## v0.2.7
4+
5+
- Clean up an unused and obsolete `DEFAULT_ADAPTER_CONFIGS` symbol.
6+
37
## v0.2.6
48

59
- Ensure `MetadataFetcher`'s outgoing IPFS http/s requests get re-routed to `IPFSAdapter` under default configuration.

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Getting Started
22

3-
Documentation for version: **v0.2.6**
3+
Documentation for version: **v0.2.7**
44

55
## Overview
66

offchain/metadata/pipelines/metadata_pipeline.py

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,7 @@
33

44
from offchain.concurrency import batched_parmap
55
from offchain.logger.logging import logger
6-
from offchain.metadata.adapters import ( # type: ignore[attr-defined]
7-
ARWeaveAdapter,
8-
DataURIAdapter,
9-
HTTPAdapter,
10-
IPFSAdapter,
11-
)
12-
from offchain.metadata.adapters.base_adapter import Adapter, AdapterConfig
6+
from offchain.metadata.adapters import Adapter, AdapterConfig, DEFAULT_ADAPTER_CONFIGS
137
from offchain.metadata.fetchers.base_fetcher import BaseFetcher
148
from offchain.metadata.fetchers.metadata_fetcher import MetadataFetcher
159
from offchain.metadata.models.metadata import Metadata
@@ -23,31 +17,6 @@
2317
from offchain.metadata.registries.parser_registry import ParserRegistry
2418
from offchain.web3.contract_caller import ContractCaller
2519

26-
# TODO(luke): move the data repo's usage of this symbol to the new file, then remove this
27-
DEFAULT_ADAPTER_CONFIGS: list[AdapterConfig] = [
28-
AdapterConfig(
29-
adapter_cls=ARWeaveAdapter,
30-
mount_prefixes=["ar://"],
31-
host_prefixes=["https://arweave.net/"],
32-
kwargs={"pool_connections": 100, "pool_maxsize": 1000, "max_retries": 0},
33-
),
34-
AdapterConfig(adapter_cls=DataURIAdapter, mount_prefixes=["data:"]),
35-
AdapterConfig(
36-
adapter_cls=IPFSAdapter,
37-
mount_prefixes=[
38-
"ipfs://",
39-
"https://gateway.pinata.cloud/",
40-
"https://ipfs.io/",
41-
],
42-
host_prefixes=["https://gateway.pinata.cloud/ipfs/"],
43-
kwargs={"pool_connections": 100, "pool_maxsize": 1000, "max_retries": 0},
44-
),
45-
AdapterConfig(
46-
adapter_cls=HTTPAdapter,
47-
mount_prefixes=["https://", "http://"],
48-
kwargs={"pool_connections": 100, "pool_maxsize": 1000, "max_retries": 0},
49-
),
50-
]
5120

5221
DEFAULT_PARSERS = (
5322
ParserRegistry.get_all_collection_parsers()
@@ -80,10 +49,6 @@ def __init__(
8049
self.contract_caller = contract_caller or ContractCaller()
8150
self.fetcher = fetcher or MetadataFetcher(async_adapter_configs=adapter_configs)
8251
if adapter_configs is None:
83-
# TODO(luke): move the line below to the file's import section once this
84-
# file's DEFAULT_ADAPTER_CONFIGS is gone
85-
from offchain.metadata.adapters import DEFAULT_ADAPTER_CONFIGS
86-
8752
adapter_configs = DEFAULT_ADAPTER_CONFIGS
8853
for adapter_config in adapter_configs:
8954
self.mount_adapter(

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "offchain"
3-
version = "0.2.6"
3+
version = "0.2.7"
44
description = "Open source metadata processing framework"
55
authors = ["Zora eng <[email protected]>"]
66
readme = "README.md"

0 commit comments

Comments
 (0)