Skip to content

Commit 9065b41

Browse files
committed
test: use our test action
1 parent fe6233f commit 9065b41

File tree

94 files changed

+899
-1889
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+899
-1889
lines changed

.github/workflows/test.yaml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515

1616
steps:
1717
- uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
1820

1921
- name: Setup Python
2022
uses: actions/setup-python@v5
@@ -40,6 +42,8 @@ jobs:
4042

4143
steps:
4244
- uses: actions/checkout@v4
45+
with:
46+
fetch-depth: 0
4347

4448
- name: Setup Python
4549
uses: actions/setup-python@v5
@@ -85,20 +89,26 @@ jobs:
8589
with:
8690
version: 1.15.6
8791

92+
- name: Setup Ape
93+
uses: ApeWorX/github-action@v3
94+
8895
- name: Install Dependencies
8996
run: |
9097
python -m pip install --upgrade pip
9198
pip uninstall eth-ape --yes
9299
pip install .[test]
93100
101+
- name: Install Ape Dependencies
102+
run: ape pm install
103+
94104
- name: Run Functional Tests
95-
run: ape test tests/functional -m "not fuzzing" -s --cov=src --cov-append -n auto --dist loadgroup
105+
run: ape test tests/functional -m "not fuzzing" -s --cov=src --cov-append -n auto --dist loadgroup -v ERROR
96106

97107
- name: Run Integration Tests
98-
run: ape test tests/integration -m "not fuzzing" -s --cov=src --cov-append -n auto --dist loadgroup
108+
run: ape test tests/integration -m "not fuzzing" -s --cov=src --cov-append -n auto --dist loadgroup -v ERROR
99109

100110
- name: Run Performance Tests
101-
run: ape test tests/performance -s
111+
run: ape test tests/performance -s -v ERROR
102112

103113
fuzzing:
104114
runs-on: ubuntu-latest
@@ -108,6 +118,8 @@ jobs:
108118

109119
steps:
110120
- uses: actions/checkout@v4
121+
with:
122+
fetch-depth: 0
111123

112124
- name: Setup Python
113125
uses: actions/setup-python@v5

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ repos:
55
- id: check-yaml
66

77
- repo: https://github.com/astral-sh/ruff-pre-commit
8-
rev: v0.10.0 # Latest ruff version
8+
rev: v0.11.2 # Latest ruff version
99
hooks:
1010
- id: ruff
1111
args: [--fix, --exit-non-zero-on-fix]

docs/userguides/config.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ A simple example of configuring dependencies looks like this:
165165
[[tool.ape.dependencies]]
166166
name = "openzeppelin"
167167
github = "OpenZeppelin/openzeppelin-contracts"
168-
version = "4.4.2"
168+
version = "4.9.6"
169169
```
170170

171171
Or the equivalent YAML:
@@ -174,7 +174,7 @@ Or the equivalent YAML:
174174
dependencies:
175175
- name: openzeppelin
176176
github: OpenZeppelin/openzeppelin-contracts
177-
version: 4.4.2
177+
version: 4.9.6
178178
```
179179

180180
## Deployments

docs/userguides/dependencies.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ The following section highlights how to use each of them and what their differen
2424

2525
You can use dependencies from GitHub.
2626
For example, a common dependency for Solidity projects is [Open Zeppelin](https://github.com/OpenZeppelin/openzeppelin-contracts).
27-
To use Open Zeppelin version 4.4.2 in your Ape Solidity project, add the following to your `ape-config.yaml` file:
27+
To use Open Zeppelin version 4.9.6 in your Ape Solidity project, add the following to your `ape-config.yaml` file:
2828

2929
```yaml
3030
dependencies:
3131
- name: OpenZeppelin
3232
github: OpenZeppelin/openzeppelin-contracts
33-
version: 4.4.2
33+
version: 4.9.6
3434
```
3535
3636
Then, follow the guide below about `remappings` to use the dependency.
@@ -199,7 +199,7 @@ You can also use Python to install dependencies, using `**kwargs` as the same fi
199199
from ape import project
200200

201201
project.dependencies.install(
202-
github="OpenZeppelin/openzeppelin-contracts", name="openzeppelin", version="4.4.2"
202+
github="OpenZeppelin/openzeppelin-contracts", name="openzeppelin", version="4.9.6"
203203
)
204204
```
205205

@@ -326,7 +326,7 @@ For example, if you are using dependencies like:
326326
dependencies:
327327
- name: OpenZeppelin
328328
github: OpenZeppelin/openzeppelin-contracts
329-
version: 4.4.2
329+
version: 4.9.6
330330
```
331331

332332
And your source files import from `openzeppelin` this way:

pyproject.toml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,18 @@
22
requires = ["setuptools>=75.0.0", "wheel", "setuptools_scm[toml]>=5.0"]
33

44
[tool.ape]
5-
contracts_folder = "tests/functional/data/contracts/ethereum/local"
5+
name = "ape"
6+
contracts_folder = "tests/functional/data/contracts"
7+
8+
[[tool.ape.dependencies]]
9+
name = "openzeppelin"
10+
version = "4.9.6"
11+
github = "OpenZeppelin/openzeppelin-contracts"
12+
13+
[[tool.ape.dependencies]]
14+
name = "openzeppelin"
15+
version = "5.2.0"
16+
github = "OpenZeppelin/openzeppelin-contracts"
617

718
[tool.ape.test]
819
show_internal = true

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@
2020
"pytest-timeout>=2.2.0,<3", # For avoiding timing out during tests
2121
"hypothesis>=6.2.0,<7.0", # Strategy-based fuzzer
2222
"hypothesis-jsonschema==0.19.0", # JSON Schema fuzzer extension
23+
"ape-vyper>=0.8.9,<0.9", # Needed for compiling test contracts
24+
"ape-solidity>=0.8.5,<0.9", # Needed for compiling test contracts
2325
],
2426
"lint": [
25-
"ruff>=0.10.0", # Unified linter and formatter
27+
"ruff>=0.11.2", # Unified linter and formatter
2628
"mypy>=1.15.0,<1.16.0", # Static type analyzer
2729
"types-PyYAML", # Needed due to mypy typeshed
2830
"types-requests", # Needed due to mypy typeshed

src/ape/api/address.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,15 +170,13 @@ def codesize(self) -> int:
170170
"""
171171
The number of bytes in the smart contract.
172172
"""
173-
174173
return len(self.code)
175174

176175
@property
177176
def is_contract(self) -> bool:
178177
"""
179178
``True`` when there is code associated with the address.
180179
"""
181-
182180
return len(HexBytes(self.code)) > 0
183181

184182
@cached_property

src/ape/contracts/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -914,7 +914,7 @@ def identifier_lookup(self) -> dict[str, "ABI_W_SELECTOR_T"]:
914914
def source_path(self) -> Optional[Path]:
915915
"""
916916
Returns the path to the local contract if determined that this container
917-
belongs to the active project by cross checking source_id.
917+
belongs to the active project by cross-checking source_id.
918918
"""
919919
if not (source_id := self.contract_type.source_id):
920920
return None

0 commit comments

Comments
 (0)