Skip to content

Commit

Permalink
feat: add core plugin methoddocs (#2102)
Browse files Browse the repository at this point in the history
  • Loading branch information
dtdang committed May 31, 2024
1 parent 8c0217c commit 3e4d019
Show file tree
Hide file tree
Showing 10 changed files with 110 additions and 3 deletions.
5 changes: 4 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@

# Set some default to avoid unnecessary repetitious directives.
autodoc_default_options = {
"exclude-members": "__repr__,__weakref__,__metaclass__,__init__,model_config,model_fields,model_post_init"
"exclude-members": (
"__repr__, __weakref__, __metaclass__, __init__, "
"model_config, model_fields, model_post_init, model_computed_fields"
)
}

# -- Doctest configuration -------------------------------------------------
Expand Down
3 changes: 3 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,8 @@
methoddocs/ape_accounts.md
methoddocs/ape_compile.md
methoddocs/ape_ethereum.md
methoddocs/ape_node.md
methoddocs/ape_pm.md
methoddocs/ape_test.md
```
15 changes: 15 additions & 0 deletions docs/methoddocs/ape_ethereum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# ape-ethereum

```{eval-rst}
.. automodule:: ape_ethereum
:members:
```

# ape-ethereum.multicall

```{eval-rst}
.. automodule:: ape_ethereum.multicall
:members:
:show-inheritance:
:special-members:
```
6 changes: 6 additions & 0 deletions docs/methoddocs/ape_node.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# ape-node

```{eval-rst}
.. automodule:: ape_node
:members:
```
6 changes: 6 additions & 0 deletions docs/methoddocs/ape_test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# ape-test

```{eval-rst}
.. automodule:: ape_test
:members:
```
5 changes: 5 additions & 0 deletions src/ape_cache/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,8 @@ def config_class():
@plugins.register(plugins.QueryPlugin)
def query_engines():
return CacheQueryProvider


__all__ = [
"CacheQueryProvider",
]
48 changes: 47 additions & 1 deletion src/ape_ethereum/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,29 @@
from ape.api.networks import LOCAL_NETWORK_NAME

from ._converters import WeiConversions
from .ecosystem import NETWORKS, Ethereum, EthereumConfig
from .ecosystem import (
NETWORKS,
BaseEthereumConfig,
Block,
Ethereum,
EthereumConfig,
ForkedNetworkConfig,
NetworkConfig,
)
from .provider import EthereumNodeProvider, Web3Provider, assert_web3_provider_uri_env_var_not_set
from .query import EthereumQueryProvider
from .trace import CallTrace, Trace, TransactionTrace
from .transactions import (
AccessListTransaction,
BaseTransaction,
DynamicFeeTransaction,
Receipt,
SharedBlobReceipt,
SharedBlobTransaction,
StaticFeeTransaction,
TransactionStatusEnum,
TransactionType,
)


@plugins.register(plugins.Config)
Expand Down Expand Up @@ -35,3 +56,28 @@ def networks():
@plugins.register(plugins.QueryPlugin)
def query_engines():
yield EthereumQueryProvider


__all__ = [
"Ethereum",
"EthereumConfig",
"NetworkConfig",
"ForkedNetworkConfig",
"BaseEthereumConfig",
"Block",
"assert_web3_provider_uri_env_var_not_set",
"Web3Provider",
"EthereumNodeProvider",
"Trace",
"TransactionTrace",
"CallTrace",
"TransactionStatusEnum",
"TransactionType",
"BaseTransaction",
"StaticFeeTransaction",
"AccessListTransaction",
"DynamicFeeTransaction",
"SharedBlobTransaction",
"Receipt",
"SharedBlobReceipt",
]
3 changes: 2 additions & 1 deletion src/ape_ethereum/multicall/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from .handlers import Call, Transaction
from .handlers import BaseMulticall, Call, Transaction

__all__ = [
"BaseMulticall",
"Call",
"Transaction",
]
9 changes: 9 additions & 0 deletions src/ape_node/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,12 @@ def providers():
@plugins.register(plugins.QueryPlugin)
def query_engines():
yield OtterscanQueryEngine


__all__ = [
"EthereumNetworkConfig",
"EthereumNodeConfig",
"GethDev",
"Node",
"OtterscanQueryEngine",
]
13 changes: 13 additions & 0 deletions src/ape_test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,3 +159,16 @@ def account_types():
@plugins.register(plugins.ProviderPlugin)
def providers():
yield "ethereum", LOCAL_NETWORK_NAME, LocalProvider


__all__ = [
"TestAccountContainer",
"TestAccount",
"EthTesterProviderConfig",
"LocalProvider",
"GasExclusion",
"GasConfig",
"CoverageReportsConfig",
"CoverageConfig",
"ApeTestConfig",
]

0 comments on commit 3e4d019

Please sign in to comment.