Skip to content

Conversation

@richardgreg
Copy link
Contributor

🗒️ Description

Convert absolute imports to relative imports within the same package

Changes affect:

  • CLI components (eest, eofwrap)
  • Test files across all packages
  • Pytest plugin components (consume, execute, filler)
  • Framework utility modules

🔗 Related Issues or PRs

N/A.

Related to #1844 #1848

✅ 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.
  • All: Set appropriate labels for the changes (only maintainers can apply labels).
  • Tests: Ran mkdocs serve locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.
  • Tests: For PRs implementing a missed test case, update the post-mortem document to add an entry the list.
  • Ported Tests: All converted JSON/YML tests from ethereum/tests or tests/static have been assigned @ported_from marker.

@richardgreg richardgreg force-pushed the feat/relative-imports branch 2 times, most recently from 6a3b560 to 6467c0f Compare July 15, 2025 09:57
@richardgreg richardgreg marked this pull request as ready for review July 15, 2025 10:35
Copy link
Collaborator

@kclowes kclowes left a comment

Choose a reason for hiding this comment

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

@richardgreg thank you for the PR! I left two comments around catching the ImportError. I'd prefer to leave those as absolute imports, but let me know what you think. I'm open to changing my mind :)

@marioevz I think this looks good overall. Can you confirm that these files will always be run via pytest and not as a script (for example: python src/cli/eest/make/cli.py). Pytest will resolve the relative imports efficiently, but if it's run as a script, the relative imports will not be found. I did a quick audit and didn't see anywhere we'd directly run these files, but don't feel familiar enough with the codebase yet to be sure. Thanks!

@richardgreg richardgreg force-pushed the feat/relative-imports branch 2 times, most recently from 45130ef to 8e65586 Compare July 17, 2025 09:05
@richardgreg richardgreg requested a review from kclowes July 17, 2025 18:16
@kclowes
Copy link
Collaborator

kclowes commented Jul 17, 2025

@marioevz I ran the consume engine command on the hive server using the steps you outlined and everything looks like it resolved on that front. I also ran consume rlp and did a fresh fill locally, and didn't encounter any ImportErrors. Let me know if there is anything else I should take a look at!

Convert absolute imports to relative imports within the same package

Changes affect:

* CLI components (eest, eofwrap)
* Test files across all packages
* Pytest plugin components (consume, execute, filler)
* Framework utility modules
@richardgreg richardgreg force-pushed the feat/relative-imports branch from 8e65586 to df0888e Compare July 18, 2025 10:45
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.

Thanks!

@marioevz marioevz merged commit d906a14 into ethereum:main Jul 18, 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.

3 participants