xmipp3-installer 1.0.0__py3-none-any.whl → 1.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- xmipp3_installer/__main__.py +1 -1
- xmipp3_installer/api_client/api_client.py +35 -34
- xmipp3_installer/api_client/assembler/installation_info_assembler.py +140 -145
- xmipp3_installer/application/cli/arguments/__init__.py +3 -2
- xmipp3_installer/application/cli/arguments/modes.py +112 -95
- xmipp3_installer/application/cli/arguments/params.py +63 -53
- xmipp3_installer/application/cli/cli.py +171 -190
- xmipp3_installer/application/cli/parsers/base_help_formatter.py +256 -235
- xmipp3_installer/application/cli/parsers/error_handler_parser.py +53 -53
- xmipp3_installer/application/cli/parsers/format.py +22 -22
- xmipp3_installer/application/cli/parsers/general_help_formatter.py +102 -84
- xmipp3_installer/application/cli/parsers/mode_help_formatter.py +144 -105
- xmipp3_installer/application/logger/__init__.py +5 -0
- xmipp3_installer/application/logger/errors.py +8 -8
- xmipp3_installer/application/logger/logger.py +218 -215
- xmipp3_installer/application/logger/predefined_messages.py +42 -35
- xmipp3_installer/application/user_interactions.py +6 -0
- xmipp3_installer/installer/constants/paths.py +6 -1
- xmipp3_installer/installer/handlers/cmake/cmake_handler.py +49 -53
- xmipp3_installer/installer/handlers/conda_handler.py +6 -6
- xmipp3_installer/installer/handlers/generic_package_handler.py +9 -9
- xmipp3_installer/installer/handlers/git_handler.py +152 -153
- xmipp3_installer/installer/handlers/shell_handler.py +87 -88
- xmipp3_installer/installer/handlers/versions_manager.py +20 -6
- xmipp3_installer/installer/installer_service.py +22 -8
- xmipp3_installer/installer/modes/mode_all_executor.py +61 -51
- xmipp3_installer/installer/modes/mode_clean/mode_clean_all_executor.py +44 -36
- xmipp3_installer/installer/modes/mode_clean/mode_clean_bin_executor.py +84 -74
- xmipp3_installer/installer/modes/mode_clean/mode_clean_executor.py +48 -34
- xmipp3_installer/installer/modes/mode_cmake/mode_cmake_executor.py +60 -47
- xmipp3_installer/installer/modes/mode_cmake/mode_compile_and_install_executor.py +52 -39
- xmipp3_installer/installer/modes/mode_cmake/mode_config_build_executor.py +68 -49
- xmipp3_installer/installer/modes/mode_config_executor.py +44 -33
- xmipp3_installer/installer/modes/mode_executor.py +14 -13
- xmipp3_installer/installer/modes/mode_get_sources_executor.py +121 -112
- xmipp3_installer/installer/modes/mode_git_executor.py +43 -31
- xmipp3_installer/installer/modes/mode_selector.py +6 -0
- xmipp3_installer/installer/modes/mode_sync/mode_add_model_executor.py +97 -83
- xmipp3_installer/installer/modes/mode_sync/mode_get_models_executor.py +53 -41
- xmipp3_installer/installer/modes/mode_sync/mode_sync_executor.py +41 -35
- xmipp3_installer/installer/modes/mode_sync/mode_test_executor.py +144 -77
- xmipp3_installer/installer/modes/mode_version_executor.py +161 -150
- xmipp3_installer/installer/orquestrator.py +24 -24
- xmipp3_installer/installer/urls.py +4 -3
- xmipp3_installer/repository/config.py +225 -227
- xmipp3_installer/repository/config_vars/__init__.py +5 -0
- xmipp3_installer/repository/config_vars/config_values_adapter.py +97 -91
- xmipp3_installer/repository/config_vars/default_values.py +24 -24
- xmipp3_installer/repository/config_vars/variables.py +9 -9
- xmipp3_installer/repository/invalid_config_line.py +17 -0
- xmipp3_installer/shared/file_operations.py +14 -12
- xmipp3_installer/shared/singleton.py +16 -17
- xmipp3_installer-1.1.0.dist-info/METADATA +86 -0
- xmipp3_installer-1.1.0.dist-info/RECORD +70 -0
- {xmipp3_installer-1.0.0.dist-info → xmipp3_installer-1.1.0.dist-info}/WHEEL +1 -1
- xmipp3_installer-1.0.0.dist-info/METADATA +0 -729
- xmipp3_installer-1.0.0.dist-info/RECORD +0 -70
- {xmipp3_installer-1.0.0.dist-info → xmipp3_installer-1.1.0.dist-info}/entry_points.txt +0 -0
- /xmipp3_installer-1.0.0.dist-info/LICENSE → /xmipp3_installer-1.1.0.dist-info/licenses/LICENSE.txt +0 -0
- {xmipp3_installer-1.0.0.dist-info → xmipp3_installer-1.1.0.dist-info}/top_level.txt +0 -0
|
@@ -7,29 +7,29 @@ from xmipp3_installer.application.cli.arguments import params
|
|
|
7
7
|
TAB_SIZE = 4
|
|
8
8
|
|
|
9
9
|
def get_formatting_tabs(text: str) -> str:
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
"""
|
|
11
|
+
### Returns the given text, formatted to expand tabs into a fixed tab size.
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
### Params:
|
|
14
|
+
- text (str): The text to be formatted.
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
### Returns:
|
|
17
|
+
- (str): Formatted text.
|
|
18
|
+
"""
|
|
19
|
+
return text.expandtabs(TAB_SIZE)
|
|
20
20
|
|
|
21
21
|
def get_param_names(param_key: str) -> List[str]:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
22
|
+
"""
|
|
23
|
+
### Returns the list of possible names a given param has.
|
|
24
|
+
|
|
25
|
+
#### Params:
|
|
26
|
+
- param_key (str): Key to find the param.
|
|
27
|
+
|
|
28
|
+
#### Returns:
|
|
29
|
+
- (list[str]): Names of the given param.
|
|
30
|
+
"""
|
|
31
|
+
names = [
|
|
32
|
+
params.PARAMS[param_key].get(params.SHORT_VERSION, ''),
|
|
33
|
+
params.PARAMS[param_key].get(params.LONG_VERSION, '')
|
|
34
|
+
]
|
|
35
|
+
return [name for name in names if name]
|
|
@@ -6,87 +6,105 @@ from xmipp3_installer.application.cli.parsers.base_help_formatter import BaseHel
|
|
|
6
6
|
from xmipp3_installer.application.logger.logger import logger
|
|
7
7
|
|
|
8
8
|
class GeneralHelpFormatter(BaseHelpFormatter):
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
9
|
+
"""### Overrides the default help formatter to display a custom help message."""
|
|
10
|
+
|
|
11
|
+
def format_help(self):
|
|
12
|
+
"""### Prints the help message of the argument parser."""
|
|
13
|
+
help_message = "Run Xmipp's installer script\n\nUsage: xmipp [options]\n"
|
|
14
|
+
for section in modes.MODES.keys():
|
|
15
|
+
help_message += self.__get_section_message(section)
|
|
16
|
+
help_message += f"\n{self.__get_epilog()}"
|
|
17
|
+
help_message += self.__get_note()
|
|
18
|
+
return format.get_formatting_tabs(help_message)
|
|
19
|
+
|
|
20
|
+
def __get_mode_arg_group_str(self, args: str) -> str:
|
|
21
|
+
"""
|
|
22
|
+
### This method returns the args text for a given arg group.
|
|
23
|
+
|
|
24
|
+
### Params:
|
|
25
|
+
- args (str): Args to format into a message string.
|
|
26
|
+
|
|
27
|
+
### Returns:
|
|
28
|
+
- (str): Args text for given mode.
|
|
29
|
+
"""
|
|
30
|
+
param_names = []
|
|
31
|
+
for param in args:
|
|
32
|
+
param_name = self._get_param_first_name(param)
|
|
33
|
+
if param_name:
|
|
34
|
+
param_names.append(f'[{param_name}]')
|
|
35
|
+
return ' '.join(param_names)
|
|
36
|
+
|
|
37
|
+
def __get_mode_args_str(self, mode: str) -> str:
|
|
38
|
+
"""
|
|
39
|
+
### This method returns the args text for a given mode.
|
|
40
|
+
|
|
41
|
+
### Params:
|
|
42
|
+
- mode (str): Mode to get args text for.
|
|
43
|
+
|
|
44
|
+
### Returns:
|
|
45
|
+
- (str): Args text for given mode.
|
|
46
|
+
"""
|
|
47
|
+
args = modes.MODE_ARGS[mode]
|
|
48
|
+
if not self._has_mutually_exclusive_groups(args):
|
|
49
|
+
return self.__get_mode_arg_group_str(args)
|
|
50
|
+
|
|
51
|
+
group_strs = [
|
|
52
|
+
self.__get_mode_arg_group_str(arg_group) for arg_group in args
|
|
53
|
+
]
|
|
54
|
+
exclusive_group_str = " | ".join(group_strs)
|
|
55
|
+
return f"({exclusive_group_str})"
|
|
56
|
+
|
|
57
|
+
def __get_mode_args_and_help_str(self, previous_text: str, mode: str) -> str:
|
|
58
|
+
"""
|
|
59
|
+
### This method returns the args and help text for a given mode.
|
|
60
|
+
|
|
61
|
+
### Params:
|
|
62
|
+
- previous_text (str): Text inserted before the one to be returned.
|
|
63
|
+
- mode (str): Mode to get help text for.
|
|
64
|
+
|
|
65
|
+
### Returns:
|
|
66
|
+
- (str): Args and help text for given mode.
|
|
67
|
+
"""
|
|
68
|
+
return self._text_with_limits(
|
|
69
|
+
previous_text + self.__get_mode_args_str(mode),
|
|
70
|
+
self._get_mode_help(mode)
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
@staticmethod
|
|
74
|
+
def __get_epilog() -> str:
|
|
75
|
+
"""
|
|
76
|
+
### Returns the epilogue.
|
|
77
|
+
|
|
78
|
+
#### Returns:
|
|
79
|
+
- (str): Epilogue.
|
|
80
|
+
"""
|
|
81
|
+
epilogue = "Example 1: ./xmipp\n"
|
|
82
|
+
epilogue += "Example 2: ./xmipp compileAndInstall -j 4\n"
|
|
83
|
+
return epilogue
|
|
84
|
+
|
|
85
|
+
@staticmethod
|
|
86
|
+
def __get_note() -> str:
|
|
87
|
+
"""
|
|
88
|
+
### Returns the additional note message.
|
|
89
|
+
|
|
90
|
+
#### Returns:
|
|
91
|
+
- (str): Note message.
|
|
92
|
+
"""
|
|
93
|
+
note_message = "Note: You can also view a specific help message for each mode with \"./xmipp [mode] -h\".\n"
|
|
94
|
+
note_message += f"Example: ./xmipp {modes.MODE_ALL} -h\n"
|
|
95
|
+
return logger.yellow(note_message)
|
|
96
|
+
|
|
97
|
+
def __get_section_message(self, section: str) -> str:
|
|
98
|
+
"""
|
|
99
|
+
### Returns the given section's message.
|
|
100
|
+
|
|
101
|
+
#### Params:
|
|
102
|
+
- section (str): Section name.
|
|
103
|
+
|
|
104
|
+
#### Return:
|
|
105
|
+
- (str): Section's message.
|
|
106
|
+
"""
|
|
107
|
+
section_message = self._get_help_separator() + f"\t# {section} #\n\n"
|
|
108
|
+
for mode in modes.MODES[section].keys():
|
|
109
|
+
section_message += self.__get_mode_args_and_help_str(f"\t{mode} ", mode)
|
|
110
|
+
return section_message
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""### Help formatter specific for non-generic usage modes."""
|
|
2
2
|
|
|
3
|
-
from typing import List
|
|
3
|
+
from typing import List, Union, cast
|
|
4
4
|
|
|
5
5
|
from xmipp3_installer.application.cli import arguments
|
|
6
6
|
from xmipp3_installer.application.cli.arguments import modes, params
|
|
@@ -9,107 +9,146 @@ from xmipp3_installer.application.cli.parsers.base_help_formatter import BaseHel
|
|
|
9
9
|
from xmipp3_installer.application.logger.logger import logger
|
|
10
10
|
|
|
11
11
|
class ModeHelpFormatter(BaseHelpFormatter):
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
12
|
+
"""### Overrides the default help formatter to display a custom help message deppending on the mode selected."""
|
|
13
|
+
|
|
14
|
+
def format_help(self):
|
|
15
|
+
"""### This method prints the help message of the argument parser."""
|
|
16
|
+
mode = self.__get_mode()
|
|
17
|
+
help_message = f"{self._get_mode_help(mode, general=False)}\n\n"
|
|
18
|
+
help_message += self.__get_args_message(mode)
|
|
19
|
+
help_message += self.__get_examples_message(mode)
|
|
20
|
+
return format.get_formatting_tabs(help_message)
|
|
21
|
+
|
|
22
|
+
def __get_mode(self):
|
|
23
|
+
"""
|
|
24
|
+
### Returns the execution mode.
|
|
25
|
+
|
|
26
|
+
#### Returns:
|
|
27
|
+
- (str): Execution mode.
|
|
28
|
+
"""
|
|
29
|
+
# Retrieved from the parent help message
|
|
30
|
+
# Message received is the format_help output of the main parser's
|
|
31
|
+
# formatter, adding the mode at the end
|
|
32
|
+
return self._prog.split(' ')[-1]
|
|
33
|
+
|
|
34
|
+
def __get_args_message(self, mode: str) -> str:
|
|
35
|
+
"""
|
|
36
|
+
### Returns the help section containing all the parameters.
|
|
37
|
+
|
|
38
|
+
#### Params:
|
|
39
|
+
- mode (str): Usage mode selected.
|
|
40
|
+
|
|
41
|
+
#### Returns:
|
|
42
|
+
- (str): Help section containing all parameters.
|
|
43
|
+
"""
|
|
44
|
+
args = modes.MODE_ARGS[mode]
|
|
45
|
+
help_message = ''
|
|
46
|
+
options_str = ''
|
|
47
|
+
separator = ''
|
|
48
|
+
|
|
49
|
+
if len(args) > 0:
|
|
50
|
+
arg_names = [
|
|
51
|
+
self._get_param_first_name(arg_name) for arg_name in self.__flatten_args(args)
|
|
52
|
+
]
|
|
53
|
+
if self._has_mutually_exclusive_groups(args):
|
|
54
|
+
help_message += logger.yellow(
|
|
55
|
+
"Important: In this mode, there are mutually exclusive groups of params. "
|
|
56
|
+
"You can only use from one of them at a time.\n"
|
|
57
|
+
)
|
|
58
|
+
if self.__args_contain_optional(arg_names):
|
|
59
|
+
help_message += logger.yellow("Note: only params starting with '-' are optional. The rest are required.\n")
|
|
60
|
+
options_str = ' [options]'
|
|
61
|
+
separator = self._get_help_separator() + '\t# Options #\n\n'
|
|
62
|
+
|
|
63
|
+
help_message += f'Usage: {arguments.XMIPP_PROGRAM_NAME} {mode}{options_str}\n{separator}'
|
|
64
|
+
help_message += self.__get_args_info(args)
|
|
65
|
+
return help_message
|
|
66
|
+
|
|
67
|
+
@staticmethod
|
|
68
|
+
def __args_contain_optional(arg_names: List[str]) -> bool:
|
|
69
|
+
"""
|
|
70
|
+
### Returns True if the param name list contains at least one optional param.
|
|
71
|
+
|
|
72
|
+
### Params:
|
|
73
|
+
- arg_names (list[str]): List containing the param names.
|
|
74
|
+
|
|
75
|
+
### Returns:
|
|
76
|
+
- (bool): True if there is at least one optional param. False otherwise.
|
|
77
|
+
"""
|
|
78
|
+
for name in arg_names:
|
|
79
|
+
if name.startswith('-'):
|
|
80
|
+
return True
|
|
81
|
+
return False
|
|
82
|
+
|
|
83
|
+
def __get_args_info(self, args: List[Union[str, List[str]]]) -> str:
|
|
84
|
+
"""
|
|
85
|
+
### Returns the info of each param.
|
|
86
|
+
|
|
87
|
+
#### Params:
|
|
88
|
+
- args (list[str]): List of parameters.
|
|
89
|
+
|
|
90
|
+
#### Returns:
|
|
91
|
+
- (str): Info of all parameters.
|
|
92
|
+
"""
|
|
93
|
+
if not self._has_mutually_exclusive_groups(args):
|
|
94
|
+
return self.__get_args_group_info(cast(List[str], args))
|
|
95
|
+
return "\t---------------\n".join([self.__get_args_group_info(cast(List[str], group)) for group in args])
|
|
96
|
+
|
|
97
|
+
def __get_args_group_info(self, args: List[str]) -> str:
|
|
98
|
+
"""
|
|
99
|
+
### Returns the info of each param.
|
|
100
|
+
|
|
101
|
+
#### Params:
|
|
102
|
+
- args (list[str]): List of parameters.
|
|
103
|
+
|
|
104
|
+
#### Returns:
|
|
105
|
+
- (str): Info of all parameters.
|
|
106
|
+
"""
|
|
107
|
+
help_message = ''
|
|
108
|
+
for arg in args:
|
|
109
|
+
help_message += self._text_with_limits(
|
|
110
|
+
'\t' + ', '.join(format.get_param_names(arg)),
|
|
111
|
+
params.PARAMS[arg][params.DESCRIPTION]
|
|
112
|
+
)
|
|
113
|
+
return help_message
|
|
114
|
+
|
|
115
|
+
@staticmethod
|
|
116
|
+
def __get_examples_message(mode: str) -> str:
|
|
117
|
+
"""
|
|
118
|
+
### Returns the message section containig usage examples.
|
|
119
|
+
|
|
120
|
+
#### Params:
|
|
121
|
+
- mode (str): Usage mode selected.
|
|
122
|
+
|
|
123
|
+
#### Returns:
|
|
124
|
+
- (str): Message section containing usage examples.
|
|
125
|
+
"""
|
|
126
|
+
help_message = ''
|
|
127
|
+
examples = modes.MODE_EXAMPLES[mode]
|
|
128
|
+
for i in range(len(examples)):
|
|
129
|
+
number_str = '' if len(examples) == 1 else f' {i+1}'
|
|
130
|
+
help_message += f"\nExample{number_str}: {examples[i]}"
|
|
131
|
+
|
|
132
|
+
if len(examples) > 0:
|
|
133
|
+
help_message += '\n'
|
|
134
|
+
|
|
135
|
+
return help_message
|
|
136
|
+
|
|
137
|
+
def __flatten_args(self, args: List[Union[str, List[str]]]) -> List[str]:
|
|
138
|
+
"""
|
|
139
|
+
### Flattens a list of arguments.
|
|
140
|
+
|
|
141
|
+
#### Params:
|
|
142
|
+
- args (list[str | list[str]]): A list of arguments, which can include nested lists representing mutually exclusive groups.
|
|
143
|
+
|
|
144
|
+
#### Returns:
|
|
145
|
+
- (list[str]): A flattened list of arguments, where nested groups are expanded into a single list.
|
|
146
|
+
"""
|
|
147
|
+
if not self._has_mutually_exclusive_groups(args):
|
|
148
|
+
return cast(List[str], args)
|
|
149
|
+
|
|
150
|
+
return [
|
|
151
|
+
arg
|
|
152
|
+
for arg_group in args
|
|
153
|
+
for arg in arg_group
|
|
154
|
+
]
|
|
@@ -17,12 +17,12 @@ IO_ERROR = 7
|
|
|
17
17
|
# Error messages
|
|
18
18
|
__CHECK_LOG_MESSAGE = f'Check the inside file \'{paths.LOG_FILE}\'.'
|
|
19
19
|
ERROR_CODES = {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
INTERRUPTED_ERROR: ['Process was interrupted by the user.', ''],
|
|
21
|
+
UNKOW_ERROR: ['', ''],
|
|
22
|
+
SOURCE_CLONE_ERROR: ['Error cloning xmipp repository with git.', 'Please review the internet connection and the git package.'],
|
|
23
|
+
CMAKE_ERROR: ['There was an error with CMake.', f'Please install it by following the instructions at {CMAKE_INSTALL_DOCS_URL}'],
|
|
24
|
+
CMAKE_CONFIGURE_ERROR: ['Error configuring with CMake.', __CHECK_LOG_MESSAGE],
|
|
25
|
+
CMAKE_COMPILE_ERROR: ['Error compiling with CMake.', __CHECK_LOG_MESSAGE],
|
|
26
|
+
CMAKE_INSTALL_ERROR: ['Error installing with CMake.', __CHECK_LOG_MESSAGE],
|
|
27
|
+
IO_ERROR: ['Input/output error.', 'This error can be caused by the installer not being able to read/write/create/delete a file. Check your permissions on this directory.']
|
|
28
28
|
}
|