Skip to content

Commit ea111a2

Browse files
committed
Fix changelog tool
1 parent 3926e4c commit ea111a2

File tree

4 files changed

+25
-12
lines changed

4 files changed

+25
-12
lines changed

docs/CHANGELOG.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,15 @@ Test fixtures for use by clients are available for each release on the [Github r
1212

1313
#### `fill`
1414

15-
- 🐞 Allow `evmone` to fill Prague and Osaka blockchain tests (mainly modified deposit contract tests) ([#1689](https://github.com/ethereum/execution-specs/pull/1689))
15+
- 🐞 Allow `evmone` to fill Prague and Osaka blockchain tests (mainly modified deposit contract tests) ([#1689](https://github.com/ethereum/execution-specs/pull/1689)).
1616

1717
#### `consume`
1818

1919
- 🐞 Fix a bug with `consume sync` tests where some clients don't have JSON-RPC immediately available after syncing and can't yet serve the synced block ([#1670](https://github.com/ethereum/execution-specs/pull/1670)).
2020

2121
### 📋 Misc
2222

23-
- 🐞 WELDed the EEST tox environments relevant to producing documentation into EELS. ([#1695](https://github.com/ethereum/execution-specs/pull/1659))
24-
- 🔀 Merged codespell dictionaries for EEST/EELS and added a new tool to cleanly add words to the whitelist while keeping it organized. ([#1695](https://github.com/ethereum/execution-specs/pull/1659))
23+
- 🐞 WELDed the EEST tox environments relevant to producing documentation into EELS, and added a tool to cleanly add codespell whitelist entries. ([#1695](https://github.com/ethereum/execution-specs/pull/1659)).
2524

2625
### 🧪 Test Cases
2726

packages/testing/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ groupstats = "execution_testing.cli.show_pre_alloc_group_stats:main"
120120
extract_config = "execution_testing.cli.extract_config:extract_config"
121121
compare_fixtures = "execution_testing.cli.compare_fixtures:main"
122122
modify_static_test_gas_limits = "execution_testing.cli.modify_static_test_gas_limits:main"
123+
validate_changelog = "execution_testing.cli.tox_helpers:validate_changelog"
123124

124125
[tool.setuptools.packages.find]
125126
where = ["src"]

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,17 @@ def write_github_summary(
5555
f.write("```\n")
5656

5757

58+
def find_project_root() -> Path:
59+
"""Locate the root directory of this project."""
60+
# Search upwards from file location
61+
script_dir = Path(__file__).resolve().parent
62+
for parent in [script_dir, *script_dir.parents]:
63+
if (parent / "EIP_AUTHORS_MANUAL.md").exists():
64+
return parent
65+
66+
raise FileNotFoundError("Unable to locate project root directory!")
67+
68+
5869
@click.command(
5970
context_settings={
6071
"ignore_unknown_options": True,
@@ -215,7 +226,8 @@ def validate_changelog() -> None:
215226
- A period (.) for regular entries
216227
- A colon (:) for section headers that introduce lists
217228
"""
218-
changelog_path = Path("docs/CHANGELOG.md")
229+
project_root = find_project_root()
230+
changelog_path = Path(project_root / "docs/CHANGELOG.md")
219231

220232
if not changelog_path.exists():
221233
click.echo(f"❌ Changelog file not found: {changelog_path}")

tox.ini

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,15 @@ commands =
113113

114114
[testenv:changelog]
115115
description = Validate EEST changelog entries
116-
extras = docs
117-
package = editable
118-
commands = python -c "import packages.testing.src.execution_testing.cli.tox_helpers; packages.testing.src.execution_testing.cli.tox_helpers.validate_changelog()"
116+
dependency_groups = docs
117+
changedir = {toxinidir}/packages/testing
118+
allowlist_externals = uv
119+
commands_pre = uv pip install -e {toxinidir}/packages/testing
120+
commands = validate_changelog
119121

120122
[testenv:mkdocs]
121123
description = Build EEST documentation with mkdocs
122-
extras = docs,lint,test
124+
dependency_groups = docs,lint
123125
setenv =
124126
GEN_TEST_DOC_VERSION = "tox"
125127
# Required for `cairosvg` so tox can find `libcairo-2`?
@@ -132,15 +134,14 @@ commands =
132134

133135
[testenv:markdownlint]
134136
description = Lint EEST markdown files (markdownlint)
135-
extras = docs
137+
dependency_groups = docs
136138
package = editable
137139
commands = python -c "import packages.testing.src.execution_testing.cli.tox_helpers; packages.testing.src.execution_testing.cli.tox_helpers.markdownlint()"
138140

139141
[testenv:check-docs]
140142
description = Runs all documentation checks (spellcheck, markdownlint, mkdocs)
141-
extras =
142-
{[testenv:test-docs]extras}
143-
doc
143+
dependency_groups =
144+
{[testenv:test-docs]dependency_groups}
144145
package = editable
145146
setenv =
146147
{[testenv:test-docs]setenv}

0 commit comments

Comments
 (0)