Metadata-Version: 2.1
Name: srts200
Version: 0.1.0
Summary: Radome Measurement Pedestal Control Software
Author-Email: =?utf-8?q?H=C3=BCseyin?= <yigit.hsyn@gmail.com>
License: MIT
Requires-Python: >=3.12
Requires-Dist: pymodbus==2.5.3
Requires-Dist: pyModbusTCP==0.3.0
Requires-Dist: pytest>=9.0.2
Description-Content-Type: text/markdown

# SRTS200 Radome Measurement Pedestal Control Software

## Development Platform
- Windows 10

## Requirements
- Python 3.12

## Initialization (One-Time Setup)
```bash
sudo apt install python3-pdm  # system-wide briefcase
pdm init                      # create project
pdm config python.use_venv true
pdm venv create
pdm use .venv/Scripts/python
pdm add <package>             # add dependencies  
```

## Building
``` bash
pdm config python.use_venv true
pdm use .venv/bin/python
source .venv/Scripts/activate
pdm install
```

## Development

Obtain truested certifcates for HTTPS
```bash
sudo apt install mkcert                 # trusted certifier
mkcert -install                         # obtain ssl certificates
mkcert localhost 127.0.0.1 ::1
sudo apt install libnss3-tools          # install for browsers
mkcert -install
```

### Run with quart
```bash
source .venv/bin/activate
cd src/dash_api
quart run --reload --key ../../localhost+2-key.pem --cert ../../localhost+2.pem --port 7339

```

## Production

### Run with pm2
```bash
source .venv/bin/activate
cd src
export PRODUCTION=1 && pm2 start src/dash_api/app.py --name "dash-api"

```