Skip to content

Commit

Permalink
chore: upgrade ape core version (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
NotPeopling2day authored Jul 27, 2022
1 parent 81e9d99 commit f590188
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest] # eventually add `windows-latest`
python-version: [3.7, 3.8, 3.9]
python-version: [3.7, 3.8, 3.9, '3.10']

steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repos:
- id: isort

- repo: https://github.com/psf/black
rev: 22.3.0
rev: 22.6.0
hooks:
- id: black
name: black
Expand All @@ -21,7 +21,7 @@ repos:
- id: flake8

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.961
rev: v0.971
hooks:
- id: mypy
additional_dependencies: [types-PyYAML, types-requests]
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ source venv/bin/activate
python setup.py install

# install the developer dependencies (-e is interactive mode)
pip install -e .[dev]
pip install -e .'[dev]'
```

## Pre-Commit Hooks
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Ecosystem Plugin for Binance Smart Chain support in Ape

## Dependencies

* [python3](https://www.python.org/downloads) version 3.7 or greater, python3-dev
* [python3](https://www.python.org/downloads) version 3.7.2 or greater, python3-dev

## Installation

Expand Down
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"hypothesis>=6.2.0,<7.0", # Strategy-based fuzzer
],
"lint": [
"black>=22.3.0,<23.0", # auto-formatter and linter
"mypy>=0.961,<1.0", # Static type analyzer
"black>=22.6.0,<23.0", # auto-formatter and linter
"mypy>=0.971,<1.0", # Static type analyzer
"flake8>=4.0.1,<5.0", # Style linter
"isort>=5.10.1,<6.0", # Import sorting linter
],
Expand Down Expand Up @@ -54,9 +54,9 @@
include_package_data=True,
install_requires=[
"importlib-metadata ; python_version<'3.8'",
"eth-ape>=0.3.0,<0.4.0",
"eth-ape>=0.4.0,<0.5.0",
],
python_requires=">=3.7.2,<3.11",
python_requires=">=3.7.2,<4",
extras_require=extras_require,
py_modules=["ape_bsc"],
license="Apache-2.0",
Expand All @@ -65,7 +65,7 @@
packages=find_packages(exclude=["tests", "tests.*"]),
package_data={"ape_bsc": ["py.typed"]},
classifiers=[
"Development Status :: 5 - Production/Stable",
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
Expand Down
11 changes: 11 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
import ape
import pytest
from ape._cli import cli as ape_cli
from click.testing import CliRunner


@pytest.fixture
def networks():
return ape.networks


@pytest.fixture
def accounts():
return ape.accounts


@pytest.fixture
def runner():
return CliRunner()
Expand Down
11 changes: 6 additions & 5 deletions tests/test_integration.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
EXPECTED_OUTPUT = """
arbitrum
bsc
├── mainnet
│ ├── alchemy
│ └── geth (default)
├── testnet
│ ├── alchemy (default)
│ └── geth
│ └── geth (default)
└── local (default)
└── test (default)
""".strip()
Expand All @@ -16,7 +14,10 @@ def assert_rich_text(actual: str, expected: str):
The output from `rich` causes a bunch of extra spaces to
appear at the end of each line. For easier testing, we remove those here.
"""
actual = f"arbitrum{actual.split('arbitrum')[-1]}"
actual = f"bsc{actual.split('bsc')[-1]}"
if "ethereum" in actual:
actual = actual.split("ethereum")[0]

expected = expected.strip()
lines = actual.split("\n")
new_lines = []
Expand Down
7 changes: 7 additions & 0 deletions tests/test_provider.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
def test_use_provider(accounts, networks):
with networks.bsc.local.use_provider("test"):
account = accounts.test_accounts[0]
receipt = account.transfer(account, 100)

assert not receipt.failed
assert receipt.value == 100

0 comments on commit f590188

Please sign in to comment.