Overview
The utils/ package centralizes common functionality used across Visory projects: global settings (via dynaconf), logger configuration, and shared helpers.
What utils/__init__.py does
Section titled “What utils/__init__.py does”- Imports global settings from
conf/(seeconf/log.settings.pyfor the log-related variables reused across modules) - Sets up global logger configuration
- Provides utility functions like
git_get_root()anddvc_get_root()— these resolve the git repo root and DVC root respectively;git_get_root()is also used to locate theconf/path when importing global settings
LocalSettingsModel is a generic Dynaconf base model that auto-loads only the settings relevant to its subclass. It’s used by setup_logger() (called on utils import) to configure the logger locally, avoiding a circular setup.