Skip to content

Commit 896fe96

Browse files
committed
consolidate spellcheck
1 parent 0020a23 commit 896fe96

File tree

9 files changed

+1342
-1538
lines changed

9 files changed

+1342
-1538
lines changed

.github/workflows/fixture_feature_release.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
1616
with:
1717
submodules: false
18-
18+
1919
- name: Get feature names
2020
id: feature-name
2121
shell: bash
@@ -25,7 +25,7 @@ jobs:
2525
names=$(grep -Po "^${FEATURE_NAME}(?=:)" .github/configs/feature.yaml | jq --raw-input . | jq -c --slurp .)
2626
echo names=${names}
2727
echo names=${names} >> "$GITHUB_OUTPUT"
28-
28+
2929
build:
3030
needs: feature-names
3131
runs-on: [self-hosted-ghr, size-gigachungus-x64]
@@ -37,7 +37,7 @@ jobs:
3737
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
3838
with:
3939
submodules: true
40-
40+
4141
- name: Fetch lllc
4242
uses: ./.github/actions/fetch-binary
4343
with:
@@ -47,7 +47,7 @@ jobs:
4747
remote_name: lllc
4848
binary_name: lllc
4949
expected_sha256: 865a0d5379acb3b5471337b5dcf686a2dd71587c6b65b9da6c963de627e0b300
50-
50+
5151
- name: Fetch Solidity
5252
uses: ./.github/actions/fetch-binary
5353
with:
@@ -57,13 +57,13 @@ jobs:
5757
remote_name: solc-static-linux
5858
binary_name: solc
5959
expected_sha256: fb03a29a517452b9f12bcf459ef37d0a543765bb3bbc911e70a87d6a37c30d5f
60-
60+
6161
- uses: ./.github/actions/build-fixtures
6262
with:
6363
release_name: ${{ matrix.feature }}
6464
uv_version: ${{ vars.UV_VERSION }}
6565
python_version: ${{ vars.DEFAULT_PYTHON_VERSION }}
66-
66+
6767
release:
6868
runs-on: ubuntu-latest
6969
needs: build
@@ -78,7 +78,7 @@ jobs:
7878
gh run download ${{ github.run_id }} --dir ./artifacts
7979
env:
8080
GH_TOKEN: ${{ github.token }}
81-
81+
8282
- name: Draft Pre-release to EEST Repository
8383
run: |
8484
# Strip "tests-" prefix from tag for EEST
@@ -92,4 +92,4 @@ jobs:
9292
--generate-notes \
9393
./artifacts/**/*
9494
env:
95-
GH_TOKEN: ${{ secrets.EEST_RELEASE_TOKEN }}
95+
GH_TOKEN: ${{ secrets.EEST_RELEASE_TOKEN }}

.github/workflows/fixture_full_release.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Create Fixture Full Release
1+
name: Create Fixture Full Release
22

33
on:
44
push:
@@ -77,17 +77,17 @@ jobs:
7777
gh run download ${{ github.run_id }} --dir ./artifacts
7878
env:
7979
GH_TOKEN: ${{ github.token }}
80-
80+
8181
- name: Create Release
8282
run: |
8383
# Strip "tests-" prefix from tag for EEST
8484
TAG_NAME="${{ github.ref_name }}"
8585
RELEASE_TAG="${TAG_NAME#tests-}"
86-
86+
8787
gh release create "$RELEASE_TAG" \
8888
--repo ethereum/execution-spec-tests \
8989
--draft \
9090
--generate-notes \
9191
./artifacts/**/*
9292
env:
93-
GH_TOKEN: ${{ secrets.EEST_RELEASE_TOKEN }}
93+
GH_TOKEN: ${{ secrets.EEST_RELEASE_TOKEN }}

docs/templates/function_parameter_datatable.html.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@
4242
</div>
4343
</div>
4444
<table id="test_table" class="display compact nowrap">
45-
<thead>
45+
<thread>
4646
<tr>
4747
<th>Test ID (Abbreviated)</th>
4848
{% for header in cases[0].params.keys() %}
4949
<th>{{ header }}</th>
5050
{% endfor %}
5151
</tr>
52-
</thead>
52+
</thread>
5353
<tbody>
5454
{% for case in cases %}
5555
<tr data-fork="{{ case.fork }}" data-fixture="{{ case.fixture_type }}">

scripts/add_to_whitelist.py

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#!/usr/bin/env python3
2+
3+
import sys
4+
import os
5+
6+
def main():
7+
# Get words from command-line arguments
8+
new_words = sys.argv[1:]
9+
10+
if not new_words:
11+
print("Usage: ./whitelist_manager.py <word1> <word2> <word3> ...")
12+
print("Example: ./whitelist_manager.py foo bar baz")
13+
sys.exit(1)
14+
15+
whitelist_file = 'whitelist.txt'
16+
17+
# Read existing whitelist (create empty list if file doesn't exist)
18+
existing_words = []
19+
if os.path.exists(whitelist_file):
20+
with open(whitelist_file, 'r', encoding='utf-8') as f:
21+
content = f.read()
22+
existing_words = [w.strip() for w in content.split('\n') if w.strip()]
23+
print(f"Read {len(existing_words)} existing entries from {whitelist_file}")
24+
else:
25+
print(f"Creating new {whitelist_file}")
26+
27+
print(f"Adding {len(new_words)} new words: {new_words}")
28+
29+
# Combine and deduplicate using set
30+
all_words = set(existing_words + new_words)
31+
32+
print(f"Total unique entries: {len(all_words)}")
33+
34+
# Sort alphabetically (case-insensitive)
35+
sorted_words = sorted(all_words, key=str.lower)
36+
37+
# Add blank lines before each new letter
38+
words_with_separators = []
39+
previous_letter = ''
40+
41+
for word in sorted_words:
42+
current_letter = word[0].lower()
43+
44+
# If we're starting a new letter (and it's not the first word), add a blank line
45+
if current_letter != previous_letter and len(words_with_separators) > 0:
46+
words_with_separators.append('')
47+
48+
words_with_separators.append(word)
49+
previous_letter = current_letter
50+
51+
# Create the whitelist content
52+
whitelist_content = '\n'.join(words_with_separators)
53+
54+
# Write to whitelist file
55+
with open(whitelist_file, 'w', encoding='utf-8') as f:
56+
f.write(whitelist_content)
57+
58+
print(f"\nSuccessfully updated {whitelist_file}")
59+
60+
if __name__ == '__main__':
61+
main()

tests/static/state_tests/stStaticFlagEnabled/StaticcallForPrecompilesIssue683Filler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ StaticcallForPrecompilesIssue683:
44
comment: |
55
Bytecode from issue 683, that initially show the problem with staticcall in hevm.
66
Issue link: https://github.com/ethereum/tests/issues/683
7-
Pullrequest link with original bytecode: https://github.com/dapphub/dapptools/pull/360
7+
Pull request link with original bytecode: https://github.com/dapphub/dapptools/pull/360
88
env:
99
currentCoinbase: '0xcafe000000000000000000000000000000000001'
1010
currentDifficulty: '0x20000'

tox.ini

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@ requires =
44
tox-uv >=1.29
55
envlist = py3,pypy3,json_infra,static,tests_pytest_py3,tests_pytest_pypy3
66

7-
87
[eest]
98
runner = uv-venv-lock-runner
10-
package = editable
9+
uv_seed = false
1110
wheel_build_env = .pkg
12-
python_source_dirs = src/ethereum_spec_tests tests # .github/scripts
11+
python_source_dirs = src/ethereum_spec_tests tests packages/tests .github/scripts
1312

1413
[testenv]
1514
runner = uv-venv-lock-runner
@@ -22,7 +21,7 @@ extras =
2221
test
2322
doc
2423
commands =
25-
codespell -I whitelist.txt src tests/evm_tools tests/json_infra packages
24+
codespell -I whitelist.txt src tests/evm_tools tests/json_infra packages docs src/ethereum_spec_tests tests packages/tests
2625
ruff check src packages tests --exclude tests/fixtures
2726
ruff format src packages tests --check
2827
mypy
@@ -131,18 +130,6 @@ commands =
131130
docc --output "{toxworkdir}/docs"
132131
python -c 'import pathlib; print("documentation available under file://\{0\}".format(pathlib.Path(r"{toxworkdir}") / "docs" / "index.html"))'
133132

134-
[testenv:eest-spellcheck]
135-
description = Spellcheck EEST code and documentation (codespell)
136-
extras = docs
137-
runner = {[eest]runner}
138-
package = {[eest]package}
139-
wheel_build_env = {[eest]wheel_build_env}
140-
passenv =
141-
GITHUB_ACTIONS
142-
GITHUB_STEP_SUMMARY
143-
commands =
144-
codespell --ignore-words=whitelist-eest.txt {[eest]python_source_dirs} docs
145-
146133
[testenv:eest-changelog]
147134
description = Validate EEST changelog entries
148135
extras = docs
@@ -162,8 +149,8 @@ runner = {[eest]runner}
162149
package = {[eest]package}
163150
wheel_build_env = {[eest]wheel_build_env}
164151
commands =
165-
# ruff check --no-fix --show-fixes docs/scripts
166-
# ruff format --check docs/scripts
152+
ruff check --no-fix --show-fixes docs/scripts
153+
ruff format --check docs/scripts
167154
mkdocs build --strict
168155

169156
[testenv:eest-markdownlint]
@@ -174,9 +161,8 @@ package = {[eest]package}
174161
commands = python -c "import packages.tests.src.cli.tox_helpers; packages.tests.src.cli.tox_helpers.markdownlint()"
175162

176163
[testenv:eest-docs]
177-
description = Alias that runs all documentation checks (spellcheck, markdownlint, mkdocs).
164+
description = Alias that runs EEST documentation checks (spellcheck, markdownlint, mkdocs)
178165
extras =
179-
{[testenv:eest-spellcheck]extras}
180166
{[testenv:eest-markdownlint]extras}
181167
{[testenv:eest-mkdocs]extras}
182168
runner = {[eest]runner}
@@ -187,3 +173,19 @@ commands =
187173
{[testenv:eest-spellcheck]commands}
188174
{[testenv:eest-markdownlint]commands}
189175
{[testenv:eest-mkdocs]commands}
176+
177+
[testenv:docs]
178+
description = Alias that runs all documentation checks (spellcheck, markdownlint, mkdocs)
179+
extras =
180+
{[testenv:eest-markdownlint]extras}
181+
{[testenv:eest-mkdocs]extras}
182+
doc
183+
runner = {[eest]runner}
184+
package = {[eest]package}
185+
setenv =
186+
{[testenv:eest-mkdocs]setenv}
187+
commands =
188+
codespell -I whitelist.txt docs
189+
{[testenv:eest-markdownlint]commands}
190+
{[testenv:eest-mkdocs]commands}
191+
{[testenv:doc]commands}

uv.lock

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)