Skip to content

feat(clis,pytest-plugins): allow pytest commands from package, addexecute eth-config command#1863

Merged
marioevz merged 24 commits into
mainfrom
execute-eth-config
Jul 11, 2025
Merged

feat(clis,pytest-plugins): allow pytest commands from package, addexecute eth-config command#1863
marioevz merged 24 commits into
mainfrom
execute-eth-config

Conversation

@marioevz

@marioevz marioevz commented Jul 6, 2025

Copy link
Copy Markdown
Member

🗒️ Description

Allow all pytest-plugin based commands to run outside of the repo

Allows all commands to run without having to clone the full repository. This was done by adding the pytest-*.ini config files to the pyproject.toml and also changing the working directory, root directory, and adding a new "working-directory" plugin to fix the working directory after pytest has been loaded, before the command runs.

execute eth-config

Add execute eth-config command to test a running eth RPC client for the correct configuration given the specified network.

pytest.ini -> pytest-fill.ini

The default pytest configuration file for fill has been renamed and moved to the appropriate folder, to include in the project build.

🔗 Related Issues or PRs

Closes #1885

✅ 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).

@danceratopz danceratopz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Great idea to put this in execute!

Love the integration with src/ethereum_test_forks/forks/forks.py.

Can we add a way to test this via hive? Does this need another sub-command,
execute hive-eth-config? This would allow us to verify before clients hit the devnet and help minimize disruption.

Comment thread src/pytest_plugins/execute/eth_config/networks.py Outdated
Comment thread src/pytest_plugins/execute/eth_config/test_test_eth_config.py Outdated
Comment thread src/pytest_plugins/execute/eth_config/eth_config.py Outdated
Comment thread src/pytest_plugins/execute/eth_config/eth_config.py
Comment thread src/ethereum_test_rpc/test_types.py
Comment thread src/pytest_plugins/execute/eth_config/types.py Outdated
Comment thread src/pytest_plugins/execute/eth_config/types.py Outdated
@marioevz marioevz force-pushed the execute-eth-config branch from 9121084 to 080089e Compare July 7, 2025 21:25
@marioevz

marioevz commented Jul 7, 2025

Copy link
Copy Markdown
Member Author

@danceratopz addressed all your comments and implemented this PR: ethereum/EIPs#9989

Let me know what you think and thanks for the first review :)

@danceratopz danceratopz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@danceratopz addressed all your comments and implemented this PR: ethereum/EIPs#9989

Nice idea on the fork hash!

The labels are🤌

LGTM, but the question still stands from the first review:

Can we add a way to test this via hive? Does this need another sub-command,
execute hive-eth-config? This would allow us to verify before clients hit the devnet and help minimize disruption.

Comment thread pytest-execute-eth-config.ini Outdated
Comment thread pytest-framework.ini Outdated
@danceratopz

Copy link
Copy Markdown
Member

LGTM, but the question still stands from the first review:

Can we add a way to test this via hive? Does this need another sub-command,
execute hive-eth-config? This would allow us to verify before clients hit the devnet and help minimize disruption.

Thanks for explaining offline :) This doesn't make much sense to test in a staging environment like hive as we need to test the client with the network's genesis. In the EEST meeting today, we decided we can think of this as more of a health check that should be ran regularly on networks to ensure the clients running there meet the fork, and perhaps more relevantly, the next fork's spec.

@danceratopz danceratopz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@marioevz could you please add something to the docs for this new sub-command under:

  • docs/running_tests/running.md
  • docs/running_tests/execute/

Tnx!

@marioevz marioevz changed the title feat(execute): execute eth-config command feat(execute): execute eth-config command, enable commands running from package Jul 9, 2025
@marioevz marioevz force-pushed the execute-eth-config branch from 708d816 to c633d57 Compare July 9, 2025 23:12

@danceratopz danceratopz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Amazing! I was contemplating this yesterday as well, was perfect prep for this review 😄

I also found --rootdir but hadn't put it all together - you've added a really nice solution!

I was wondering about putting the ini files next to the "entry" pytest plugin for the command, but they're clearly better in one place. Easier to diff; no searching required.

Comment thread pyproject.toml
Comment thread pyproject.toml Outdated
Comment thread pytest-framework.ini Outdated
Comment thread src/cli/pytest_commands/base.py
Comment thread src/cli/pytest_commands/consume.py Outdated
Comment thread src/cli/pytest_commands/base.py Outdated
@marioevz marioevz force-pushed the execute-eth-config branch from c633d57 to 9e13891 Compare July 10, 2025 19:19
@marioevz marioevz changed the title feat(execute): execute eth-config command, enable commands running from package feat(clis,pytest-plugins): allow pytest commands from package, addexecute eth-config command Jul 10, 2025
@marioevz marioevz added type:feat type: Feature scope:tooling Scope: Python tools (uv, ruff, tox,...) P-medium labels Jul 10, 2025
@danceratopz danceratopz added the scope:execute Scope: Changes to the execute command label Jul 11, 2025

@danceratopz danceratopz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hey @marioevz, thanks for adding docs and fill too! LGTM! I didn't get to test the final product as I wanted due to lack of time, but don't want to block a merge here!

@marioevz marioevz force-pushed the execute-eth-config branch from 7d6309e to cb72139 Compare July 11, 2025 15:43
@marioevz marioevz merged commit 646ce03 into main Jul 11, 2025
13 checks passed
@marioevz marioevz deleted the execute-eth-config branch July 11, 2025 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P-medium scope:execute Scope: Changes to the execute command scope:tooling Scope: Python tools (uv, ruff, tox,...) type:feat type: Feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore(pytest,packaging): reorganize pytest ini files

2 participants