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