allow different naming for the directory based config file

This commit is contained in:
Robert Kaussow 2020-06-27 22:41:51 +02:00
parent d7dac43a72
commit 3d88f0b8f8
Signed by: xoxys
GPG Key ID: 65362AE74AF98B61
3 changed files with 7 additions and 6 deletions

View File

@ -1,2 +1,3 @@
* ENHANCEMENT
* add custom modules auto-detection
- ENHANCEMENT
- add custom modules auto-detection
- allow different naming for the directory based config file `.later|.later.yml|.later.yaml`

View File

@ -71,9 +71,9 @@ class Settings(object):
defaults = self._get_defaults()
source_files = []
source_files.append(self.config_file)
source_files.append(
os.path.relpath(os.path.normpath(os.path.join(os.getcwd(), ".later.yml")))
)
source_files.append(os.path.join(os.getcwd(), ".later"))
source_files.append(os.path.join(os.getcwd(), ".later.yml"))
source_files.append(os.path.join(os.getcwd(), ".later.yaml"))
cli_options = self.args
for config in source_files:

View File

@ -8,7 +8,7 @@ Changes can be made in a YAML configuration file or through CLI options which wi
- default configuration (build-in)
- global configuration file (this will depend on your operating system)
- directory based configuration file (`.later.yml` file in current working directory)
- folder-based configuration file (.later.yml|.later.yaml|.later) in current working directory
- CLI options
Be careful! YAML Attributes will be overwritten while lists in any configuration file will be merged.