# <img src="https://twiki.cern.ch/twiki/pub/BEABP/Logos/OMC_logo.png" height="28"> PyLHC Submitter

[![Cron Testing](https://github.com/pylhc/submitter/workflows/Cron%20Testing/badge.svg)](https://github.com/pylhc/submitter/actions?query=workflow%3A%22Cron+Testing%22)
[![Code Climate coverage](https://img.shields.io/codeclimate/coverage/pylhc/submitter.svg?style=popout)](https://codeclimate.com/github/pylhc/submitter)
[![Code Climate maintainability (percentage)](https://img.shields.io/codeclimate/maintainability-percentage/pylhc/submitter.svg?style=popout)](https://codeclimate.com/github/pylhc/submitter)
[![GitHub last commit](https://img.shields.io/github/last-commit/pylhc/submitter.svg?style=popout)](https://github.com/pylhc/submitter/)
[![GitHub release](https://img.shields.io/github/release/pylhc/submitter.svg?style=popout)](https://github.com/pylhc/submitter/)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4818455.svg)](https://doi.org/10.5281/zenodo.4818455)

pylhc-submitter contains scripts to simplify the creation and submission of jobs to HTCondor at CERN.

## Documentation

- Autogenerated docs via `Sphinx` can be found at <https://pylhc.github.io/submitter/>.
- General documentation of the OMC-Team, including examples, is located at <https://pylhc.github.io/>

## Getting Started

This package is `Python 3.7+` compatible, and can be installed through `pip`:
```bash
pip install pylhc-submitter
```

One can also install from VCS:
```bash
git clone https://github.com/pylhc/submitter
pip install /path/to/submitter
```

Or simply from the online master branch, which is stable:
```bash
pip install git+https://github.com/pylhc/submitter.git#egg=pylhc_submitter
```

After installing, scripts can be run with either `python -m pylhc_submitter.SCRIPT --FLAG ARGUMENT` or by calling the `.py` files directly.

## Description

This package provides scripts to allow the creation, submission, and execution of multi-job studies.

## Functionality

- `HTCondor Job Submitter` - Allows to generate jobs based on a templates and submit them to HTCondor. ([**job_submitter.py**](pylhc_submitter/job_submitter.py))
- `AutoSix` - Allows to generate and submit parametric SixDesk studies easily. ([**autosix.py**](pylhc_submitter/autosix.py))

## Quality checks

- Unit and accuracy tests are run automatically through CI [Github Actions](https://github.com/pylhc/submitter/actions). See our workflows in this [readme](.github/workflows/README.md).
- Additional checks for code-complexity, design-rules, test-coverage and duplication are made through [CodeClimate](https://codeclimate.com/github/pylhc/submitter).
- Pull requests implementing functionality or fixes are merged into the master branch after passing CI, and getting a reviewer's approval.

### Changelog

See the [CHANGELOG](CHANGELOG.md) file.

### Hints for Developers

In case you want to contribute to `submitter`'s development, you should install it in `editable` mode:
```
git clone https://github.com/pylhc/submitter
pip install --editable submitter
```

You can install extra dependencies (as defined in `setup.py`) suited to your use case with the following commands:
```
pip install --editable submitter[test]
pip install --editable submitter[test,doc]
pip install --editable submitter[all]
```

Open an issue, make your changes in a branch and submit a pull request.

## Authors

* **pyLHC/OMC-Team** - *Working Group* - [pyLHC](https://github.com/orgs/pylhc/teams/omc-team)

## License

This project is licensed under the `MIT` License - see the [LICENSE](LICENSE) file for details.
