Our YAML files are a bit of a mess, and they're very hard to use:
- The defaults for StorageClass and the registry schema are not just nodes in the Butler config tree; there are also special nodes that point to files (e.g. "storageClasses.config") that make it impossible to use the defaults directly, and obfuscate what the real structure ought to be.
- Each of the methods that constructs something from a Config has its own special handling for non-Config arguments (e.g. filenames).
- StorageClassFactory has two public APIs for constructing StorageClasses from Config.
- Because we never validate any of the structures, error messages due to bad configs are very opaque.
- Config files contain references to other Config files that are relative to the current working directory (which is assumed to be DAF_BUTLER_DIR, since that's where tests are run).
- Constructing most important daf_butler objects requires either creating a Config file on disk or a Config object in memory, rather than applying an automatically-located default configuration and overriding with kwargs.
I think it's time to step back and actually design how we want the configuration system to work.