geoana.utils.requires#
- geoana.utils.requires(modules)#
Decorate a function with soft dependencies.
This function was inspired by the requires function of pysal, which is released under the ‘BSD 3-Clause “New” or “Revised” License’.
- Parameters:
- modulesdict
Dictionary containing soft dependencies, e.g., {‘matplotlib’: matplotlib}.
- Returns:
- decorated_functionfunction
Original function if all soft dependencies are met, otherwise it returns an empty function which prints why it is not running.