Metadata-Version: 2.1
Name: slurmgen
Version: 3.13.0
Summary: SlurmGen - Simple Slurm Manager
Author-email: Thomas Guillod <guillod@otvam.ch>
Maintainer-email: Thomas Guillod <guillod@otvam.ch>
License: BSD-2-Clause
Project-URL: Homepage, https://github.com/otvam/slurmgen
Project-URL: Repository, https://github.com/otvam/slurmgen
Project-URL: Releases, https://github.com/otvam/slurmgen/releases
Project-URL: Issues, https://github.com/otvam/slurmgen/issues
Project-URL: Tags, https://github.com/otvam/slurmgen/tags
Keywords: Python,Slurm,HPC,Cluster
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: BSD License
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering
Classifier: Natural Language :: English
Classifier: Environment :: Console
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE.txt

# SlurmGen - Simple Slurm Manager

> * **Repository: [github.com/otvam/slurmgen](https://github.com/otvam/slurmgen)**
> * **PyPi: [pypi.org/project/slurmgen](https://pypi.org/project/slurmgen)**
> * **Conda: [anaconda.org/conda-forge/slurmgen](https://anaconda.org/conda-forge/slurmgen)**

## Summary

**SlurmGen** is a very **simple** **Slurm** manager:
* The job description is stored in JSON files.
* The JSON files are transformed into Slurm scripts.
* The Slurm script can be run locally or on a Slurm Cluster.

**SlurmGen** is only supporting a small **subset** of **Slurm**:
* Create and delete folders.
* Set environment variables.
* Set the job name and log.
* Set the ressources (memory, time, CPU, etc.).
* Define the set of commands to be executed.

SlurmGen is not a binding and/or a wrapper for Slurm.
SlurmGen is only generating Slurm scripts from JSON files.
SlurmGen is written in Python without any external dependencies.

## Example

An example is located in the `example` folder of the repository:
* `job_def.json` contains the job definition
* `job_tmpl.json` contains the template data
* `run_slurm.py` contains is dummy script executed by the Slurm job
* `slurm_output` contains the generated Slurm script and log file
* `data_output` contains data generated by the Slurm job

```bash
# Create a Slurm script with a command line template.
sgen job_def.json --tmpl_str "title" "test" --tmpl_str "var" "Welcome to everyone"

# Create a Slurm script with a JSON file template.
sgen job_def.json --tmpl_file job_tmpl.json

# Create a Slurm script and run the job locally.
sgen job_def.json --local --tmpl_file job_tmpl.json

# Create a Slurm script and run the job on the cluster.
sgen job_def.json --cluster --tmpl_file job_tmpl.json
```

## Project Links

* Repository: https://github.com/otvam/slurmgen
* Releases: https://github.com/otvam/slurmgen/releases
* Tags: https://github.com/otvam/slurmgen/tags
* Issues: https://github.com/otvam/slurmgen/issues
* PyPi: https://pypi.org/project/slurmgen
* Conda: https://anaconda.org/conda-forge/slurmgen

## Author

* **Thomas Guillod**
* Email: guillod@otvam.ch
* Website: https://otvam.ch

## Copyright

> (c) 2023 - Thomas Guillod
> 
>  BSD 2-Clause "Simplified" License
