-
Notifications
You must be signed in to change notification settings - Fork 158
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
feat(consume): add --extract-to
parameter for direct fixture extraction
#1861
Conversation
There was a problem hiding this 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 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.
There was a problem hiding this 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.
--extract-to
parameter for direct fixture extraction
bee9a79
to
b16f567
Compare
There was a problem hiding this 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
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 👍 |
There was a problem hiding this 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!
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
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
type(scope):
.