arup-group / genet

Manipulate MATSim networks via a Python API.
MIT License
44 stars 9 forks source link

Feature Request: public API for source code config filepaths #233

Open brynpickering opened 7 months ago

brynpickering commented 7 months ago

Current best method for accessing config files in the GeNet source code (e.g. in example notebooks):

import importlib_resources
config = importlib_resources.files("genet") / "configs" / "OSM" / "default_config.yml"

Ideally, these config filepaths would be accessible as genet attributes, e.g.:

import genet
config = genet.configs.OSM.default  # or: genet.configs["OSM"]["default"]