Metadata-Version: 2.4
Name: sdss-cerebro
Version: 1.3.2
Summary: Telemetry management and time series for SDSS-V
Project-URL: Homepage, https://github.com/sdss/cerebro
Project-URL: Repository, https://github.com/sdss/cerebro
Project-URL: Documentation, https://sdss-cerebro.readthedocs.io/en/latest/
Author-email: José Sánchez-Gallego <gallegoj@uw.edu>
License-Expression: BSD-3-Clause
License-File: LICENSE.md
Requires-Python: <4,>=3.10
Requires-Dist: asyncudp>=0.11.0
Requires-Dist: click-default-group>=1.2.2
Requires-Dist: click>=8.0.0
Requires-Dist: daemonocle>=1.0.2
Requires-Dist: httpx>=0.28.1
Requires-Dist: influxdb-client[extra]>=1.9.0
Requires-Dist: lvmopstools>=0.5.7
Requires-Dist: ntplib>=0.3.4
Requires-Dist: numpy<2.3.0,>=2.0.0
Requires-Dist: peewee>=3.15.4
Requires-Dist: pymysql>=1.0.2
Requires-Dist: rx>=3.2.0
Requires-Dist: sdss-clu>=2.0.0
Requires-Dist: sdss-drift>=1.2.0
Requires-Dist: sdss-tpm-multicast-client>=0.3.0
Requires-Dist: sdsstools>=1.9.1
Description-Content-Type: text/markdown

# cerebro

![Versions](https://img.shields.io/badge/python->3.7-blue)
[![Documentation Status](https://readthedocs.org/projects/sdss-cerebro/badge/?version=latest)](https://sdss-cerebro.readthedocs.io/en/latest/?badge=latest)
[![Test Status](https://github.com/albireox/cerebro/workflows/Test/badge.svg)](https://github.com/sdss/sdss/actions)

A library to gather time-series data from different sources and store them, with focus on InfluxDB databases. Documentation and concepts are defined [here](https://sdss-cerebro.readthedocs.io/).

## Installation

In general you should be able to install `cerebro` by doing

```console
pip install sdss-cerebro
```

To build from source, use

```console
git clone git@github.com:sdss/cerebro
cd cerebro
pip install .
```

## Use

`cerebro` is meant to run as a daemon. The simplest way to run it is simply

```console
cerebro start
```

This will run all the sources and use all the observers. You can define a specific profile to use

```console
cerebro --profile lvm-lab start
```

or a series of sources

```console
cerebro --sources lvm_govee_clean_room,lvm_sens4_r1 start
```

Normally `cerebro` will run in detached/daemon mode. It's also possible to pass the flag `--debug` (`cerebro start --debug`) to run the code in the foreground.

Run `cerebro --help` to get all the options available.

## Development

`cerebro` uses [poetry](http://poetry.eustace.io/) for dependency management and packaging. To work with an editable install it's recommended that you setup `poetry` and install `cerebro` in a virtual environment by doing

```console
poetry install
```

Pip does not support editable installs with PEP-517 yet. That means that running `pip install -e .` will fail because `poetry` doesn't use a `setup.py` file. As a workaround, you can use the `create_setup.py` file to generate a temporary `setup.py` file. To install `cerebro` in editable mode without `poetry`, do

```console
pip install poetry
python create_setup.py
pip install -e .
```

The style code is [black](https://black.readthedocs.io/en/stable/).
