Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,22 @@ SPDX-License-Identifier: GPL-3.0-or-later

All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.

## [3.2.0](https://github.com/idiap/gridtk/compare/v3.1.0...v3.2.0) (2026-03-17)


### Features

* add --json output flag to submit, list, and report commands ([6a8c54c](https://github.com/idiap/gridtk/commit/6a8c54c1a4505ad023f0e3388539647dcfc3e8c3))
* add wait command with non-zero exit on failure ([3715276](https://github.com/idiap/gridtk/commit/3715276576ee0a881f89abb8e19f1e02039fbd50))


### Bug Fixes

* commit session before SystemExit in wait command ([2e5cd62](https://github.com/idiap/gridtk/commit/2e5cd6270f8df3e47772d5f10bad00b02261d7e4))
* ensure wait output is printed before exit ([46762e7](https://github.com/idiap/gridtk/commit/46762e7ce2be98a917811c22f1c298f1d7817a2a))
* show feedback when commands match no jobs ([#27](https://github.com/idiap/gridtk/issues/27)) ([ffd9e13](https://github.com/idiap/gridtk/commit/ffd9e13313ed1de5aa29944baefa7c8a38e3971f))
* show state breakdown in wait progress (pending vs running) ([fd30aad](https://github.com/idiap/gridtk/commit/fd30aad1ea9e3559307eab140be73f7e02c5a3e7))

## [3.1.0](https://github.com/idiap/gridtk/compare/v3.0.1...v3.1.0) (2026-03-16)


Expand Down
65 changes: 63 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -260,6 +273,27 @@ Here are some useful commands:
sacctmgr -n -p list assoc where user=$USER | awk '-F|' '{print " "$2}'
```

### Waiting for Jobs

Use `gridtk wait` to block until all jobs finish:
```bash
$ gridtk wait
Waiting for 3 job(s)... (checking every 10s)
Job 1: COMPLETED (0)
Job 2: COMPLETED (0)
Job 3: FAILED (1)
```

`gridtk wait` exits with code 1 if any job failed, making it easy to chain:
```bash
$ gridtk submit job.sh && gridtk wait && echo "All done!"
```

You can filter which jobs to wait for and change the polling interval:
```bash
$ gridtk wait -j 1,2 --interval 30
```

### Tab Completion

GridTK supports tab completion for the `gridtk` command. To enable it, add the following
Expand Down Expand Up @@ -297,3 +331,30 @@ $ gridtk list --truncate # --truncate or -t
-------- -------- ------- ------- ---------- ---------------- -------- -------------
1 506994 hc.. COMPL.. gridtk logs/gridtk.50.. gridtk subm..
```

For machine-readable output (useful for scripting and AI agents), use `--json`:
```bash
$ gridtk list --json
[
{
"job_id": 1,
"slurm_id": 506994,
"nodes": "hcne01",
"state": "COMPLETED",
"exit_code": "0",
"name": "gridtk",
"output": "logs/gridtk.506994.out",
"dependencies": [],
"command": "gridtk submit job.sh"
}
]
```

The `--json` flag is also available on `submit` and `report`:
```bash
$ gridtk submit --json job.sh
{"job_id": 1, "slurm_id": 506994, "name": "gridtk"}

$ gridtk report --json -j 1
[{"job_id": 1, "name": "gridtk", "state": "COMPLETED", ...}]
```
Loading