Metadata-Version: 2.1
Name: sonaris
Version: 0.1.3
Summary: Software Framework for Task Automation and Scheduling
License: MIT
Author: dennis
Author-email: denngohis@gmail.com
Requires-Python: >=3.10,<=3.11.8
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: PyQt6 (>=6.6.1,<7.0.0)
Requires-Dist: PyQt6-Charts (>=6.6.0,<7.0.0)
Requires-Dist: PyVISA (>=1.14.1,<2.0.0)
Requires-Dist: PyVISA-py (>=0.7.1,<0.8.0)
Requires-Dist: apscheduler (>=3.10.4,<4.0.0)
Requires-Dist: click (>=8.1.7,<9.0.0)
Requires-Dist: colorlog (>=6.8.2,<7.0.0)
Requires-Dist: docker (>=7.0.0,<8.0.0)
Requires-Dist: fastapi (>=0.110.0,<0.111.0)
Requires-Dist: filelock (>=3.13.1,<4.0.0)
Requires-Dist: numpy (>=1.26.3,<2.0.0)
Requires-Dist: pydantic (>=2.6.3,<3.0.0)
Requires-Dist: pypiwin32 (>=223,<224)
Requires-Dist: pyqtdarktheme (>=2.1.0,<3.0.0)
Requires-Dist: pyqtgraph (>=0.13.3,<0.14.0)
Requires-Dist: python-dotenv[cli] (>=1.0.1,<2.0.0)
Requires-Dist: pyyaml (>=6.0.1,<7.0.0)
Requires-Dist: uvicorn (>=0.28.0,<0.29.0)
Requires-Dist: yapf (>=0.40.2,<0.41.0)
Requires-Dist: zeroconf (>=0.131.0,<0.132.0)
Description-Content-Type: text/markdown

# Sonaris

Sonaris is a hardware device control platform developed to control lab devices and provide basic scheduling and monitoring utilities in a lab setting.

The device hardware written for it are at the moment quite limited and support only DG4202 Signal Generator and the EDUX1002A Oscilloscope, written to facilitate a thesis project.

## Dependencies

To setup the environment for env variables used in the app

On Linux you might need to install a few packages:
```bash
sudo apt-get update
sudo apt-get install libgl1 libegl1 ffmpeg libsm6 libxext6
```

On development environments or running from source:

```bash
python etc/env.py
```

To setup dependencies on the terminal:
```
poetry install --no-root
poetry shell
# Running the app
python -m sonaris run --hardware-mock
```

The generated .env file will look as such:
```
WORKINGDIR='C:/source/sonaris'
CONFIG='C:/source/sonaris/etc'
DATA='C:/source/sonaris/data'
PYTHONPATH='C:\source\sonaris\frontend\src;C:\source\sonaris\src'
ASSETS='C:/source/sonaris/frontend/assets'
LOGS='C:/source/sonaris/logs'
```

## Run Flags

```bash
Usage: python -m sonaris run [OPTIONS]

  Run the Sonaris application.

Options:
  -hm, --hardware-mock  Run the app in hardware mock mode.
  --grafana             Start Grafana container alongside the application.
                        Requires Docker.
  --help                Show this message and exit.
```

## Installing and Running Sonaris

A stable distribution of the Sonaris
```
pip install sonaris
```

When not utilizing a ```.env``` file it will attempt to use $HOME/.sonaris

Running the app
```
python -m sonaris run
```

Running the app from source
```
poetry install --no-root
poetry run python -m sonaris run
```

Running the app for hardware-mock
```
poetry run python -m sonaris run --hardware-mock
```

