src.config.settings

Configuration settings for the Wordle solver application.

Functions

get_environment()

Get the current environment setting from the WORDLE_ENVIRONMENT variable.

get_settings()

Get the global application settings instance.

initialize_config([config_path])

Initialize configuration from file or use defaults.

reset_settings()

Reset the global settings instance (useful for testing).

Classes

AppSettings([game, logging, solver])

Main application settings.

GameSettings([max_attempts, word_length])

Settings for the Wordle game.

LoggingSettings([level, format, ...])

Settings for logging configuration.

SolverSettings([default_strategy, ...])

Settings for the solver strategies.

class src.config.settings.GameSettings(max_attempts=6, word_length=5)[source]

Settings for the Wordle game.

max_attempts: int = 6
word_length: int = 5
__init__(max_attempts=6, word_length=5)
class src.config.settings.LoggingSettings(level='INFO', format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', file_handler=True, console_handler=True, backup_count=30)[source]

Settings for logging configuration.

level: str = 'INFO'
format: str = '%(asctime)s - %(name)s - %(levelname)s - %(message)s'
file_handler: bool = True
console_handler: bool = True
backup_count: int = 30
__init__(level='INFO', format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', file_handler=True, console_handler=True, backup_count=30)
class src.config.settings.SolverSettings(default_strategy='entropy', suggestions_count=10, enable_memory_optimization=True, enable_performance_profiling=False)[source]

Settings for the solver strategies.

default_strategy: str = 'entropy'
suggestions_count: int = 10
enable_memory_optimization: bool = True
enable_performance_profiling: bool = False
__init__(default_strategy='entropy', suggestions_count=10, enable_memory_optimization=True, enable_performance_profiling=False)
class src.config.settings.AppSettings(game=None, logging=None, solver=None)[source]

Main application settings.

__init__(game=None, logging=None, solver=None)[source]
game: GameSettings
logging: LoggingSettings
solver: SolverSettings
classmethod load_from_file(config_path)[source]

Load settings from a YAML configuration file.

Return type:

AppSettings

to_dict()[source]

Convert settings to dictionary format.

Return type:

Dict[str, Any]

src.config.settings.get_environment()[source]

Get the current environment setting from the WORDLE_ENVIRONMENT variable.

If not set or empty, defaults to ‘PROD’. Valid values are ‘DEV’ and ‘PROD’.

Returns:

The current environment (‘DEV’ or ‘PROD’)

Return type:

str

src.config.settings.get_settings()[source]

Get the global application settings instance.

Return type:

AppSettings

src.config.settings.initialize_config(config_path=None)[source]

Initialize configuration from file or use defaults.

Parameters:

config_path (Optional[str]) – Optional path to configuration file

Return type:

AppSettings

Returns:

AppSettings instance

src.config.settings.reset_settings()[source]

Reset the global settings instance (useful for testing).

Return type:

None