Skip to content

Commit d010033

Browse files
authored
Merge pull request #10 from marioevz/folder-structure-refactor
Folder Structure Refactor
2 parents fe5359b + ab733ec commit d010033

Some content is hidden

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

58 files changed

+288
-203
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ __pycache__/
88
*.py[cod]
99
*$py.class
1010
venv/
11-
fixtures/
11+
/fixtures/
1212

1313
# C extensions
1414
*.so

README.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,18 @@ how to build go-ethereum utilities.
3333

3434
## Overview
3535

36-
### `ethereum_test`
36+
### `ethereum_test_tools`
3737

38-
The `ethereum_test` package provides primitives and helpers to allow developers
39-
to easily test the consensus logic of Ethereum clients.
38+
The `ethereum_test_tools` package provides primitives and helpers to allow
39+
developers to easily test the consensus logic of Ethereum clients.
4040

41-
### `ethereum_test_filler`
41+
### `ethereum_test_filling_tool`
4242

43-
The `ethereum_test_filler` pacakge is a CLI application that recursively searches
44-
a given directory for Python modules that export test filler functions generated
45-
using `ethereum_test`. It then processes the fillers using the transition tool
46-
and the block builder tool, and writes the resulting fixture to file.
43+
The `ethereum_test_filling_tool` pacakge is a CLI application that recursively
44+
searches a given directory for Python modules that export test filler functions
45+
generated using `ethereum_test_tools`.
46+
It then processes the fillers using the transition tool and the block builder
47+
tool, and writes the resulting fixture to file.
4748

4849
### `evm_block_builder`
4950

@@ -53,7 +54,7 @@ This is a wrapper around the [block builder][b11r] (b11r) tool.
5354

5455
This is a wrapper around the [transaction][t8n] (t8n) tool.
5556

56-
### `ethereum_tests`
57+
### `fillers`
5758

5859
Contains all the Ethereum consensus tests available in this repository.
5960

@@ -92,7 +93,7 @@ The Blockchain tests span multiple blocks which can contain or not transactions,
9293

9394
### Adding a New Test
9495

95-
All currently implemented tests can be found in the `src/ethereum_tests`
96+
All currently implemented tests can be found in the `fillers`
9697
directory, which is composed of many subdirectories, and each one represents a
9798
different test category.
9899

@@ -103,11 +104,11 @@ vectors.
103104
A new test can be added by either:
104105

105106
- Adding a new `test_` python function to an existing file in any of the
106-
existing category subdirectories within `src/ethereum_tests`.
107+
existing category subdirectories within `fillers`.
107108
- Creating a new source file in an existing category, and populating it with
108109
the new test function(s).
109110
- Creating an entirely new category by adding a subdirectory in
110-
`src/ethereum_tests` with the appropriate source files and test functions.
111+
`fillers` with the appropriate source files and test functions.
111112

112113
### Test Spec Generator Functions
113114

@@ -124,8 +125,8 @@ following decorators:
124125
These decorators specify the forks on which the test vector is supposed to run.
125126

126127
They also automatically append necessary information for the
127-
`ethereum_test_filler` to process when the generator is being executed to fill
128-
the tests.
128+
`ethereum_test_filling_tool` to process when the generator is being executed to
129+
fill the tests.
129130

130131
The test vector function must take only one `str` parameter: the fork name.
131132

@@ -234,7 +235,7 @@ Within the `post` dictionary object, an account address can be:
234235
The `Account` object is used to specify the properties of an account to be
235236
verified in the post state.
236237

237-
The python representation can be found in [src/ethereum_test/types.py](src/ethereum_test/types.py).
238+
The python representation can be found in [src/ethereum_test_tools/common/types.py](src/ethereum_test_tools/common/types.py).
238239

239240
It can verify the following properties of an account:
240241
- `nonce`: the scalar value equal to a) the number of transactions sent by
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Test Yul Source Code Examples
33
"""
44

5-
from ethereum_test import (
5+
from ethereum_test_tools import (
66
Account,
77
Environment,
88
StateTest,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Test EIP-1344 CHAINID opcode
33
"""
44

5-
from ethereum_test import (
5+
from ethereum_test_tools import (
66
Account,
77
Environment,
88
StateTest,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Test DUP opcodes
33
"""
44

5-
from ethereum_test import (
5+
from ethereum_test_tools import (
66
Account,
77
Environment,
88
StateTest,

setup.cfg

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@ classifiers =
1212

1313
[options]
1414
packages =
15-
ethereum_test
16-
ethereum_tests
17-
ethereum_test_filler
18-
evm_transition_tool
1915
evm_block_builder
16+
evm_transition_tool
17+
ethereum_test_tools
18+
ethereum_test_filling_tool
2019

2120
package_dir =
2221
=src
@@ -29,7 +28,7 @@ install_requires =
2928
types-setuptools==57.4.4
3029

3130
[options.package_data]
32-
ethereum_test =
31+
ethereum_test_tools =
3332
py.typed
3433
evm_transition_tool =
3534
py.typed
@@ -38,7 +37,7 @@ evm_block_builder =
3837

3938
[options.entry_points]
4039
console_scripts =
41-
tf = ethereum_test_filler.main:main
40+
tf = ethereum_test_filling_tool.main:main
4241

4342
[options.extras_require]
4443
test =
@@ -78,6 +77,8 @@ per-file-ignore =
7877

7978
extend-exclude =
8079
setup.py
81-
tests/
80+
src/evm_block_builder/tests/
81+
src/evm_transition_tool/tests/
82+
src/ethereum_test_tools/tests/
8283

8384
# vim: set ft=dosini:

src/ethereum_test/__init__.py

Lines changed: 0 additions & 41 deletions
This file was deleted.

src/ethereum_test/helpers.py

Lines changed: 0 additions & 57 deletions
This file was deleted.

0 commit comments

Comments
 (0)