nasa/OnAIR

Update section and key names in config files for clarity and code usage

Aperta

#101 aperta il 15 dic 2023

 (1 commento) (0 reazioni) (0 assegnatari)Python (28 fork)auto 404
conventiondocumentationenhancementhelp wantedquestion

Metriche repository

Star
 (105 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

The current section and key names in used by a configuration file are not consistent with each other or necessarily in line with how the values are used in production. Several updates should be performed to clarify usage.

Here are some ideas for the default_config.ini file:

  1. 'parser' is an old moniker and DataSource should be used instead
  2. [DEFAULT] is a catch all and should be dismantled into component parts a. the parser, now DataSource, should be renamed and perhaps put into its own section b. the files should go into a [FILES] section c. the plugins should go into a [PLUGINS] section
  3. TelemetryMetadataFilePath and MetaFile should be consistently named
  4. Required vs. optional keys should be clear
  5. Optional keys should clearly indicate a default value used by the code if item removed
  6. Sections, like [RUN_FLAGS] should be able to be optional if all its keys are also optional
  7. [RUN_FLAGS] should be considered for rename, maybe [OPTIONS]
  8. If renaming [RUN_FLAGS], update key name(s) to not use '_flags'

The default_config.ini currently serves as the example that user .ini files should follow. If that usage continues it should include everything, even all optional sections/keys. It may perhaps be better to create a "not for actual use" example for documentation on how to create an OnAIR config file. That example config could either be in addition to or replace the default_config.ini as the template for user's config files.

Guida contributor