Repository: showyourwork/showyourwork

Issue:
Deep clean does not remove everything
The CLI help of the `clean` subcommand says,

```
-d, --deep             Forcefully remove the `.snakemake` and
                         `~/.showyourwork` directories.
```

but I have always seen only the `.snakemake` be removed, while the `.showyourwork` remains there (also it is not placed in the home as the help shows, but in the project's directory as one would expect).

Discussion:

Patch:
diff --git a/src/showyourwork/cli/commands/clean.py b/src/showyourwork/cli/commands/clean.py
index 1427bfa..48d3bba 100644
--- a/src/showyourwork/cli/commands/clean.py
+++ b/src/showyourwork/cli/commands/clean.py
@@ -47,3 +47,5 @@ def clean(force, deep, snakemake_args=(), cores=1, conda_frontend="conda"):
     if deep:
         if (paths.user().repo / ".snakemake").exists():
             shutil.rmtree(paths.user().repo / ".snakemake")
+        if (paths.user().repo / ".showyourwork").exists():
+            shutil.rmtree(paths.user().repo / ".showyourwork")


Test patch:
diff --git a/tests/integration/test_clean.py b/tests/integration/test_clean.py
index 919be9f..df90478 100644
--- a/tests/integration/test_clean.py
+++ b/tests/integration/test_clean.py
@@ -66,3 +66,17 @@ class TestCleanForce(TemporaryShowyourworkRepository):
 
         # Check that the new directory was removed
         assert not (self.cwd / "src" / "data" / "newdir").exists()
+
+
+class TestCleanDeep(TemporaryShowyourworkRepository):
+    """Test that when calling clean with the -d option a subdirectory is removed."""
+
+    local_build_only = True
+
+    def check_build(self):
+        # Run the clean command with the -f option
+        get_stdout("showyourwork clean -d", shell=True, cwd=self.cwd)
+
+        # Check that the new directory was removed
+        assert not (self.cwd / ".snakemake").exists()
+        assert not (self.cwd / ".showyourwork").exists()