`snapbatch` is a replacement of `sbatch` to create a snapshot of current working directory, and submit the command to `sbatch`.
Project description
SnapBATCH
Install
pip install snapbatch
Usage
snapbatch [-J your_job_name] [OPTIONS(1)...] [ : [OPTIONS(N)...]] script(0) [args(0)...]
snapbatch
is a replacement of sbatch
to create a snapshot of current working directory, and submit the command to sbatch
.
This command simply:
- commits the dirty changes of files monitored by git AND all untracked .py/.sh to a new branch.
- mirros this branch to the path of environment
SNAP_BATCHES
, default to~/snapbatches
. (withgit worktree
, friendly to merge/commit/find/diff on these new workplaces than directly copying.) - runs
sbatch --chdir /copied_path/relative/path {--arg xxx ...} (the following args to snapbatch)
Purge branches
Please first manually move or delete the ~/snapbatches dir. (too dangerous to automate), then run the following command under the git working directory,
snapbatch_purge [n]
It keeps the last n snapbatch branches, default 0.
Author: mingding.thu dot gmail.com
Other tools
snapbatch-dryrun [-J your_job_name] [OPTIONS(1)...] [ : [OPTIONS(N)...]] script(0) [args(0)...]
Only mirror the codes and print the sbatch
command.
snapbatch-rsc [-J your_job_name] [OPTIONS(1)...] [ : [OPTIONS(N)...]] script(0) [args(0)...]
submit to the FAIR RSC cluster on dev server.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
snapbatch-0.3.1.tar.gz
(4.2 kB
view hashes)
Built Distribution
Close
Hashes for snapbatch-0.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0a71197f8ce3d4b20bc7c335a00c791caae051b7cee480c136c21ec099e0696 |
|
MD5 | b3a0ac0c72717d55fbeafce51cbd9e1d |
|
BLAKE2b-256 | 98ee0ff245bbd64544a49b954ba0bd0b55e88c28f9b208d229f9944a754d6f90 |