Skip to content

Commit 02bb8ac

Browse files
authored
chore: upgrade to 0.6 (#11)
1 parent c273c2f commit 02bb8ac

16 files changed

+88
-60
lines changed

.github/ISSUE_TEMPLATE/bug.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
---
22
name: Bug report
33
about: Report an error that you've encountered.
4-
labels: 'bug'
4+
labels: bug
55
---
6+
67
### Environment information
78

8-
* `ape` and plugin versions:
9+
- `ape` and plugin versions:
910

1011
```
1112
$ ape --version
@@ -15,16 +16,16 @@ $ ape plugins list
1516
# ...copy and paste result of above command here...
1617
```
1718

18-
* Python Version: x.x.x
19-
* OS: macOS/linux/win
19+
- Python Version: x.x.x
20+
- OS: macOS/linux/win
2021

2122
### What went wrong?
2223

2324
Please include information like:
2425

25-
* what command you ran
26-
* the code that caused the failure (see [this link](https://help.github.com/articles/basic-writing-and-formatting-syntax/) for help with formatting code)
27-
* full output of the error you received
26+
- what command you ran
27+
- the code that caused the failure (see [this link](https://help.github.com/articles/basic-writing-and-formatting-syntax/) for help with formatting code)
28+
- full output of the error you received
2829

2930
### How can it be fixed?
3031

.github/ISSUE_TEMPLATE/feature.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
22
name: Feature request
33
about: Request a new feature, or an improvement to existing functionality.
4-
labels: 'enhancement'
4+
labels: enhancement
55
---
66

77
### Overview
88

99
Provide a simple overview of what you wish to see added. Please include:
1010

11-
* What you are trying to do
12-
* Why Ape's current functionality is inadequate to address your goal
11+
- What you are trying to do
12+
- Why Ape's current functionality is inadequate to address your goal
1313

1414
### Specification
1515

.github/ISSUE_TEMPLATE/work-item.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,48 @@
11
---
22
name: Work item
33
about: New work item for Ape team
4-
labels: 'backlog'
5-
4+
labels: backlog
65
---
76

87
### Elevator pitch:
8+
99
<!-- 1-2 line summary of the scope of this work item -->
1010

1111
### Value:
12+
1213
<!--
1314
Who is this for?
1415
Persona or group of people whom will derive value from the scenario.
1516
What benefits will be achieved or business metrics improved?
1617
-->
1718

1819
### Dependencies:
20+
1921
<!-- Call out key people, teams, tech dependencies, or assumptions. -->
2022

2123
### Design approach:
24+
2225
<!--
2326
Free text / diagram / whiteboard picture / etc. that clearly shows your approach and considerations to build the task list.
2427
Existing code patterns in production code base that you will base your work off of.
2528
-->
2629

2730
### Task list:
31+
2832
<!-- Bulleted list describing the exit criteria, desired end state and any documentation, monitors, work for DRI, etc. that will need to be added to make sure someone else can support once it's live. -->
29-
* [ ] Tasks go here
3033

31-
### Estimated completion date:
34+
- [ ] Tasks go here
3235

36+
### Estimated completion date:
3337

3438
### Design review:
39+
3540
<!-- 1-2 people needed for signoff -->
41+
3642
Do not signoff unless:
37-
- 1) agreed the tasks and design approach will achieve acceptance, and
38-
- 2) the work can be completed by one person within the SLA.
39-
Design reviewers should consider simpler approaches to achieve goals.
43+
44+
- 1. agreed the tasks and design approach will achieve acceptance, and
45+
- 2. the work can be completed by one person within the SLA.
46+
Design reviewers should consider simpler approaches to achieve goals.
4047

4148
(Please leave a comment to sign off)

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
### What I did
22

33
<!-- The `fixes:` field denotes an issue that will be marked resolved by merging this PR -->
4+
45
fixes: #
56

67
### How I did it

.github/workflows/commitlint.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ jobs:
99
runs-on: ubuntu-latest
1010

1111
steps:
12-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v3
1313
with:
1414
fetch-depth: 0
1515

1616
- name: Setup Python
17-
uses: actions/setup-python@v2
17+
uses: actions/setup-python@v4
1818
with:
1919
python-version: 3.8
2020

.github/workflows/title.yaml renamed to .github/workflows/prtitle.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v3
1616

1717
- name: Setup Python
18-
uses: actions/setup-python@v2
18+
uses: actions/setup-python@v4
1919
with:
2020
python-version: 3.8
2121

.github/workflows/publish.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v3
1414

1515
- name: Set up Python
16-
uses: actions/setup-python@v2
16+
uses: actions/setup-python@v4
1717
with:
1818
python-version: 3.8
1919

.github/workflows/test.yaml

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,22 @@ on: ["push", "pull_request"]
22

33
name: Test
44

5+
concurrency:
6+
# Cancel older, in-progress jobs from the same PR, same workflow.
7+
# use run_id if the job is triggered by a push to ensure
8+
# push-triggered jobs to not get canceled.
9+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
10+
cancel-in-progress: true
11+
512
jobs:
613
linting:
714
runs-on: ubuntu-latest
815

916
steps:
10-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v3
1118

1219
- name: Setup Python
13-
uses: actions/setup-python@v2
20+
uses: actions/setup-python@v4
1421
with:
1522
python-version: 3.8
1623

@@ -20,20 +27,23 @@ jobs:
2027
- name: Run Black
2128
run: black --check .
2229

30+
- name: Run isort
31+
run: isort --check-only .
32+
2333
- name: Run flake8
2434
run: flake8 .
2535

26-
- name: Run isort
27-
run: isort --check-only .
36+
- name: Run mdformat
37+
run: mdformat . --check
2838

2939
type-check:
3040
runs-on: ubuntu-latest
3141

3242
steps:
33-
- uses: actions/checkout@v2
43+
- uses: actions/checkout@v3
3444

3545
- name: Setup Python
36-
uses: actions/setup-python@v2
46+
uses: actions/setup-python@v4
3747
with:
3848
python-version: 3.8
3949

@@ -52,10 +62,10 @@ jobs:
5262
python-version: [3.8, 3.9, '3.10']
5363

5464
steps:
55-
- uses: actions/checkout@v2
65+
- uses: actions/checkout@v3
5666

5767
- name: Setup Python
58-
uses: actions/setup-python@v2
68+
uses: actions/setup-python@v4
5969
with:
6070
python-version: ${{ matrix.python-version }}
6171

@@ -73,10 +83,10 @@ jobs:
7383
# fail-fast: true
7484
#
7585
# steps:
76-
# - uses: actions/checkout@v2
86+
# - uses: actions/checkout@v3
7787
#
7888
# - name: Setup Python
79-
# uses: actions/setup-python@v2
89+
# uses: actions/setup-python@v4
8090
# with:
8191
# python-version: 3.8
8292
#

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,8 @@ version.py
119119

120120
# Ape stuff
121121
.build/
122+
123+
**/.DS_Store
124+
*.swp
125+
*.swo
126+

.mdformat.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
number = true

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@ repos:
1010
- id: isort
1111

1212
- repo: https://github.com/psf/black
13-
rev: 22.6.0
13+
rev: 22.12.0
1414
hooks:
1515
- id: black
1616
name: black
1717

18-
- repo: https://gitlab.com/pycqa/flake8
19-
rev: 4.0.1
18+
- repo: https://github.com/pycqa/flake8
19+
rev: 5.0.4
2020
hooks:
2121
- id: flake8
2222

2323
- repo: https://github.com/pre-commit/mirrors-mypy
24-
rev: v0.971
24+
rev: v0.991
2525
hooks:
2626
- id: mypy
27-
additional_dependencies: [types-PyYAML, types-requests]
27+
additional_dependencies: [types-setuptools, pydantic]
2828

2929

3030
default_language_version:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Ecosystem Plugin for Polygon support in Ape
44

55
## Dependencies
66

7-
* [python3](https://www.python.org/downloads) version 3.8 or greater, python3-dev
7+
- [python3](https://www.python.org/downloads) version 3.8 or greater, python3-dev
88

99
## Installation
1010

ape_polygon/ecosystem.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@
1414
def _create_network_config(
1515
required_confirmations: int = 1, block_time: int = 2, **kwargs
1616
) -> NetworkConfig:
17-
# Helper method to isolate `type: ignore` comments.
1817
return NetworkConfig(
1918
required_confirmations=required_confirmations, block_time=block_time, **kwargs
20-
) # type: ignore
19+
)
2120

2221

2322
def _create_local_config(default_provider: Optional[str] = None) -> NetworkConfig:

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ include = '\.pyi?$'
1919

2020
[tool.pytest.ini_options]
2121
addopts = """
22-
-n auto
2322
-p no:ape_test
2423
--cov-branch
2524
--cov-report term

setup.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
3-
from setuptools import find_packages, setup # type: ignore
3+
from setuptools import find_packages, setup
44

55
extras_require = {
66
"test": [ # `test` GitHub Action jobs uses this
@@ -10,10 +10,14 @@
1010
"hypothesis>=6.2.0,<7", # Strategy-based fuzzer
1111
],
1212
"lint": [
13-
"black>=22.6.0,<23", # auto-formatter and linter
14-
"mypy>=0.971,<1", # Static type analyzer
15-
"flake8>=4.0.1,<5", # Style linter
16-
"isort>=5.10.1,<6", # Import sorting linter
13+
"black>=22.12.0", # auto-formatter and linter
14+
"mypy>=0.991", # Static type analyzer
15+
"types-setuptools", # Needed due to mypy typeshed
16+
"flake8>=5.0.4", # Style linter
17+
"isort>=5.10.1", # Import sorting linter
18+
"mdformat>=0.7.16", # Auto-formatter for markdown
19+
"mdformat-gfm>=0.3.5", # Needed for formatting GitHub-flavored markdown
20+
"mdformat-frontmatter>=0.4.1", # Needed for frontmatters-style headers in issue templates
1721
],
1822
"release": [ # `release` GitHub Action job uses this
1923
"setuptools", # Installation tool
@@ -53,7 +57,7 @@
5357
url="https://github.com/ApeWorX/ape-polygon",
5458
include_package_data=True,
5559
install_requires=[
56-
"eth-ape>=0.5.2,<0.6",
60+
"eth-ape>=0.6.0,<0.7",
5761
],
5862
python_requires=">=3.8,<3.11",
5963
extras_require=extras_require,

tests/test_integration.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,21 @@ def assert_rich_text(actual: str, expected: str):
1313
"""
1414
The output from `rich` causes a bunch of extra spaces to
1515
appear at the end of each line. For easier testing, we remove those here.
16+
Also, we ignore whether the expected line is at the end or in the middle
17+
of the output to handle cases when the test-runner has additional plugins
18+
installed.
1619
"""
17-
actual = f"polygon{actual.split('polygon')[-1]}"
18-
if "ethereum" in actual:
19-
actual = actual.split("ethereum")[0]
20+
expected_lines = [
21+
x.replace("└", "").replace("├", "").replace("│", "").strip()
22+
for x in expected.strip().split("\n")
23+
]
24+
actual_lines = [
25+
x.replace("└", "").replace("├", "").replace("│", "").strip()
26+
for x in actual.strip().split("\n")
27+
]
2028

21-
expected = expected.strip()
22-
lines = actual.split("\n")
23-
new_lines = []
24-
for line in lines:
25-
if line:
26-
new_lines.append(line.rstrip())
27-
28-
actual = "\n".join(new_lines)
29-
assert actual == expected
29+
for expected_line in expected_lines:
30+
assert expected_line in actual_lines
3031

3132

3233
def test_networks(runner, cli):

0 commit comments

Comments
 (0)