Skip to content

feat(consume): add --extract-to parameter for direct fixture extraction #1861

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

richardgreg
Copy link
Contributor

🗒️ Description

Add new --extract-to flag to consume cache command that extracts fixtures directly to a specified directory, bypassing the normal cache structure. This replaces the need for separate download scripts like 'download-and-extract-fixtures.sh' by integrating the functionality into the existing consume tooling.

Usage:

uvx --from git+https://github.com/ethereum/execution-spec-tests \
    consume cache [email protected] --extract-to=./zkevm-fixtures

🔗 Related Issues or PRs

Fixes #1835

✅ Checklist

  • All: Ran fast tox checks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:
    uvx --with=tox-uv tox -e lint,typecheck,spellcheck,markdownlint
  • All: PR title adheres to the repo standard - it will be used as the squash commit message and should start type(scope):.
  • All: Considered adding an entry to CHANGELOG.md.
  • All: Considered updating the online docs in the ./docs/ directory.

@danceratopz danceratopz self-requested a review July 7, 2025 18:40
Copy link
Member

@danceratopz danceratopz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Thanks a lot for this.

I tried it directly from your branch and it just worked:

uvx --from git+https://github.com/richardgreg/execution-spec-tests@feat/extract-to-flag-for-consume \
          consume cache [email protected] --extract-to=./zkevm-fixtures
    Updated https://github.com/richardgreg/execution-spec-tests (bee9a798163e6f97aa2350c81a2214247790c1af)
    Updated https://github.com/spencer-tb/ethereum-spec-evm-resolver (ee273e7344e24a739ebfbf0ea1f758530c4d032b)
      Built ethereum-execution-spec-tests @ git+https://github.com/richardgreg/execution-spec-tests@bee9a798163e6f97aa2350c81a2214247790c1af
Installed 70 packages in 7ms
Exit: Fixtures downloaded and extracted to specified directory.
Path: zkevm-fixtures/fixtures
Input: https://github.com/ethereum/execution-spec-tests/releases/download/zkevm%40v0.1.0/fixtures_zkevm.tar.gz
Release page: https://github.com/ethereum/execution-spec-tests/releases/tag/zkevm%40v0.1.0

However, I think we can simplify the logic here and achieve the same goal:

  • See the "major quibble" 😆 in the FixtureDownloader below, and,
  • The over-complicated logic in pytest_configure() - FixturesSource exists to not have so much of this boilerplate present in pytest_configure().

Perhaps you can give add this feedback to Claude's context and he can refactor it for you. Make a backup of your branch before you start just in case. You can also make a separate PR if that's easier (if so move this PR to "Draft") and then we can merge the other one if it's cleaner.

Thanks for work @richardgreg.

Copy link
Member

@danceratopz danceratopz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, approved in previous review by mistake. Have to do submit another review to prevent it getting merged.

@danceratopz danceratopz changed the title feat(consume): add --extract-to parameter for direct fixture extraction feat(consume): add --extract-to parameter for direct fixture extraction Jul 11, 2025
@richardgreg richardgreg force-pushed the feat/extract-to-flag-for-consume branch from bee9a79 to b16f567 Compare July 13, 2025 16:38
@richardgreg richardgreg requested a review from danceratopz July 13, 2025 17:12
Copy link
Member

@danceratopz danceratopz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing all of the comments. The code looks much better!

I tested most consume command variations and this is working well/not broken anything, but as I'm afk for a while and consume in main needs a bit of consolidation, I'll hold off merging this for now.

Anyone else is happy to merge in the meantime, of course.

Add new --extract-to flag to consume cache command that extracts fixtures
directly to a specified directory, bypassing the normal cache structure.
This replaces the need for separate download scripts like
'download-and-extract-fixtures.sh' by integrating the functionality into
the existing consume tooling.

Usage:
uvx --from git+https://github.com/ethereum/execution-spec-tests \
    consume cache [email protected] --extract-to=./zkevm-fixtures
@richardgreg richardgreg force-pushed the feat/extract-to-flag-for-consume branch from b16f567 to e3ce42d Compare July 18, 2025 11:23
@richardgreg richardgreg requested a review from danceratopz July 21, 2025 09:42
@marioevz
Copy link
Member

Hi @richardgreg, Dan is OOO this week but I'm reviewing now, so far looks good to me but I'd like to take a careful look at the changes, then I'll approve and merge 👍

Copy link
Member

@marioevz marioevz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice addition, thanks!

@marioevz marioevz dismissed danceratopz’s stale review July 25, 2025 17:20

Dan's comments have fully been addressed and he is currently OOO.

@marioevz marioevz merged commit ebfd451 into ethereum:main Jul 25, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(consume): add a --extract-to flag to consume cache
3 participants