Skip to content

Commit 986fb06

Browse files
lebriceclaude
andcommitted
Update CLAUDE.md: add submit docs, fix test note, expand config description
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 27d168a commit 986fb06

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

CLAUDE.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ uv run cluv <command>
1515
uv run cluv -v status
1616
```
1717

18-
There are no automated tests yet.
18+
Run tests with `uv run pytest`.
1919

2020
## Architecture
2121

2222
`cluv` is a CLI tool for managing UV-based Python projects across multiple HPC clusters (Mila, DRAC/Narval, etc.).
2323

2424
**Entry point**: `cluv/__main__.py:main()` — builds an `argparse`/`simple_parsing` parser with subcommands, then dispatches to the appropriate async or sync function. Each subcommand registers its args in an `add_<cmd>_args()` function in `__main__.py`, and its implementation lives in `cluv/cli/<cmd>.py`.
2525

26-
**Config**: `cluv/config.py` — reads the `[tool.cluv]` section from the nearest `pyproject.toml`. The key field is `clusters` (list of hostnames). Config is cached with `@functools.cache`.
26+
**Config**: `cluv/config.py` — reads the `[tool.cluv]` section from the nearest `pyproject.toml`. Key fields: `clusters` (list of hostnames or table with per-cluster settings), `slurm` (global `SBATCH_*` env var defaults), `cluster_configs` (per-cluster `SBATCH_*` overrides). Config is cached with `@functools.cache`.
2727

2828
**SSH connections**: All remote operations go through `milatools.utils.remote_v2.RemoteV2`. Connections reuse existing SSH ControlMaster sockets (checked via `control_socket_is_running_async`) to avoid triggering 2FA prompts. `cluv login` establishes fresh connections sequentially (to avoid concurrent 2FA prompts). The `login.get_remote_without_2fa_prompt()` helper is used by `sync` to only operate on already-connected clusters.
2929

@@ -35,6 +35,8 @@ There are no automated tests yet.
3535

3636
**`cluv sync`** (`cluv/cli/sync.py`): The most complete command. Runs: `git push` locally → `git clone`/`fetch`/`checkout`/`pull` on each remote → `uv sync` on each remote → optional `rsync` of results back. Each cluster's work is encapsulated in `sync_task_function`.
3737

38+
**`cluv submit`** (`cluv/cli/submit.py`): `cluv submit <cluster> <job.sh> [--no-sync] [sbatch-flags...] [-- program-args...]`. Enforces a clean git tree, injects `GIT_COMMIT`, merges global + per-cluster `SBATCH_*` env vars from config, then runs `sbatch` on the remote. Arguments before `--` are forwarded as sbatch flags; arguments after `--` are passed to the job script.
39+
3840
**`cluv init`** and **`cluv run`**: Not yet implemented (stubs/`NotImplementedError`).
3941

4042
## Cluster notes

0 commit comments

Comments
 (0)