Skip to content

Conversation

@jandrewjohnson
Copy link
Owner

This pull request updates import and logger usage patterns across several modules to improve initialization order and ensure consistent access to configuration and logging utilities. The main focus is making sure that the hazelbean.config module is imported early and used directly for logging, which helps avoid issues with uninitialized configuration variables.

Key improvements include:

Initialization and Import Order:

  • Changed the import order in hazelbean/__init__.py to ensure hazelbean.config is imported before other modules, allowing configuration variables like LAST_TIME_CHECK to be properly set for functions such as hb.timer(). [1] [2]

Consistent Logger Usage:

  • Updated logger initialization in hazelbean/geoprocessing_extension.py and hazelbean/spatial_projection.py to use hb_config.get_logger and hb.config.get_logger respectively, ensuring loggers are consistently created via the configuration module rather than through the main hb namespace. [1] [2]

Explicit Configuration Import:

  • Added an explicit import of hazelbean.config as hb_config in hazelbean/geoprocessing_extension.py for clarity and to support the new logger usage pattern.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants