From 2f05f0aef74ca566a1a34259a241f18fb346ff29 Mon Sep 17 00:00:00 2001 From: Amir Mohammadi Date: Tue, 17 Mar 2026 16:17:42 +0100 Subject: [PATCH 1/2] docs: recommend uv for installation in README Co-Authored-By: Claude Opus 4.6 (1M context) --- README.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f5ed8c3..61664f7 100644 --- a/README.md +++ b/README.md @@ -26,16 +26,29 @@ installation, submission, monitoring, and various commands provided by GridTK. Before diving into GridTK, ensure you have the following prerequisites: 1. A working Slurm setup. -2. [pipx](https://pipx.pypa.io/stable/) installed. +2. [uv](https://docs.astral.sh/uv/) installed (recommended) or [pipx](https://pipx.pypa.io/stable/). 3. GridTK installed (instructions provided below). ## Installation -To install GridTK, open your terminal and run the following command: +The recommended way to install GridTK is using `uv`: + +```bash +$ uv tool install gridtk +``` + +Or run it directly without installing: + +```bash +$ uvx gridtk --help +``` + +Alternatively, you can use `pipx`: ```bash $ pipx install gridtk ``` + It is **not recommended** to install GridTK using `pip install gridtk` in the same environment as your experiments. GridTK does not need to be installed in the same environment as your experiments and its dependencies may conflict with From f261eb29c55a430c18edccd0dfcf139421fb4c0c Mon Sep 17 00:00:00 2001 From: Amir Mohammadi Date: Tue, 17 Mar 2026 16:18:56 +0100 Subject: [PATCH 2/2] fix: use Path.iterdir() instead of os.listdir Co-Authored-By: Claude Opus 4.6 (1M context) --- src/gridtk/manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gridtk/manager.py b/src/gridtk/manager.py index 85e193f..bf63fb0 100644 --- a/src/gridtk/manager.py +++ b/src/gridtk/manager.py @@ -310,7 +310,7 @@ def cleanup_empty_database(self): and len(self.list_jobs(update_jobs=False)) == 0 ): Path(self.database).unlink() - if self.logs_dir.exists() and len(os.listdir(self.logs_dir)) == 0: + if self.logs_dir.exists() and not any(self.logs_dir.iterdir()): shutil.rmtree(self.logs_dir) def __del__(self):