From d750001ba2d776f16b4ce1231795710986a80fe1 Mon Sep 17 00:00:00 2001 From: David Huss <dh@atoav.com> Date: Mon, 24 Feb 2025 15:10:04 +0100 Subject: [PATCH] Remove some hardcoded Eigenservice values --- common_config/common.py | 16 ++++++++++------ pyproject.toml | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/common_config/common.py b/common_config/common.py index fabbaad..649a78a 100755 --- a/common_config/common.py +++ b/common_config/common.py @@ -379,12 +379,14 @@ def create_config(): """ Interactivally create a config directory at a choice of different places with a default config in it. """ - helptext = f"""Configs are read from the following directories (later overrides earlier): + helptext = f"""Configuration files are read from the following locations: 1. DEFAULT_CONFIG (use config default to inspect) 2. /etc/{APPLICATION_NAME}/*{SUFFIX}.toml (in alphabetical order) 3. $XDG_CONFIG_HOME/{APPLICATION_NAME}/*{SUFFIX}.toml (in alphabetical order) -4. $EIGENSERVICE_CONFIG_DIR/*{SUFFIX}.toml (in alphabetical order) -5. $EIGENSERVICE_CONFIG_PATH (final override) +4. ${APPLICATION_NAME}_CONFIG_DIR/*{SUFFIX}.toml (in alphabetical order) +5. ${APPLICATION_NAME}_CONFIG_PATH (final override) + +(Each overriding the fields in the previous one, where set) """ print(helptext) print() @@ -512,12 +514,14 @@ def print_help(): Helper tool for managing and installing a {APPLICATION_NAME} config. -Configs are read from the following directories (later overrides earlier): +Configuration files are read from the following locations: 1. DEFAULT_CONFIG (see below) 2. /etc/{APPLICATION_NAME}/*{SUFFIX}.toml (in alphabetical order) 3. $XDG_CONFIG_HOME/{APPLICATION_NAME}/*{SUFFIX}.toml (in alphabetical order) -4. $EIGENSERVICE_CONFIG_DIR/*{SUFFIX}.toml (in alphabetical order) -5. $EIGENSERVICE_CONFIG_PATH (final override) +4. ${APPLICATION_NAME}_CONFIG_DIR/*{SUFFIX}.toml (in alphabetical order) +5. ${APPLICATION_NAME}_CONFIG_PATH (final override) + +(Each overriding the fields in the previous one, where set) Commands: create . . . . . Interactivly create a default config file diff --git a/pyproject.toml b/pyproject.toml index 64ecbe2..1135080 100755 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "common-config" -version = "0.1.20" +version = "0.1.21" description = "A config library for python based services" authors = ["David Huss <dh@atoav.com>"] -- GitLab