Skip to content

Commit

Permalink
♻️ refactor(cli): rename et to eest (#993)
Browse files Browse the repository at this point in the history
Co-authored-by: rahul <[email protected]>
Co-authored-by: danceratopz <[email protected]>
  • Loading branch information
3 people authored Dec 4, 2024
1 parent 3aa830a commit 2d36162
Show file tree
Hide file tree
Showing 21 changed files with 38 additions and 38 deletions.
4 changes: 2 additions & 2 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 7 additions & 0 deletions docs/library/cli/eest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# The `eest` CLI

::: mkdocs-click
:module: cli.eest.cli
:command: eest
:depth: 1
:list_subcommands: true
7 changes: 0 additions & 7 deletions docs/library/cli/et.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/library/cli/index.md
Original file line number Diff line number Diff line change
@@ -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.
File renamed without changes.
4 changes: 2 additions & 2 deletions docs/writing_tests/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<figure class="video_container">
<video controls="true" allowfullscreen="true">
<source src="./img/et_make_test.mp4" type="video/mp4">
<source src="./img/eest_make_test.mp4" type="video/mp4">
</video>
</figure>

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
3 changes: 3 additions & 0 deletions src/cli/eest/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""
This module is the entry point for the `eest` command line interface.
"""
16 changes: 8 additions & 8 deletions src/cli/et/cli.py → src/cli/eest/cli.py
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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)
9 changes: 9 additions & 0 deletions src/cli/eest/commands/__init__.py
Original file line number Diff line number Diff line change
@@ -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"]
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down Expand Up @@ -48,13 +48,13 @@ def test():
Example:
uv run et make test
uv run eest make test
\f
<figure class="video_container">
<video controls="true" allowfullscreen="true">
<source
src="/execution-spec-tests/writing_tests/img/et_make_test.mp4"
src="/execution-spec-tests/writing_tests/img/eest_make_test.mp4"
type="video/mp4"
/>
</video>
Expand Down
File renamed without changes.
File renamed without changes.
3 changes: 0 additions & 3 deletions src/cli/et/__init__.py

This file was deleted.

9 changes: 0 additions & 9 deletions src/cli/et/commands/__init__.py

This file was deleted.

2 changes: 1 addition & 1 deletion whitelist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ EOFException
eofparse
epilog
esbenp
eest
EEST
EEST's
et
eth
ethash
ethereum
Expand Down

0 comments on commit 2d36162

Please sign in to comment.