map2loop.config.Config#

class map2loop.config.Config#

Bases: object

A data structure containing column name mappings for files and keywords

structure_config#

column names and keywords for structure mappings

Type:

dict

geology_config#

column names and keywords for geology mappings

Type:

dict

fault_config#

column names and keywords for fault mappings

Type:

dict

fold_config#

column names and keywords for fold mappings

Type:

dict

__init__()#

Methods

__init__()

to_dict()

Convert the config dictionary to a dictionary

update_from_dictionary(dictionary[, lower])

Update the config dictionary from a provided dict

update_from_file(filename[, legacy_format, ...])

Update the config dictionary from the provided json filename or url

update_from_legacy_file(file_map[, lower])

Update the config dictionary from the provided old version dictionary

to_dict()#

Convert the config dictionary to a dictionary

Returns:

dict – The dictionary representation of the config

update_from_dictionary(dictionary: dict, lower: bool = False)#

Update the config dictionary from a provided dict

Parameters:

dictionary (dict) – The dictionary to update from

update_from_file(filename: Path | str, legacy_format: bool = False, lower: bool = False)#

Update the config dictionary from the provided json filename or url

Parameters:
  • filename (str) – Filename or URL of the JSON config file

  • legacy_format (bool, optional) – Whether the JSON is an old version. Defaults to False.

update_from_legacy_file(file_map: dict, lower: bool = False)#

Update the config dictionary from the provided old version dictionary

Parameters:

file_map (dict) – The old version dictionary to update from