Skip to content

Latest commit

 

History

History
35 lines (25 loc) · 2.06 KB

README.md

File metadata and controls

35 lines (25 loc) · 2.06 KB

OpenSSF Scorecard pre-commit.ci status pre-commit security tests

Sigopt-Config

Sigopt-Config is an open-source tool for managing configuration for SigOpt deployments from sigopt-server.

Usage

Configuration files must be stored in a single directory with a flat structure (no sub-directories). Each configuration file must contain a top-level mapping. Currently only JSON and YAML are supported.

The configuration directory is loaded into a native object (object in Javascript and dict in Python) via the following algorithm:

  1. A list of the files in the specified directory is created.
  2. The list of files is sorted by ascending lexographical order of filename.
  3. The files are read and parsed as YAML into a list of data.
  4. The list of data is reduced in reverse order via JSON Merge Patch with the empty object as the initializer.
  5. The result of the reduction is the final configuration object.

This algorithm has the following desirable properties:

  • Individual configuration files can be reused across multiple environments
  • Configuration files can be organized according to their purpose
  • File precedence can be set by using appropriate filename prefixes
  • Nested objects are merged together predictably
  • Easy to create a consistent implementation in a new language provided the language has a YAML parser and JSON Merge Patch implementation