osewb¶
execute_command¶
-
chain_commands
(*commands: str, env: dict = {}, exit_on_non_zero_code: bool = True) → List[int]¶
-
execute_command
(command: str, env: dict = {}, exit_on_non_zero_code: bool = True) → int¶
find_base_package¶
-
exec_git_command
(git_command: str) → Optional[str]¶ Find the root of the current git repository.
Returns None if there’s an error, or not in a git repository.
- Parameters
git_command – git command string
- Returns
path to root of git repository
-
find_base_package
() → Optional[str]¶ Find the base package in a workbench repository.
Return None if not in a git repository, or no directory in the root of the repository starts with “ose”.
If multiple directories in the root of the repository start with “ose”, then we return the first match.
- Returns
Base package of workbench repository.
-
find_git_user_name
() → Optional[str]¶ Find the user name defined by git config.
- Returns
Git user name
-
find_root_of_git_repository
() → Optional[str]¶ Find the root of the current git repository.
Returns None if there’s an error, or not in a git repository.
- Returns
path to root of git repository
handle_browse_command¶
-
handle_browse_command
(root_of_git_repository: str, browse_subcommand: str) → None¶
handle_docs_command¶
-
handle_docs_command
(base_package, root_of_git_repository) → None¶
-
remove_existing_directory_recursively
(directory: str) → None¶
handle_editor_config_command¶
-
get_editor_config
() → dict¶
-
get_vs_code_workspace_settings
(root_of_git_repository: str) → Optional[dict]¶
-
get_vs_code_workspace_settings_path
(root_of_git_repository: str) → pathlib.Path¶ Get the path to VS Code workspace settings.
-
handle_editor_config_command
(root_of_git_repository: str, merge_workspace_settings: bool = False, overwrite_workspace_settings: bool = False) → None¶
-
path
(filename: str) → str¶
-
query_yes_no
(question, additional_pre_information: Optional[str] = None, default: str = 'yes')¶ Ask a yes/no question via raw_input() and return their answer.
“question” is a string that is presented to the user. “default” is the presumed answer if the user just hits <Enter>. It must be “yes” (the default), “no” or None (meaning an answer is required of the user).
The “answer” return value is True for “yes” or False for “no”.
handle_lint_command¶
-
handle_lint_command
(root_of_git_repository: str, should_fix: bool = False) → None¶
handle_make_component_command¶
handle_make_workbench_command¶
handle_test_command¶
-
find_coverage_package
(root_of_git_repository: str, base_package: str) → str¶
-
handle_test_command
(base_package: str, root_of_git_repository: str, with_coverage: bool = False) → None¶
-
is_workbench
(root_of_git_repository: str) → bool¶