Repository: fractal-analytics-platform/fractal-client (language: python)

Issue:
Add `--verbose` to `task check-collection`



Discussion / hints:

Fix patch:
diff --git a/fractal/client/cmd/_task.py b/fractal/client/cmd/_task.py
index 8f88d52f3..ee4975998 100644
--- a/fractal/client/cmd/_task.py
+++ b/fractal/client/cmd/_task.py
@@ -105,10 +105,11 @@ async def task_collect_pip(
 
 
 async def task_collection_check(
-    client: AuthClient, *, installation_path: Path, **kwargs
+    client: AuthClient, *, installation_path: Path, verbose: bool, **kwargs
 ) -> BaseInterface:
     res = await client.get(
         f"{settings.BASE_URL}/task/collect/{installation_path}"
+        f"?verbose={verbose}"
     )
     if res.status_code == 200:
         return RichJsonInterface(retcode=0, data=res.json())
diff --git a/fractal/client/parser.py b/fractal/client/parser.py
index 131b7e9c8..f15bca1ee 100644
--- a/fractal/client/parser.py
+++ b/fractal/client/parser.py
@@ -249,6 +249,13 @@
     "installation_path",
     help="Check collection status of tasks installed at this path",
 )
+task_check_collection_parser.add_argument(
+    "--verbose",
+    default=False,
+    action="store_true",
+    help="Output more verbose output",
+)
+
 
 # task edit
 task_edit_parser = task_subparsers.add_parser(


Test patch:
diff --git a/tests/test_task.py b/tests/test_task.py
index d5c0e3d21..d55eff343 100644
--- a/tests/test_task.py
+++ b/tests/test_task.py
@@ -40,7 +40,7 @@ async def test_task_collection_and_list(
         if expected_status == "OK":
             break
 
-    res2 = await invoke(f"task check-collection {venv_path}")
+    res2 = await invoke(f"task check-collection {venv_path} --verbose")
     debug(res2)
     res2.show()
     assert res2.data["status"] == "OK"