Skip to content
  • Matias Guijarro's avatar
    config: Node object refactoring to allow on-demand references evaluation, and... · c9a73209
    Matias Guijarro authored
    config: Node object refactoring to allow on-demand references evaluation, and improvements on cloning and conversion to dictionary
    
    * introduction of the Reference object
        - reference object has an 'eval' function to evaluate a reference
        - evaluation returns an object from config, or the value of an object attribute
    * '$' prefix in YAML values now creates a Reference
        - no reference evaluation at YAML parsing time
    * backward compatibility
        - getting a key with a reference returns the value, not the Reference
            * => introduction of ConfigList object to represent lists
        - '.raw_*' methods returns the raw contents, ie. with Reference objects instead of reference evaluated values
    * node filenames are kept in Node objects
        - removed 'node2file' dictionary
    * nodes are indexed automatically when inserting a 'name' key
        - no need for 'create_index'
        - same for tags
    * '.to_dict()' method relies on the Python JSON decoder
        - simplification of the code
    * '.deep_copy()' is renamed to ...
    c9a73209