Skip to content
Snippets Groups Projects
Commit d750001b authored by David Huss's avatar David Huss :speech_balloon:
Browse files

Remove some hardcoded Eigenservice values

parent bfc3bde9
No related branches found
No related tags found
No related merge requests found
...@@ -379,12 +379,14 @@ def create_config(): ...@@ -379,12 +379,14 @@ def create_config():
""" """
Interactivally create a config directory at a choice of different places with a default config in it. 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) 1. DEFAULT_CONFIG (use config default to inspect)
2. /etc/{APPLICATION_NAME}/*{SUFFIX}.toml (in alphabetical order) 2. /etc/{APPLICATION_NAME}/*{SUFFIX}.toml (in alphabetical order)
3. $XDG_CONFIG_HOME/{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) 4. ${APPLICATION_NAME}_CONFIG_DIR/*{SUFFIX}.toml (in alphabetical order)
5. $EIGENSERVICE_CONFIG_PATH (final override) 5. ${APPLICATION_NAME}_CONFIG_PATH (final override)
(Each overriding the fields in the previous one, where set)
""" """
print(helptext) print(helptext)
print() print()
...@@ -512,12 +514,14 @@ def print_help(): ...@@ -512,12 +514,14 @@ def print_help():
Helper tool for managing and installing a {APPLICATION_NAME} config. 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) 1. DEFAULT_CONFIG (see below)
2. /etc/{APPLICATION_NAME}/*{SUFFIX}.toml (in alphabetical order) 2. /etc/{APPLICATION_NAME}/*{SUFFIX}.toml (in alphabetical order)
3. $XDG_CONFIG_HOME/{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) 4. ${APPLICATION_NAME}_CONFIG_DIR/*{SUFFIX}.toml (in alphabetical order)
5. $EIGENSERVICE_CONFIG_PATH (final override) 5. ${APPLICATION_NAME}_CONFIG_PATH (final override)
(Each overriding the fields in the previous one, where set)
Commands: Commands:
create . . . . . Interactivly create a default config file create . . . . . Interactivly create a default config file
......
[tool.poetry] [tool.poetry]
name = "common-config" name = "common-config"
version = "0.1.20" version = "0.1.21"
description = "A config library for python based services" description = "A config library for python based services"
authors = ["David Huss <dh@atoav.com>"] authors = ["David Huss <dh@atoav.com>"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment