Skip to main content

`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.\n This command simply:

  1. commits the dirty changes of files monitored by git AND all untracked .py/.sh to a new branch.
  2. copies this branch to the path of environment SNAP_BATCHES, default to ~/snapbatches.
  3. runs sbatch --chdir /copied_path/relative/path {--arg xxx ...} (the following args to snapbatch)

Author: mingding.thu dot gmail.com

Purge branches

snapbatch_purge [n]

Run under the git working directory. Keep the last n snapbatch branches, default 0.

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.1.tar.gz (3.9 kB view hashes)

Uploaded Source

Built Distribution

snapbatch-0.1-py3-none-any.whl (4.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page