core
wrknv.config.core
¶
Core Configuration for wrknv¶
Main configuration classes using provide.foundation.
Classes¶
WorkenvConfig
¶
Bases: RuntimeConfig
Main workenv configuration with WRKNV_ environment variable support.
Functions¶
__attrs_post_init__
¶
Initialize helper instances after attrs initialization.
Source code in wrknv/config/core.py
config_exists
¶
delete_profile
¶
edit_config
¶
get_all_tools
¶
Get all tool versions.
Source code in wrknv/config/core.py
get_config_path
¶
Get path to configuration file.
Source code in wrknv/config/core.py
get_current_profile
¶
get_env_config
¶
get_profile
¶
get_setting
¶
Get a configuration setting using dot notation.
Source code in wrknv/config/core.py
get_tool_version
¶
Get version for a specific tool.
Source code in wrknv/config/core.py
list_profiles
¶
load
classmethod
¶
Load configuration from file and environment variables.
Source code in wrknv/config/core.py
profile_exists
¶
save_config
¶
save_profile
¶
set_setting
¶
Set a configuration setting using dot notation.
Source code in wrknv/config/core.py
show_config
¶
to_dict
¶
Convert configuration to dictionary.
validate_config
¶
validate_version
¶
Validate a tool version format.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tool_name
|
str
|
Name of the tool |
required |
version
|
str
|
Version string to validate |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if version is valid, False otherwise |
Source code in wrknv/config/core.py
WorkenvSettings
¶
WorkenvToolConfig
¶
Configuration for a single tool.