diff --git a/README.md b/README.md index b1714c3..db94a53 100644 --- a/README.md +++ b/README.md @@ -74,13 +74,13 @@ Notes: (cupid-analysis) $ python -m ipykernel install --user --name=cupid-analysis ``` -Furthermore, to clear the `computed_notebooks` folder which was generated by the `cupid-diagnostics` and `cupid-webpage` commands, you can run the following command: +Furthermore, to clean the `computed_notebooks` folder which was generated by the `cupid-diagnostics` and `cupid-webpage` commands, you can run the following command: ``` bash -$ cupid-clear +$ cupid-clean ``` -This will clear the `computed_notebooks` folder which is at the location pointed to by the `run_dir` variable in the `config.yml` file. +This will clean the `computed_notebooks` folder which is at the location pointed to by the `run_dir` variable in the `config.yml` file. ### CUPiD Options diff --git a/cupid/clear.py b/cupid/clean.py similarity index 85% rename from cupid/clear.py rename to cupid/clean.py index d46c236..036ba44 100755 --- a/cupid/clear.py +++ b/cupid/clean.py @@ -1,9 +1,9 @@ #!/usr/bin/env python """ -This script provides functionality to clear the contents of the "computed_notebooks" folder +This script provides functionality to clean the contents of the "computed_notebooks" folder at the location specified by the "run_dir" variable in the CONFIG_PATH. -The main function `clear()` takes the path to the configuration file as input, reads the config file +The main function `clean()` takes the path to the configuration file as input, reads the config file to obtain the "run_dir" variable, and then deletes the contents of the "computed_notebooks" folder at that location. @@ -45,8 +45,8 @@ def read_config_file(config_path): @click.command() @click.argument("config_path", default="config.yml") # Entry point to this script -def clear(config_path): - """Clears the contents of the "computed_notebooks" folder at the location +def clean(config_path): + """Cleans the contents of the "computed_notebooks" folder at the location specified by the "run_dir" variable in the CONFIG_PATH. Args: CONFIG_PATH - The path to the configuration file. @@ -56,8 +56,8 @@ def clear(config_path): run_dir = read_config_file(config_path) # Delete the "computed_notebooks" folder and all the contents inside of it shutil.rmtree(run_dir) - logger.info(f"All contents in {run_dir} have been cleared.") + logger.info(f"All contents in {run_dir} have been cleaned.") if __name__ == "__main__": - clear() + clean() diff --git a/pyproject.toml b/pyproject.toml index 82112af..581c463 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,4 +47,4 @@ documentation = "https://nbscuid.readthedocs.io" cupid-timeseries = "cupid.run_timeseries:run_timeseries" cupid-diagnostics = "cupid.run_diagnostics:run_diagnostics" cupid-webpage = "cupid.cupid_webpage:build" -cupid-clear = "cupid.clear:clear" +cupid-clean = "cupid.clean:clean"