eive-tmtc/README.md

124 lines
2.1 KiB
Markdown
Raw Permalink Normal View History

2021-06-12 13:54:08 +02:00
# TMTC Commander EIVE
2020-12-17 17:50:00 +01:00
2022-05-17 14:46:23 +02:00
This application can be used to test the EIVE On-Board Software. Furthermore, it can
also be used to retrieve all sorts of telemetry data like housekeeping data.
It is recommended to use this application with a virtual environment.
2023-09-14 12:12:58 +02:00
The [virtual environment](#venv) chapter describes how to set one up. The [requirements](#reqs)
2022-05-17 14:57:54 +02:00
describes how to install all required packages.
2022-05-17 14:46:23 +02:00
The configuration file can currently be found at `tmtc_conf.json`. It caches settings
like the default communication interface or parameters like the TCP port when using the TCP
communication interface.
2022-05-17 14:57:54 +02:00
# Examples
Assuming you are running in a [virtual environment](#venv) and all [package requirements](#reqs)
were installed properly.
Run CLI mode
```sh
2022-12-01 14:44:34 +01:00
./tmtcc.py
2022-05-17 14:57:54 +02:00
```
Run GUI mode
```sh
2022-12-01 14:44:34 +01:00
./tmtcc.py -g
2022-05-17 14:57:54 +02:00
```
# <a id="venv"></a> Set up virtual environment
2022-05-17 14:46:23 +02:00
## Linux
2022-05-17 14:46:23 +02:00
1. Create virtual environment
2022-05-17 14:46:23 +02:00
```sh
python3 -m venv venv
```
2022-05-17 14:46:23 +02:00
2. Activate virtual environment
2022-05-17 14:46:23 +02:00
```sh
. venv/bin/activate
```
2022-05-17 14:46:23 +02:00
## Windows
2021-08-09 11:45:01 +02:00
1. Create virtual environment
2021-08-09 11:45:01 +02:00
```sh
2022-05-18 18:32:20 +02:00
py -m venv venv
```
2021-08-09 11:45:01 +02:00
2. Activate virtual environment
2021-08-09 11:45:01 +02:00
```sh
venv\Scripts\activate.bat
```
2021-08-09 11:45:01 +02:00
2022-05-17 14:57:54 +02:00
# <a id="reqs"></a> Install requirements
2021-08-09 11:45:01 +02:00
There are two ways to install the requirements. One is to install the primary dependency
2023-09-14 12:18:21 +02:00
`tmtccmd` interactively.
## Installing via PyPI
2021-08-09 11:45:01 +02:00
2023-09-14 12:20:35 +02:00
It is recommended to install `eive-tmtc` itself interactively, which also installs
all required dependencies.
2021-06-12 13:54:08 +02:00
2023-09-14 12:18:21 +02:00
```sh
pip install -e .
```
2021-06-12 13:54:08 +02:00
2023-09-14 12:20:35 +02:00
If you only want to install all dependencies:
```sh
pip install -r requirements.txt
```
2023-09-14 12:18:21 +02:00
## Install interactively
Clone the dependency first inside the `deps` folder
```sh
cd deps
./install_tmtccmd.sh
```
2023-09-14 12:18:21 +02:00
Then you can install `tmtccmd` interactively
2021-06-12 13:54:08 +02:00
```sh
2023-09-14 12:18:21 +02:00
cd tmtccmd
pip install -e .
2021-06-12 13:54:08 +02:00
```
# Run Linter
2021-06-12 13:54:08 +02:00
Can be used to quickly check validity of script. Install `flake8` first
2021-06-12 13:54:08 +02:00
```sh
2023-09-14 12:09:50 +02:00
python3 -m pip install ruff
2021-06-12 13:54:08 +02:00
```
or on Windows
2021-06-12 13:54:08 +02:00
```sh
2023-09-14 12:09:50 +02:00
py -m pip install ruff
2021-06-12 13:54:08 +02:00
```
2023-09-14 12:09:50 +02:00
and then run it
2021-06-12 13:54:08 +02:00
```sh
2023-09-14 12:09:50 +02:00
ruff .
2021-06-12 13:54:08 +02:00
```
2022-05-17 14:57:54 +02:00
# Run Auto-Formatter
This repo is auto-formatted using `black`. Assuming `black` is installed, you can simply run
```sh
black .
```