| Total Complexity | 2 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | import os |
||
| 2 | |||
| 3 | import yaml |
||
| 4 | |||
| 5 | import egon |
||
| 6 | |||
| 7 | |||
| 8 | def datasets(config_file=None): |
||
| 9 | """ |
||
| 10 | Return data set configuration. |
||
| 11 | |||
| 12 | Parameters |
||
| 13 | ---------- |
||
| 14 | config_file : str |
||
| 15 | Path to the data set configuration file |
||
| 16 | |||
| 17 | Returns |
||
| 18 | ------- |
||
| 19 | dict |
||
| 20 | Data set configuration |
||
| 21 | """ |
||
| 22 | if not config_file: |
||
| 23 | package_path = egon.data.__path__[0] |
||
| 24 | config_file = os.path.join(package_path, "data_sets.yml") |
||
| 25 | |||
| 26 | return yaml.load(open(config_file), Loader=yaml.SafeLoader) |
||
| 27 |