feat(consume): add --extract-to parameter for direct fixture extraction#1861
Conversation
danceratopz
left a comment
There was a problem hiding this comment.
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 --input=zkevm@v0.1.0 --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
FixtureDownloaderbelow, and, - The over-complicated logic in
pytest_configure()-FixturesSourceexists to not have so much of this boilerplate present inpytest_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.
danceratopz
left a comment
There was a problem hiding this comment.
Oops, approved in previous review by mistake. Have to do submit another review to prevent it getting merged.
--extract-to parameter for direct fixture extraction
bee9a79 to
b16f567
Compare
danceratopz
left a comment
There was a problem hiding this comment.
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 --input=zkevm@v0.1.0 --extract-to=./zkevm-fixtures
b16f567 to
e3ce42d
Compare
|
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 👍 |
Dan's comments have fully been addressed and he is currently OOO.
🗒️ 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:
🔗 Related Issues or PRs
Fixes #1835
✅ Checklist
toxchecks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:uvx --with=tox-uv tox -e lint,typecheck,spellcheck,markdownlinttype(scope):.