mcpcpc / openhti

Lightweight hardware test interface

Repository from Github https://github.commcpcpc/openhtiRepository from Github https://github.commcpcpc/openhti

OpenHTI

A lightweight hardware test interface (HTI).

Install

Repository

When using git, clone the repository and change your present working directory.

git clone http://github.com/mcpcpc/openhti
cd openhti/

Create and activate a virtual environment.

python -m venv venv
source venv/bin/activate

Install OpenHTI to the virtual environment.

pip install -e .

Commands

db-init

The backend database can be initialized or re-initialized with the following command.

quart --app openhti init-db

Deploy

Docker Container

Pulling the latest container image from command line.

podman pull ghcr.io/mcpcpc/openhti:latest

Service

Stop and/or remove any existing running instances.

podman stop openhti
podman rm openhti

Pull the latest container image and start an instance. Replace /home/pi/instance/ with the appropriate user home directory and instance path.

podman pull ghcr.io/mcpcpc/openhti:latest
podman run -dt -p 8080:8080 \
  --name openhti \
  --volume /home/pi/instance:/usr/local/var/openhti-instance \
  openhti

Replace pi with the appropriate user home directory.

podman generate systemd --new --files --name openhti
mkdir -p /home/pi/.config/systemd/user
cp container-openhti.service /home/pi/.config/systemd/user
systemctl --user daemon-reload
systemctl --user start container-openhti.service
systemctl --user enable container-openhti.service
loginctl enable-linger pi

Test

python3 -m unittest

Run with coverage report.

coverage run -m unittest
coverage report
coverage html  # open htmlcov/index.html in a browser

About

Lightweight hardware test interface

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:HTML 56.1%Language:Python 39.8%Language:CSS 2.5%Language:JavaScript 1.4%Language:Dockerfile 0.2%