Skip to content

Commit fa1ad3c

Browse files
committed
Merge branch 'forks/amsterdam' into projects/zkevm
2 parents 101b394 + 4f20148 commit fa1ad3c

6 files changed

Lines changed: 50 additions & 9 deletions

File tree

.github/actions/setup-env/action.yaml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,4 @@ runs:
1111
1212
- name: Install build dependencies
1313
shell: bash
14-
run: sudo DEBIAN_FRONTEND=noninteractive apt-get install --yes --force-yes build-essential pkg-config
15-
16-
- name: Download Geth and add to $PATH
17-
shell: bash
18-
run: |
19-
mkdir -p $GITHUB_WORKSPACE/bin
20-
$GITHUB_WORKSPACE/scripts/download_geth_linux.py --dir $GITHUB_WORKSPACE/bin
21-
echo $GITHUB_WORKSPACE/bin >> $GITHUB_PATH
14+
run: sudo DEBIAN_FRONTEND=noninteractive apt-get install --yes --force-yes build-essential pkg-config libsecp256k1-dev
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Setup Geth
2+
description: Download Geth and add to $PATH
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: Download Geth and add to $PATH
7+
shell: bash
8+
run: |
9+
mkdir -p $GITHUB_WORKSPACE/bin
10+
$GITHUB_WORKSPACE/scripts/download_geth_linux.py --dir $GITHUB_WORKSPACE/bin
11+
echo $GITHUB_WORKSPACE/bin >> $GITHUB_PATH

.github/actions/setup-uv/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: Install uv, Python, and tox for CI jobs
33
inputs:
44
python-version:
55
description: Python version to install (e.g. "3.14", "pypy3.11")
6-
default: "3.14"
6+
default: "3.13"
77
enable-cache:
88
description: Enable uv dependency cache
99
default: "true"

.github/workflows/test.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ jobs:
6363
with:
6464
submodules: recursive
6565
- uses: ./.github/actions/setup-uv
66+
with:
67+
python-version: "3.14"
68+
- uses: ./.github/actions/setup-env
6669
- name: Run py3 tests
6770
run: tox -e py3
6871
env:
@@ -84,6 +87,7 @@ jobs:
8487
- uses: ./.github/actions/setup-uv
8588
with:
8689
python-version: "pypy3.11"
90+
- uses: ./.github/actions/setup-env
8791
- name: Run pypy3 tests
8892
run: tox -e pypy3
8993
env:
@@ -102,6 +106,7 @@ jobs:
102106
with:
103107
python-version: "3.11"
104108
- uses: ./.github/actions/setup-env
109+
- uses: ./.github/actions/setup-geth
105110
- uses: ./.github/actions/get-changed-files
106111
id: get-changed-files
107112
- name: Run json infra tests
@@ -115,6 +120,7 @@ jobs:
115120
with:
116121
submodules: recursive
117122
- uses: ./.github/actions/setup-uv
123+
- uses: ./.github/actions/setup-env
118124
- uses: ./.github/actions/build-evmone
119125
- name: Run py3 tests
120126
run: tox -e tests_pytest_py3
@@ -131,6 +137,7 @@ jobs:
131137
- uses: ./.github/actions/setup-uv
132138
with:
133139
python-version: "pypy3.11"
140+
- uses: ./.github/actions/setup-env
134141
- uses: ./.github/actions/build-evmone
135142
- name: Run pypy3 tests
136143
run: tox -e tests_pytest_pypy3

docs/getting_started/code_standards_details.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,3 +163,20 @@ For a granular comparison:
163163
```console
164164
diff <(hasher --tests fixtures/) <(hasher --tests fixtures_new/)
165165
```
166+
167+
#### The `compare` Subcommand
168+
169+
The `hasher compare` subcommand directly compares two fixture directories
170+
and shows only the differences:
171+
172+
```console
173+
hasher compare fixtures/ fixtures_new/
174+
```
175+
176+
| Flag | Description |
177+
| ------------------- | --------------------------------------------------------- |
178+
| `--depth N` / `-d` | Limit to N levels (0=root, 1=folders, 2=files, 3=tests). |
179+
| `--files` / `-f` | Show differences at file level. |
180+
| `--tests` / `-t` | Show differences at individual test level. |
181+
| `--root` / `-r` | Show only the root-level hash difference. |
182+
| `--ignore-missing` | Hide entries that exist in only one directory. |

packages/testing/src/execution_testing/cli/hasher.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,17 +311,22 @@ def display_diff(
311311
*,
312312
left_label: str,
313313
right_label: str,
314+
ignore_missing: bool = False,
314315
) -> None:
315316
"""Render diff showing only changed hashes."""
316317
differences: List[tuple[str, str, str]] = []
317318

318319
for path in left:
319320
right_hash = right.get(path, "<missing>")
320321
if left[path] != right_hash:
322+
if ignore_missing and right_hash == "<missing>":
323+
continue
321324
differences.append((path, left[path], right_hash))
322325

323326
for path in right:
324327
if path not in left:
328+
if ignore_missing:
329+
continue
325330
differences.append((path, "<missing>", right[path]))
326331

327332
if not differences:
@@ -433,6 +438,12 @@ def hash_cmd(
433438
default=None,
434439
help="Limit to N levels (0=root, 1=folders, 2=files, 3=tests).",
435440
)
441+
@click.option(
442+
"--ignore-missing",
443+
is_flag=True,
444+
default=False,
445+
help="Hide entries that exist in only one directory.",
446+
)
436447
@hash_options
437448
def compare_cmd(
438449
left_folder: str,
@@ -441,6 +452,7 @@ def compare_cmd(
441452
tests: bool,
442453
root: bool,
443454
depth: Optional[int],
455+
ignore_missing: bool,
444456
) -> None:
445457
"""Compare two fixture directories and show differences."""
446458
try:
@@ -474,6 +486,7 @@ def compare_cmd(
474486
right_hashes,
475487
left_label=left_folder,
476488
right_label=right_folder,
489+
ignore_missing=ignore_missing,
477490
)
478491
sys.exit(1)
479492
except PermissionError as e:

0 commit comments

Comments
 (0)