style-analyzer icon indicating copy to clipboard operation
style-analyzer copied to clipboard

Environment configuration on CLI

Open smola opened this issue 7 years ago • 2 comments

  • Environment configuration should be read from environment variables (database, filesystem paths, endpoints). It's useful to have them as CLI flags too (see borges for an example, which uses both), but environment variables are usually more convenient to reuse them. YAML config is something we have avoided so far in other projects.
  • Default values should be provided where it makes sense. For example, defaults explained in the README.

smola avatar Sep 28 '18 10:09 smola

Environment variables should be already supported thanks to the package we use for parsing the command line.

But anyway I don't like env vars because they make the configuration implicit compared to explicit pointing to the configuration file. I had so much bad experience with implicit expectation of the environment vars in different applications.

vmarkovtsev avatar Sep 28 '18 10:09 vmarkovtsev

@smola not sure if we are on the same page: command line arguments are currently duplicated in the config file, and the user is not required to use a configuration file at all.

vmarkovtsev avatar Sep 28 '18 10:09 vmarkovtsev