Metadata-Version: 2.4
Name: climate-aware-task-scheduler
Version: 1.1.0
Summary: Climate aware task scheduler
Author: Colin Sauze, Andrew Walker, Loïc Lannelongue, Thibault Lestang, Tony Greenberg, Lincoln Colling, Adam Ward, Abhishek Dasgupta, Carlos Martinez, Sadie Bartholomew
License: MIT License
        
        Copyright (c) 2023 GreenScheduler
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Home, https://github.com/GreenScheduler/cats
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: System Administrators
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests-cache>=1.0
Requires-Dist: PyYAML>=6.0
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: numpy>=1.5.0; extra == "test"
Requires-Dist: pytest-subprocess==1.5.0; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Requires-Dist: matplotlib>=3.0; extra == "test"
Provides-Extra: types
Requires-Dist: mypy; extra == "types"
Requires-Dist: types-PyYAML; extra == "types"
Requires-Dist: types-redis; extra == "types"
Requires-Dist: types-requests; extra == "types"
Requires-Dist: types-ujson; extra == "types"
Provides-Extra: docs
Requires-Dist: sphinx==6.*; extra == "docs"
Requires-Dist: sphinx-argparse; extra == "docs"
Requires-Dist: ghp-import; extra == "docs"
Requires-Dist: renku-sphinx-theme; extra == "docs"
Requires-Dist: sphinx_copybutton; extra == "docs"
Provides-Extra: plots
Requires-Dist: matplotlib>=3.0; extra == "plots"
Dynamic: license-file

# CATS: **C**limate-**A**ware **T**ask **S**cheduler

CATS is a **C**limate-**A**ware **T**ask **S**cheduler. It schedules cluster jobs to minimize predicted carbon intensity of running the process. It was created as part of the [2023 Collaborations Workshop](https://software.ac.uk/cw23).

![CATS](https://i.imgur.com/QvbPDm7.png)

The Climate-Aware Task Scheduler is a lightweight Python package designed to schedule tasks based on the estimated carbon intensity of the electricity grid at any given moment. This tool uses real-time carbon intensity data from the National Grid ESO via their API to estimate the carbon intensity of the electricity grid, and schedules tasks at times when the estimated carbon intensity is lowest. This helps to reduce the carbon emissions associated with running computationally intensive tasks, making it an ideal solution for environmentally conscious developers.

*Currently CATS only works in the UK. If you are aware of APIs for realtime grid carbon intensity data in other countries please open an issue and let us know.*

## Features

- Estimates the carbon intensity of the electricity grid in real-time
- Schedules tasks based on the estimated carbon intensity, minimizing carbon emissions
- Provides a simple and intuitive API for developers
- Lightweight and easy to integrate into existing workflows
- Supports Python 3.9+

## Installation

Install via `pip` as follows:

```bash
pip install climate-aware-task-scheduler
```

To install the development version:

```bash
pip install git+https://github.com/GreenScheduler/cats
```


## Documentation

Documentation is available at [greenscheduler.github.io/cats/](https://greenscheduler.github.io/cats/).

We recommend the
[quickstart](https://greenscheduler.github.io/cats/quickstart.html#basic-usage)
if you are new to CATS. CATS can optionally [display carbon footprint
savings](https://greenscheduler.github.io/cats/quickstart.html#displaying-carbon-footprint-estimates)
using a [configuration file](cats/config.yml).

### Console demonstration
CATS predicting optimal start time for the `ls` command in the `OX1` postcode:

![CATS animated usage example](cats.gif)

## Contributing

We welcome contributions from the community! If you find a bug or have an idea for a new feature, please open an issue on our GitHub repository or submit a pull request.

## License

[MIT License](https://github.com/GreenScheduler/cats/blob/main/LICENSE)
