xmipp3-installer 2.0.3__tar.gz → 2.1.0__tar.gz

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.
Files changed (75) hide show
  1. {xmipp3_installer-2.0.3/src/xmipp3_installer.egg-info → xmipp3_installer-2.1.0}/PKG-INFO +12 -4
  2. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/README.md +7 -0
  3. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/pyproject.toml +7 -4
  4. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/api_client/assembler/installation_info_assembler.py +17 -1
  5. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/installer/modes/mode_get_sources_executor.py +1 -1
  6. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/repository/config.py +12 -0
  7. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/repository/config_vars/variables.py +3 -0
  8. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0/src/xmipp3_installer.egg-info}/PKG-INFO +12 -4
  9. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer.egg-info/requires.txt +7 -2
  10. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/LICENSE.txt +0 -0
  11. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/setup.cfg +0 -0
  12. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/__init__.py +0 -0
  13. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/__main__.py +0 -0
  14. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/api_client/api_client.py +0 -0
  15. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/application/__init__.py +0 -0
  16. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/application/cli/__init__.py +0 -0
  17. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/application/cli/arguments/__init__.py +0 -0
  18. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/application/cli/arguments/modes.py +0 -0
  19. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/application/cli/arguments/params.py +0 -0
  20. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/application/cli/cli.py +0 -0
  21. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/application/cli/parsers/base_help_formatter.py +0 -0
  22. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/application/cli/parsers/error_handler_parser.py +0 -0
  23. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/application/cli/parsers/format.py +0 -0
  24. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/application/cli/parsers/general_help_formatter.py +0 -0
  25. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/application/cli/parsers/mode_help_formatter.py +0 -0
  26. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/application/logger/__init__.py +0 -0
  27. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/application/logger/errors.py +0 -0
  28. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/application/logger/logger.py +0 -0
  29. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/application/logger/predefined_messages.py +0 -0
  30. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/application/user_interactions.py +0 -0
  31. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/installer/__init__.py +0 -0
  32. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/installer/constants/__init__.py +0 -0
  33. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/installer/constants/paths.py +0 -0
  34. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/installer/handlers/__init__.py +0 -0
  35. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/installer/handlers/cmake/__init__.py +0 -0
  36. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/installer/handlers/cmake/cmake_constants.py +0 -0
  37. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/installer/handlers/cmake/cmake_handler.py +0 -0
  38. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/installer/handlers/conda_handler.py +0 -0
  39. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/installer/handlers/generic_package_handler.py +0 -0
  40. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/installer/handlers/git_handler.py +0 -0
  41. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/installer/handlers/shell_handler.py +0 -0
  42. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/installer/handlers/versions_manager.py +0 -0
  43. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/installer/installer_service.py +0 -0
  44. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/installer/modes/__init__.py +0 -0
  45. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/installer/modes/mode_all_executor.py +0 -0
  46. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/installer/modes/mode_clean/__init__.py +0 -0
  47. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/installer/modes/mode_clean/mode_clean_all_executor.py +0 -0
  48. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/installer/modes/mode_clean/mode_clean_bin_executor.py +0 -0
  49. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/installer/modes/mode_clean/mode_clean_executor.py +0 -0
  50. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/installer/modes/mode_cmake/__init__.py +0 -0
  51. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/installer/modes/mode_cmake/mode_cmake_executor.py +0 -0
  52. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/installer/modes/mode_cmake/mode_compile_and_install_executor.py +0 -0
  53. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/installer/modes/mode_cmake/mode_config_build_executor.py +0 -0
  54. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/installer/modes/mode_config_executor.py +0 -0
  55. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/installer/modes/mode_executor.py +0 -0
  56. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/installer/modes/mode_git_executor.py +0 -0
  57. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/installer/modes/mode_selector.py +0 -0
  58. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/installer/modes/mode_sync/mode_add_model_executor.py +0 -0
  59. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/installer/modes/mode_sync/mode_get_models_executor.py +0 -0
  60. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/installer/modes/mode_sync/mode_sync_executor.py +0 -0
  61. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/installer/modes/mode_sync/mode_test_executor.py +0 -0
  62. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/installer/modes/mode_version_executor.py +0 -0
  63. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/installer/orquestrator.py +0 -0
  64. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/installer/urls.py +0 -0
  65. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/repository/__init__.py +0 -0
  66. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/repository/config_vars/__init__.py +0 -0
  67. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/repository/config_vars/config_values_adapter.py +0 -0
  68. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/repository/config_vars/default_values.py +0 -0
  69. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/repository/invalid_config_line.py +0 -0
  70. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/shared/file_operations.py +0 -0
  71. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer/shared/singleton.py +0 -0
  72. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer.egg-info/SOURCES.txt +0 -0
  73. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer.egg-info/dependency_links.txt +0 -0
  74. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer.egg-info/entry_points.txt +0 -0
  75. {xmipp3_installer-2.0.3 → xmipp3_installer-2.1.0}/src/xmipp3_installer.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
- Name: xmipp3_installer
3
- Version: 2.0.3
2
+ Name: xmipp3-installer
3
+ Version: 2.1.0
4
4
  Summary: Package to handle the installation of Xmipp3
5
5
  Author-email: Martín Salinas <ssalinasmartin@gmail.com>
6
6
  License: GPL-3.0-only
@@ -22,9 +22,10 @@ License-File: LICENSE.txt
22
22
  Requires-Dist: typing-extensions>=4.12
23
23
  Requires-Dist: distro>=1.8.0
24
24
  Provides-Extra: test
25
- Requires-Dist: pytest==8.*; extra == "test"
25
+ Requires-Dist: pytest==8.*; python_version < "3.10" and extra == "test"
26
+ Requires-Dist: pytest==9.*; python_version >= "3.10" and extra == "test"
26
27
  Requires-Dist: pytest-cov==5.*; python_version < "3.9" and extra == "test"
27
- Requires-Dist: pytest-cov==6.*; python_version >= "3.9" and extra == "test"
28
+ Requires-Dist: pytest-cov==7.*; python_version >= "3.9" and extra == "test"
28
29
  Requires-Dist: pytest-subprocess==1.*; extra == "test"
29
30
  Requires-Dist: pytest-localserver==0.*; extra == "test"
30
31
  Requires-Dist: ruff==0.*; extra == "test"
@@ -48,6 +49,13 @@ To run such help, once the package is installed, run:
48
49
  xmipp3_installer -h
49
50
  ```
50
51
 
52
+ ## Installation telemetry
53
+ This installer collects **basic information about your installation environment** (such as library versions, system architecture, and operating system) to improve compatibility, performance, and stability.
54
+
55
+ If you prefer **not to send this data**, you can disable data collection by simply setting the environment variable `XMIPP3_SEND_INSTALLATION_STATISTICS=OFF` before running the installation command.
56
+
57
+ For more information, please visit [the documentation](https://i2pc.github.io/docs/Others/Enhancing/index.html#data-collection).
58
+
51
59
  ## Testing the code
52
60
  In order to run the tests for this project, the project needs to be installed in development mode and also the test dependencies need to be installed.
53
61
 
@@ -14,6 +14,13 @@ To run such help, once the package is installed, run:
14
14
  xmipp3_installer -h
15
15
  ```
16
16
 
17
+ ## Installation telemetry
18
+ This installer collects **basic information about your installation environment** (such as library versions, system architecture, and operating system) to improve compatibility, performance, and stability.
19
+
20
+ If you prefer **not to send this data**, you can disable data collection by simply setting the environment variable `XMIPP3_SEND_INSTALLATION_STATISTICS=OFF` before running the installation command.
21
+
22
+ For more information, please visit [the documentation](https://i2pc.github.io/docs/Others/Enhancing/index.html#data-collection).
23
+
17
24
  ## Testing the code
18
25
  In order to run the tests for this project, the project needs to be installed in development mode and also the test dependencies need to be installed.
19
26
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
- name = "xmipp3_installer"
3
- version = "2.0.3"
2
+ name = "xmipp3-installer"
3
+ version = "2.1.0"
4
4
  authors = [
5
5
  { name = "Martín Salinas", email = "ssalinasmartin@gmail.com" },
6
6
  ]
@@ -32,9 +32,10 @@ build-backend = "setuptools.build_meta"
32
32
 
33
33
  [project.optional-dependencies]
34
34
  test = [
35
- "pytest==8.*",
35
+ "pytest==8.*; python_version < '3.10'",
36
+ "pytest==9.*; python_version >= '3.10'",
36
37
  "pytest-cov==5.*; python_version < '3.9'",
37
- "pytest-cov==6.*; python_version >= '3.9'",
38
+ "pytest-cov==7.*; python_version >= '3.9'",
38
39
  "pytest-subprocess==1.*",
39
40
  "pytest-localserver==0.*",
40
41
  "ruff==0.*",
@@ -51,3 +52,5 @@ xmipp3_installer = "xmipp3_installer.__main__:main"
51
52
 
52
53
 
53
54
 
55
+
56
+
@@ -65,7 +65,7 @@ def get_installation_info(version_manager: versions_manager.VersionsManager, ret
65
65
  "installedByScipion": environment_info[3]
66
66
  },
67
67
  "returnCode": ret_code,
68
- "logTail": environment_info[4] if ret_code else None # Only needed if something went wrong
68
+ "logTail": __anonymize_log_tail(environment_info[4]) if ret_code else None # Only needed if something went wrong
69
69
  }
70
70
 
71
71
  def get_os_release_name() -> str:
@@ -136,6 +136,22 @@ def __get_log_tail() -> Optional[str]:
136
136
  )
137
137
  return output if ret_code == 0 else None
138
138
 
139
+ def __anonymize_log_tail(log_text: Optional[str]) -> Optional[str]:
140
+ """
141
+ ### Anonymizes usernames in a log string.
142
+
143
+ #### Args:
144
+ - log_text (str | None): Log text to anonymize.
145
+
146
+ #### Returns:
147
+ - (str | None): Log text with occurrences of /home/<username> replaced by /home/REDACTED, or None if input was None.
148
+ """
149
+ if log_text is None:
150
+ return
151
+
152
+ pattern = re.compile(r'(/home/)([^/\s]+)')
153
+ return pattern.sub(r'\1REDACTED', log_text)
154
+
139
155
  def __get_mac_address() -> Optional[str]:
140
156
  """
141
157
  ### Returns a physical MAC address for this machine. It prioritizes ethernet over wireless.
@@ -132,7 +132,7 @@ def _run_source_command(source_name: str, source_repo: str, target_branch: Optio
132
132
  )
133
133
 
134
134
  branch_str = (
135
- f"{params.PARAMS[params.PARAM_BRANCH][params.LONG_VERSION]} {target_branch}"
135
+ f" {params.PARAMS[params.PARAM_BRANCH][params.LONG_VERSION]} {target_branch}"
136
136
  if target_branch else ""
137
137
  )
138
138
  return shell_handler.run_shell_command(f"git clone{branch_str} {source_repo}.git", cwd=paths.SOURCES_PATH)
@@ -29,6 +29,7 @@ class ConfigurationFileHandler(Singleton):
29
29
  self.show_errors = show_errors
30
30
  self.values = {}
31
31
  self.read_config()
32
+ self.read_env_variables()
32
33
  self.last_modified = self.__read_config_date()
33
34
 
34
35
  def read_config(self):
@@ -50,6 +51,17 @@ class ConfigurationFileHandler(Singleton):
50
51
  show_warnings=self.show_errors
51
52
  )
52
53
  }
54
+
55
+ def read_env_variables(self):
56
+ """### Reads the config variables present in the environment and updates the stored values with them."""
57
+ raw_variables = {
58
+ key[len(variables.ENVIRONMENT_VARIABLES_PREFIX):]: value
59
+ for key, value in os.environ.items()
60
+ if key.startswith(variables.ENVIRONMENT_VARIABLES_PREFIX)
61
+ }
62
+ self.values.update(
63
+ config_values_adapter.get_context_values_from_file_values(raw_variables)
64
+ )
53
65
 
54
66
  def write_config(self, overwrite: bool=False):
55
67
  """
@@ -46,3 +46,6 @@ CONFIG_VARIABLES = {
46
46
 
47
47
  # Do not pass this variables to CMake, only for installer logic
48
48
  INTERNAL_LOGIC_VARS = [SEND_INSTALLATION_STATISTICS, CMAKE, BUILD_TYPE]
49
+
50
+ # Prefix to be used when setting config variables in the environment
51
+ ENVIRONMENT_VARIABLES_PREFIX = "XMIPP3_"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
- Name: xmipp3_installer
3
- Version: 2.0.3
2
+ Name: xmipp3-installer
3
+ Version: 2.1.0
4
4
  Summary: Package to handle the installation of Xmipp3
5
5
  Author-email: Martín Salinas <ssalinasmartin@gmail.com>
6
6
  License: GPL-3.0-only
@@ -22,9 +22,10 @@ License-File: LICENSE.txt
22
22
  Requires-Dist: typing-extensions>=4.12
23
23
  Requires-Dist: distro>=1.8.0
24
24
  Provides-Extra: test
25
- Requires-Dist: pytest==8.*; extra == "test"
25
+ Requires-Dist: pytest==8.*; python_version < "3.10" and extra == "test"
26
+ Requires-Dist: pytest==9.*; python_version >= "3.10" and extra == "test"
26
27
  Requires-Dist: pytest-cov==5.*; python_version < "3.9" and extra == "test"
27
- Requires-Dist: pytest-cov==6.*; python_version >= "3.9" and extra == "test"
28
+ Requires-Dist: pytest-cov==7.*; python_version >= "3.9" and extra == "test"
28
29
  Requires-Dist: pytest-subprocess==1.*; extra == "test"
29
30
  Requires-Dist: pytest-localserver==0.*; extra == "test"
30
31
  Requires-Dist: ruff==0.*; extra == "test"
@@ -48,6 +49,13 @@ To run such help, once the package is installed, run:
48
49
  xmipp3_installer -h
49
50
  ```
50
51
 
52
+ ## Installation telemetry
53
+ This installer collects **basic information about your installation environment** (such as library versions, system architecture, and operating system) to improve compatibility, performance, and stability.
54
+
55
+ If you prefer **not to send this data**, you can disable data collection by simply setting the environment variable `XMIPP3_SEND_INSTALLATION_STATISTICS=OFF` before running the installation command.
56
+
57
+ For more information, please visit [the documentation](https://i2pc.github.io/docs/Others/Enhancing/index.html#data-collection).
58
+
51
59
  ## Testing the code
52
60
  In order to run the tests for this project, the project needs to be installed in development mode and also the test dependencies need to be installed.
53
61
 
@@ -2,15 +2,20 @@ typing-extensions>=4.12
2
2
  distro>=1.8.0
3
3
 
4
4
  [test]
5
- pytest==8.*
6
5
  pytest-subprocess==1.*
7
6
  pytest-localserver==0.*
8
7
  ruff==0.*
9
8
  cmake==4.*
10
9
  ninja==1.*
11
10
 
11
+ [test:python_version < "3.10"]
12
+ pytest==8.*
13
+
12
14
  [test:python_version < "3.9"]
13
15
  pytest-cov==5.*
14
16
 
17
+ [test:python_version >= "3.10"]
18
+ pytest==9.*
19
+
15
20
  [test:python_version >= "3.9"]
16
- pytest-cov==6.*
21
+ pytest-cov==7.*