Feat/dynaconf
-
Review changes -
-
Download -
Patches
-
Plain diff
This MR moves us from standard yaml configs to using dynaconf.
Description
There are multiple neat features that could be implemented with Dynaconf, but for this MR I wanted to keep things as simple as possible, so I've done this with as few changes as I could.
The way the configurations are used is not changed, the only changes are:
- Webservice config files moved to a 'config' directory
- Configs loaded by
config/__init__.py
- Changed the config loading code to import configs from the module
- Configs are loaded from multiple places, in this order:
config/S.yaml
,config/.secret.S.yaml
,~/.config/pycalibration/S.yaml
,DYNACONF_S_*
env vars (whereS
is the service name, e.g.webservice
orserve_overview
How Has This Been Tested?
Checked that the configs, when accessed as a dictionary, are identical between the original and dynaconf version
Relevant Documents (optional)
-
todo
Types of changes
- New feature (non-breaking change which adds functionality)
- Docs (changes to the documentation)
Checklist:
-
My code follows the code style of this project. -
My change requires a change to the documentation. -
I have updated the documentation accordingly. -
I added tests where appropriate.
Reviewers
@calibration there are a few other changes I need to do, main one being to make the command line arguments work again (currently passing a config path does nothing), but apart from that this is ready for review
Closes https://git.xfel.eu/gitlab/calibration/planning/issues/22
Edited by Robert Rosca
Merge request reports
Compare and
- version 20890ef983
- version 1912b7b4d3
- version 1812b7b4d3
- version 17cfb89032
- version 16cfb89032
- version 15cfb89032
- version 14ad9049c4
- version 13b6ec78d5
- version 1254461d7d
- version 1154461d7d
- version 10bfd68ad8
- version 9bfd68ad8
- version 875f1f915
- version 775f1f915
- version 603e0b5b7
- version 503e0b5b7
- version 4923d6600
- version 346ee7729
- version 251309a0d
- version 180432219
- master (base)
- latest version9b6f1bb423 commits,
- version 20890ef98323 commits,
- version 1912b7b4d321 commits,
- version 1812b7b4d321 commits,
- version 17cfb8903221 commits,
- version 16cfb8903221 commits,
- version 15cfb8903221 commits,
- version 14ad9049c419 commits,
- version 13b6ec78d517 commits,
- version 1254461d7d16 commits,
- version 1154461d7d16 commits,
- version 10bfd68ad816 commits,
- version 9bfd68ad816 commits,
- version 875f1f91515 commits,
- version 775f1f91515 commits,
- version 603e0b5b712 commits,
- version 503e0b5b712 commits,
- version 4923d660012 commits,
- version 346ee77298 commits,
- version 251309a0d4 commits,
- version 1804322195 commits,
Compare changes
- Side-by-side
- Inline
Files
15Loading