riotkit-org / riotkit-do

RKD - RiotKit DO. Task executor - balance between Makefile and Gradle. Written in Python. Powerful tool for every DevOps. Automates production tasks as well as local development tasks
Apache License 2.0
10 stars 2 forks source link

Use os.getenv() through a wrapper to control usage of the environment #65

Closed blackandred closed 3 years ago

blackandred commented 3 years ago

Idea is to make RKD core code clean of os.getenv() calls as much as possible. The advantage is unified list of environment variables and always the same default values.

Implementation: Create a rkd.env module that will contain methods to use as a proxy for os.getenv() Use methods from rkd.env in RKD core code.

from rkd import env

env.rkd_paths()
blackandred commented 3 years ago

Implementation done, existing tests are green. Todo - add new unit tests to cover rkd.env