From 2d361623337f300d36b067f99c418873cec7b4fa Mon Sep 17 00:00:00 2001 From: raxhvl <10168946+raxhvl@users.noreply.github.com> Date: Wed, 4 Dec 2024 14:31:03 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor(cli):=20rename=20?= =?UTF-8?q?`et`=20to=20`eest`=20(#993)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: rahul Co-authored-by: danceratopz --- docs/CHANGELOG.md | 4 ++-- docs/library/cli/eest.md | 7 +++++++ docs/library/cli/et.md | 7 ------- docs/library/cli/index.md | 2 +- .../{et_make_test.mp4 => eest_make_test.mp4} | Bin docs/writing_tests/index.md | 4 ++-- pyproject.toml | 2 +- src/cli/eest/__init__.py | 3 +++ src/cli/{et => eest}/cli.py | 16 ++++++++-------- src/cli/eest/commands/__init__.py | 9 +++++++++ src/cli/{et => eest}/commands/clean.py | 2 +- src/cli/{et => eest}/make/__init__.py | 0 src/cli/{et => eest}/make/cli.py | 0 src/cli/{et => eest}/make/commands/__init__.py | 0 src/cli/{et => eest}/make/commands/test.py | 6 +++--- .../make/templates/blockchain_test.py.j2 | 0 .../make/templates/state_test.py.j2 | 0 src/cli/{et => eest}/quotes.py | 0 src/cli/et/__init__.py | 3 --- src/cli/et/commands/__init__.py | 9 --------- whitelist.txt | 2 +- 21 files changed, 38 insertions(+), 38 deletions(-) create mode 100644 docs/library/cli/eest.md delete mode 100644 docs/library/cli/et.md rename docs/writing_tests/img/{et_make_test.mp4 => eest_make_test.mp4} (100%) create mode 100644 src/cli/eest/__init__.py rename src/cli/{et => eest}/cli.py (64%) create mode 100644 src/cli/eest/commands/__init__.py rename src/cli/{et => eest}/commands/clean.py (98%) rename src/cli/{et => eest}/make/__init__.py (100%) rename src/cli/{et => eest}/make/cli.py (100%) rename src/cli/{et => eest}/make/commands/__init__.py (100%) rename src/cli/{et => eest}/make/commands/test.py (95%) rename src/cli/{et => eest}/make/templates/blockchain_test.py.j2 (100%) rename src/cli/{et => eest}/make/templates/state_test.py.j2 (100%) rename src/cli/{et => eest}/quotes.py (100%) delete mode 100644 src/cli/et/__init__.py delete mode 100644 src/cli/et/commands/__init__.py diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index cfc3ccfa1a..2b88c0b350 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -55,8 +55,8 @@ Test fixtures for use by clients are available for each release on the [Github r - 🔀 `ethereum_test_forks` forks now contain gas-calculating functions, which return the appropriate function to calculate the gas used by a transaction or memory function for the given fork ([#779](https://github.com/ethereum/execution-spec-tests/pull/779)). - 🐞 Fix `Bytecode` class `__eq__` method ([#939](https://github.com/ethereum/execution-spec-tests/pull/939)). - 🔀 Update `pydantic` from 2.8.2 to 2.9.2 ([#960](https://github.com/ethereum/execution-spec-tests/pull/960)). -- ✨ Add the `et make test` command, an interactive CLI that helps users create a new test module and function ([#950](https://github.com/ethereum/execution-spec-tests/pull/950)). -- ✨ Add the `et clean` command that helps delete generated files and directories from the repository ([#980](https://github.com/ethereum/execution-spec-tests/pull/980)). +- ✨ Add the `eest make test` command, an interactive CLI that helps users create a new test module and function ([#950](https://github.com/ethereum/execution-spec-tests/pull/950)). +- ✨ Add the `eest clean` command that helps delete generated files and directories from the repository ([#980](https://github.com/ethereum/execution-spec-tests/pull/980)). ### 🔧 EVM Tools diff --git a/docs/library/cli/eest.md b/docs/library/cli/eest.md new file mode 100644 index 0000000000..1b6a73591a --- /dev/null +++ b/docs/library/cli/eest.md @@ -0,0 +1,7 @@ +# The `eest` CLI + +::: mkdocs-click + :module: cli.eest.cli + :command: eest + :depth: 1 + :list_subcommands: true diff --git a/docs/library/cli/et.md b/docs/library/cli/et.md deleted file mode 100644 index 3f6fbfaa4c..0000000000 --- a/docs/library/cli/et.md +++ /dev/null @@ -1,7 +0,0 @@ -# The `et` 👽 CLI - -::: mkdocs-click - :module: cli.et.cli - :command: et - :depth: 1 - :list_subcommands: true diff --git a/docs/library/cli/index.md b/docs/library/cli/index.md index 785feeab80..ff32ddcf58 100644 --- a/docs/library/cli/index.md +++ b/docs/library/cli/index.md @@ -1,5 +1,5 @@ # EEST CLI Tools -- [`et`](et.md) - A CLI tool that helps with routine tasks in ethereum/execution-spec-tests. +- [`eest`](eest.md) - A CLI tool that helps with routine tasks in ethereum/execution-spec-tests. - [`evm_bytes`](evm_bytes.md) - Convert the given EVM bytes from a binary file or a hex string to EEST's python opcodes. - [`env_init`](env_init.md) - Generate an example `env.yaml` [environment](../../dev/configurations.md) config file if it doesn't exist. diff --git a/docs/writing_tests/img/et_make_test.mp4 b/docs/writing_tests/img/eest_make_test.mp4 similarity index 100% rename from docs/writing_tests/img/et_make_test.mp4 rename to docs/writing_tests/img/eest_make_test.mp4 diff --git a/docs/writing_tests/index.md b/docs/writing_tests/index.md index c1baca204a..d02905200f 100644 --- a/docs/writing_tests/index.md +++ b/docs/writing_tests/index.md @@ -3,14 +3,14 @@ The easiest way to get started is to use the interactive CLI: ```console -uv run et make test +uv run eest make test ``` and modify the generated test module to suit your needs.
diff --git a/pyproject.toml b/pyproject.toml index dfb8c67f09..47ae95b764 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -108,7 +108,7 @@ order_fixtures = "cli.order_fixtures:order_fixtures" evm_bytes = "cli.evm_bytes:evm_bytes" hasher = "cli.hasher:main" env_init = "config.env:create_default_config" -et = "cli.et.cli:et" +eest = "cli.eest.cli:eest" [tool.setuptools.packages.find] where = ["src"] diff --git a/src/cli/eest/__init__.py b/src/cli/eest/__init__.py new file mode 100644 index 0000000000..2b56ab4ec2 --- /dev/null +++ b/src/cli/eest/__init__.py @@ -0,0 +1,3 @@ +""" +This module is the entry point for the `eest` command line interface. +""" diff --git a/src/cli/et/cli.py b/src/cli/eest/cli.py similarity index 64% rename from src/cli/et/cli.py rename to src/cli/eest/cli.py index c3dec6faca..4d1c572732 100644 --- a/src/cli/et/cli.py +++ b/src/cli/eest/cli.py @@ -1,18 +1,18 @@ """ -`et` 👽 is a CLI tool that helps with routine tasks. -Invoke using `uv run et`. +`eest` is a CLI tool that helps with routine tasks. +Invoke using `uv run eest`. """ import click -from cli.et.commands import clean -from cli.et.make.cli import make +from cli.eest.commands import clean +from cli.eest.make.cli import make @click.group(context_settings=dict(help_option_names=["-h", "--help"], max_content_width=120)) -def et(): +def eest(): """ - `et` 👽 is a CLI tool that helps with routine tasks. + `eest` is a CLI tool that helps with routine tasks. """ pass @@ -27,5 +27,5 @@ def et(): Register nested commands here. For more information, see Click documentation: https://click.palletsprojects.com/en/8.0.x/commands/#nested-handling-and-contexts """ -et.add_command(make) -et.add_command(clean) +eest.add_command(make) +eest.add_command(clean) diff --git a/src/cli/eest/commands/__init__.py b/src/cli/eest/commands/__init__.py new file mode 100644 index 0000000000..d50b9c2a16 --- /dev/null +++ b/src/cli/eest/commands/__init__.py @@ -0,0 +1,9 @@ +""" +A collection of commands supported by `eest` CLI. + +Run `uv run eest` for complete list. +""" + +from .clean import clean + +__all__ = ["clean"] diff --git a/src/cli/et/commands/clean.py b/src/cli/eest/commands/clean.py similarity index 98% rename from src/cli/et/commands/clean.py rename to src/cli/eest/commands/clean.py index a7b5b059f9..16b216bb7f 100644 --- a/src/cli/et/commands/clean.py +++ b/src/cli/eest/commands/clean.py @@ -32,7 +32,7 @@ def clean(all: bool, dry_run: bool, verbose: bool): Example: Cleaning all generated files and directories and show the deleted items. - uv run et clean --all -v + uv run eest clean --all -v Output: diff --git a/src/cli/et/make/__init__.py b/src/cli/eest/make/__init__.py similarity index 100% rename from src/cli/et/make/__init__.py rename to src/cli/eest/make/__init__.py diff --git a/src/cli/et/make/cli.py b/src/cli/eest/make/cli.py similarity index 100% rename from src/cli/et/make/cli.py rename to src/cli/eest/make/cli.py diff --git a/src/cli/et/make/commands/__init__.py b/src/cli/eest/make/commands/__init__.py similarity index 100% rename from src/cli/et/make/commands/__init__.py rename to src/cli/eest/make/commands/__init__.py diff --git a/src/cli/et/make/commands/test.py b/src/cli/eest/make/commands/test.py similarity index 95% rename from src/cli/et/make/commands/test.py rename to src/cli/eest/make/commands/test.py index eeffe9ce4a..93ef0efa08 100644 --- a/src/cli/et/make/commands/test.py +++ b/src/cli/eest/make/commands/test.py @@ -17,7 +17,7 @@ from config.docs import DocsConfig from ethereum_test_forks import get_development_forks, get_forks -template_loader = jinja2.PackageLoader("cli.et.make") +template_loader = jinja2.PackageLoader("cli.eest.make") template_env = jinja2.Environment( loader=template_loader, keep_trailing_newline=True, trim_blocks=True, lstrip_blocks=True ) @@ -48,13 +48,13 @@ def test(): Example: - uv run et make test + uv run eest make test \f
diff --git a/src/cli/et/make/templates/blockchain_test.py.j2 b/src/cli/eest/make/templates/blockchain_test.py.j2 similarity index 100% rename from src/cli/et/make/templates/blockchain_test.py.j2 rename to src/cli/eest/make/templates/blockchain_test.py.j2 diff --git a/src/cli/et/make/templates/state_test.py.j2 b/src/cli/eest/make/templates/state_test.py.j2 similarity index 100% rename from src/cli/et/make/templates/state_test.py.j2 rename to src/cli/eest/make/templates/state_test.py.j2 diff --git a/src/cli/et/quotes.py b/src/cli/eest/quotes.py similarity index 100% rename from src/cli/et/quotes.py rename to src/cli/eest/quotes.py diff --git a/src/cli/et/__init__.py b/src/cli/et/__init__.py deleted file mode 100644 index 3a70ec0339..0000000000 --- a/src/cli/et/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -""" -This module is the entry point for the `et` command line interface. -""" diff --git a/src/cli/et/commands/__init__.py b/src/cli/et/commands/__init__.py deleted file mode 100644 index 0e06f86ba0..0000000000 --- a/src/cli/et/commands/__init__.py +++ /dev/null @@ -1,9 +0,0 @@ -""" -A collection of commands supported by `et` CLI. - -Run `uv run et` for complete list. -""" - -from .clean import clean - -__all__ = ["clean"] diff --git a/whitelist.txt b/whitelist.txt index 824ae119ec..44fe688678 100644 --- a/whitelist.txt +++ b/whitelist.txt @@ -144,9 +144,9 @@ EOFException eofparse epilog esbenp +eest EEST EEST's -et eth ethash ethereum