Skip to content
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(et): add eest clean to remove all generated folders and files #976

Closed
danceratopz opened this issue Nov 27, 2024 · 0 comments · Fixed by #980
Closed

✨ feat(et): add eest clean to remove all generated folders and files #976

danceratopz opened this issue Nov 27, 2024 · 0 comments · Fixed by #980
Labels
scope:eest Scope: Changes to eest CLI command type:feat type: Feature

Comments

@danceratopz
Copy link
Member

Originally suggested in #461.

This would delete any cache files, build artifacts and potentially uv's .venv and tox's .tox:

def clean(remove_venv: bool = False):
"""
Cleans the repository of all generated files and directories:
```
rm -rf .tox .cache .pytest_cache .mypy_cache fixtures build venv
```
By default, the virtual environment is not removed.
"""
items_to_remove = [".tox", ".pytest_cache", ".mypy_cache", "fixtures", "build", "site", "venv"]
for item in items_to_remove:
if os.path.exists(item):
if item == "venv" and not remove_venv:
continue
shutil.rmtree(item, ignore_errors=True)
logger.warning(f"Deleted `{item}`")

Other possible additions could be:

  • ~/.cache/ethereum-spec-evm-resolver/ which stores the download execution-specs branches for each configured fork.
  • ~/.cache/uv/ although I'd hope that this is not necessary.
@danceratopz danceratopz added type:feat type: Feature scope:eest Scope: Changes to eest CLI command labels Nov 27, 2024
@raxhvl raxhvl mentioned this issue Nov 29, 2024
5 tasks
@danceratopz danceratopz changed the title ✨ feat(et): add et clean to remove all generated folders and files ✨ feat(et): add eest clean to remove all generated folders and files Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope:eest Scope: Changes to eest CLI command type:feat type: Feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant