SatNOGS Config utility¶
SatNOGS Config is a utility for generating the configuration for a Debian-based SatNOGS client system.
It is a menu driven configuration tool built on-top of pythondialog
.
The main purpose of this utility is to create the YAML configuration file for SatNOGS Client Ansible which provisions the system.
In addition to that, it interacts with satnogs-setup
, which is a wrapper to bootstrap Ansible, upgrades the system packages using APT and probes the hardware to show the user a more limited set of configuration options.
Table of Contents¶
User guide¶
Requirements¶
Python 3.4+
Installation¶
To install SatNOGS Config run:
$ pip install satnogs-config
This will install a console script called satnogs-config
.
Usage¶
To execute the script, run it on the command line:
$ satnogs-config
The main menu will be shown
Basic¶
The Basic
sub-menu contains the minimum required configuration options for provisioning the SatNOGS client system.
Advanced¶
The Advanced
sub-menu contains a larger set of configuration options.
It is intended for advanced users and contains options categorized by component.
Show¶
The Show
option displays the current configuration file.
Upgrade¶
The Upgrade
option calls APT
utilities to upgrade the distribution packages.
Update¶
The Update
option works in conjunction with satnogs-setup
to re-bootstrap Ansible and update the configuration tools.
Reset¶
The Reset
option resets the configuration file generated by the utility, effectively removing all the configuration options set by the user.
Apply¶
The Apply
button runs SatNOGS Client Ansible which provisions Debian to become a SatNOGS client system.
Developer guide¶
Installation¶
To install SatNOGS Config for development run in the project root directory:
$ pip install -e .
Configuration¶
This project uses python-dotenv
.
Configuration of satnogsconfig/settings.py
can be overridden by setting the respective environment variables or an .env
file placed on the project root directory.
Extending¶
SatNOGS Config functionality can be extended by implementing additional helpers. The helpers are used to enhance menu functionality beyond the core function of generating a YAML file for Ansible.
Code Quality Assurance¶
The following code quality assurance tools are used in this project:
flake8
isort
yapf
pylint
Automation¶
tox
is used to automate development tasks.
To execute the default list of tasks run:
$ tox
Modules reference¶
satnogsconfig
¶
satnogsconfig.config
¶
Configuration module
-
class
satnogsconfig.config.
Config
(filename)[source]¶ Manage configuration file
- Parameters
filename (str) – File path of configuration
-
_load_config
()[source]¶ Load and parse YAML configuration
- Returns
Configuration dictionary
- Return type
dict or NoneType
-
dump_config
(to_file=False)[source]¶ Dump configuration in YAML format
- Parameters
to_file (bool, optional) – Dump to file
- Returns
YAML configuration
- Return type
str