Skip to content

Commit

Permalink
chore: update pins for ape v0.4.0 (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
sabotagebeats authored Aug 5, 2022
1 parent 66cf70c commit 9900008
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 78 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $ ape plugins list
```

* Python Version: x.x.x
* OS: osx/linux/win
* OS: macOS/linux/win

### What went wrong?

Expand Down
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
19 changes: 7 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,36 +1,31 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v4.2.0
hooks:
- id: check-yaml

- repo: https://github.com/asottile/seed-isort-config
rev: v2.2.0
hooks:
- id: seed-isort-config

- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.9.3
rev: v5.10.1
hooks:
- id: isort

- repo: https://github.com/psf/black
rev: 22.3.0
rev: 22.6.0
hooks:
- id: black
name: black

- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
rev: 4.0.1
hooks:
- id: flake8

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.910-1
rev: v0.971
hooks:
- id: mypy
additional_dependencies: [types-PyYAML, types-requests]
additional_dependencies: [types-requests]


default_language_version:
python: python3.8
python: python3.8
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ source venv/bin/activate
# install ape
pip install eth-ape

# install the plugin
# install the ape-arbitrum plugin
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 Arbitrum 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
15 changes: 4 additions & 11 deletions ape_arbitrum/ecosystem.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
from ape.api import TransactionAPI
from ape.api.config import PluginConfig
from ape.api.networks import LOCAL_NETWORK_NAME
from ape.types import TransactionSignature
from ape_ethereum.ecosystem import Ethereum, NetworkConfig
from ape.api import TransactionAPI
from eth_utils import (
add_0x_prefix,
decode_hex,
)
from ape_ethereum.transactions import StaticFeeTransaction, TransactionType
from eth_typing import HexStr
from ape_ethereum.transactions import (
StaticFeeTransaction,
TransactionType,
)
from ape.types import TransactionSignature
from eth_utils import add_0x_prefix, decode_hex

NETWORKS = {
# chain_id, network_id
Expand Down
4 changes: 1 addition & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ write_to = "ape_arbitrum/version.py"

[tool.black]
line-length = 100
target-version = ['py37', 'py38', 'py39']
target-version = ['py37', 'py38', 'py39', 'py310']
include = '\.pyi?$'

[tool.pytest.ini_options]
Expand All @@ -35,7 +35,5 @@ markers = "fuzzing: Run Hypothesis fuzz test suite"
line_length = 100
force_grid_wrap = 0
include_trailing_comma = true
known_third_party = ["ape", "ape_ethereum", "ape_geth", "ape_test", "pytest", "setuptools"]
known_first_party = ["ape_arbitrum"]
multi_line_output = 3
use_parentheses = true
50 changes: 10 additions & 40 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,51 +2,20 @@
# -*- coding: utf-8 -*-
from setuptools import find_packages, setup # type: ignore

# extras_require = {
# "test": [ # `test` GitHub Action jobs uses this
# "pytest>=6.0,<7.0", # Core testing package
# "pytest-xdist", # multi-process runner
# "pytest-cov", # Coverage analyzer plugin
# "hypothesis>=6.2.0,<7.0", # Strategy-based fuzzer
# ],
# "lint": [
# "black>=22.3.0,<23.0", # auto-formatter and linter
# "mypy>=0.910,<1.0", # Static type analyzer
# "flake8>=3.8.3,<4.0", # Style linter
# "isort>=5.10.1,<6.0", # Import sorting linter
# ],
# "release": [ # `release` GitHub Action job uses this
# "setuptools", # Installation tool
# "wheel", # Packaging tool
# "twine", # Package upload tool
# ],
# "dev": [
# "commitizen", # Manage commits and publishing releases
# "pre-commit", # Ensure that linters are run prior to commiting
# "pytest-watch", # `ptw` test watcher/runner
# "IPython", # Console for interacting
# "ipdb", # Debugger (Must use `export PYTHONBREAKPOINT=ipdb.set_trace`)
# ],
# }

extras_require = {
"test": [ # `test` GitHub Action jobs uses this
"pytest>=6.0", # Core testing package
"pytest-mock", # For patching and mocking
"pytest-xdist", # multi-process runner
"pytest-cov", # Coverage analyzer plugin
"pytest-mock", # For creating mocks
"hypothesis>=6.2.0,<7.0", # Strategy-based fuzzer
"hypothesis-jsonschema==0.19.0", # JSON Schema fuzzer extension
],
"lint": [
"black>=22.3.0,<23.0", # auto-formatter and linter
"mypy>=0.950,<1.0", # Static type analyzer
"types-PyYAML", # NOTE: Needed due to mypy typeshed
"types-requests", # NOTE: Needed due to mypy typeshed
"black>=22.6.0", # auto-formatter and linter
"mypy>=0.971", # Static type analyzer
"flake8>=4.0.1,<5.0", # Style linter
"flake8-breakpoint>=1.1.0,<2.0.0", # detect breakpoints left in code
"flake8-print>=4.0.0,<5.0.0", # detect print statements left in code
"isort>=5.10.1,<6.0", # Import sorting linter
"pandas-stubs>=1.2.0,<2.0", # NOTE: Needed due to mypy types
"types-requests", # NOTE: Needed due to mypy typeshed
],
"doc": [
"myst-parser>=0.17.0,<0.18", # Tools for parsing markdown files in the docs
Expand All @@ -57,11 +26,12 @@
],
"release": [ # `release` GitHub Action job uses this
"setuptools", # Installation tool
"setuptools-scm", # Installation tool
"wheel", # Packaging tool
"twine==3.8.0", # Package upload tool
"twine", # Package upload tool
],
"dev": [
"commitizen>=2.19,<2.20", # Manage commits and publishing releases
"commitizen", # Manage commits and publishing releases
"pre-commit", # Ensure that linters are run prior to committing
"pytest-watch", # `ptw` test watcher/runner
"ipdb", # Debugger (Must use `export PYTHONBREAKPOINT=ipdb.set_trace`)
Expand Down Expand Up @@ -95,9 +65,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_arbitrum"],
license="Apache-2.0",
Expand Down
File renamed without changes.
7 changes: 0 additions & 7 deletions tests/test_basic.py → tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,3 @@ def Contract():
from ape import Contract

return Contract


def test_basic(accounts, networks):

with networks.arbitrum.local.use_provider("test"):
a = accounts.test_accounts[0]
a.transfer(a, 100)
8 changes: 8 additions & 0 deletions tests/test_provider.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
def test_basic(accounts, networks):

with networks.arbitrum.local.use_provider("test"):
a = accounts.test_accounts[0]
receipt = a.transfer(a, 100)

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

0 comments on commit 9900008

Please sign in to comment.