cafe.configurator package¶
cafe.configurator.cli module¶
-
class
cafe.configurator.cli.
ConfiguratorCLI
[source]¶ Bases:
object
CLI for future engine management and configuration options.
cafe.configurator.managers module¶
-
class
cafe.configurator.managers.
EngineConfigManager
[source]¶ Bases:
object
-
ENGINE_CONFIG_PATH
= '/home/docs/checkouts/readthedocs.org/user_builds/opencafe/envs/stable/.opencafe/engine.config'¶
-
static
rename_section_option
(config_parser_object, section_name, current_option_name, new_option_name)[source]¶
-
classmethod
update_engine_config
()[source]¶ Applies to an existing engine.config file all modifications made to the default engine.config file since opencafe’s release in the order those modification where added.
-
wrapper
= <textwrap.TextWrapper instance>¶
-
-
class
cafe.configurator.managers.
EngineDirectoryManager
[source]¶ Bases:
object
-
OPENCAFE_ROOT_DIR
= '/home/docs/checkouts/readthedocs.org/user_builds/opencafe/envs/stable/.opencafe'¶
-
OPENCAFE_SUB_DIRS
= {'DATA_DIR': '/home/docs/checkouts/readthedocs.org/user_builds/opencafe/envs/stable/.opencafe/data', 'CONFIG_DIR': '/home/docs/checkouts/readthedocs.org/user_builds/opencafe/envs/stable/.opencafe/configs', 'LOG_DIR': '/home/docs/checkouts/readthedocs.org/user_builds/opencafe/envs/stable/.opencafe/logs', 'TEMP_DIR': '/home/docs/checkouts/readthedocs.org/user_builds/opencafe/envs/stable/.opencafe/temp'}¶
-
classmethod
build_engine_directories
()[source]¶ Updates, creates, and owns (as needed) all default directories
-
classmethod
set_engine_directory_permissions
()[source]¶ Recursively changes permissions default engine directory so that everything is user-owned
-
wrapper
= <textwrap.TextWrapper instance>¶
-
-
class
cafe.configurator.managers.
EnginePluginManager
[source]¶ Bases:
object
-
classmethod
install_plugin
(plugin_name)[source]¶ Install a single plugin by name into the current environment
-
classmethod
-
class
cafe.configurator.managers.
PlatformManager
[source]¶ Bases:
object
Methods for dealing with the OS cafe is running on
-
USING_VIRTUALENV
= True¶
-
USING_WINDOWS
= False¶
-
-
class
cafe.configurator.managers.
TestEnvManager
(product_name, test_config_file_name, engine_config_path=None, test_repo_package_name=None)[source]¶ Bases:
object
Sets all environment variables used by cafe and its implementations.
Wraps all internally-set and config-controlled environment variables in read-only properties for easy access. Useful for writing bootstrappers for runners and scripts.
Set the environment variable “CAFE_ALLOW_MANAGED_ENV_VAR_OVERRIDES” to any value to enable overrides for derived environment variables. (The full list of these is available in the attribute MANAGED_VARS)
NOTE: The TestEnvManager is only responsible for setting these vars, it has no control over how they are used by the engine or its implementations, so override them at your own risk!
USAGE HINTS: If you set CAFE_TEST_REPO_PATH, you should also set the CAFE_TEST_REPO_PACKAGE accordingly, as having them point to different things could cause undefined behavior. (The path is normally derived from the package).
-
MANAGED_VARS
= {'test_data_directory': 'CAFE_DATA_DIR_PATH', 'test_config_file_path': 'CAFE_CONFIG_FILE_PATH', 'engine_config_path': 'CAFE_ENGINE_CONFIG_FILE_PATH', 'test_master_log_file_name': 'CAFE_MASTER_LOG_FILE_NAME', 'test_log_dir': 'CAFE_TEST_LOG_PATH', 'test_repo_path': 'CAFE_TEST_REPO_PATH', 'test_logging_verbosity': 'CAFE_LOGGING_VERBOSITY', 'test_root_log_dir': 'CAFE_ROOT_LOG_PATH', 'test_repo_package': 'CAFE_TEST_REPO_PACKAGE'}¶
-
finalize
(create_log_dirs=True)[source]¶ Calls all lazy_properties in the TestEnvManager.
Sets all lazy_properties to their configured or derived values. To override this behavior, simply don’t call finalize(): note that unless you manually set the os environment variables yourself this will result in undefined behavior. Creates all log directories, overridden by making create_log_dirs=False. Checks that all set paths exists, raises exception if they don’t.
-
test_config_file_path
= None¶
-
test_data_directory
= None¶
-
test_log_dir
= None¶
-
test_logging_verbosity
= None¶
-
test_master_log_file_name
= None¶
-
test_repo_package
= None¶
-
test_repo_path
= None¶
-
test_root_log_dir
= None¶
-