Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions installation_and_upgrade/ibex_install_utils/install_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ def run_test_update(self) -> None:
self._server_tasks.install_settings()
self._server_tasks.install_ibex_server()
self._server_tasks.update_icp(self.icp_in_labview_modules())
self._python_tasks.install_genie_python3()
self._mysql_tasks.install_mysql()
self._server_tasks.upgrade_instrument_configuration()
self._server_tasks.install_wiring_tables()
Expand All @@ -148,7 +147,6 @@ def remove_all_and_install_client_and_server(self) -> None:
self._backup_tasks.remove_old_ibex()
self._server_tasks.install_ibex_server(use_old_galil)
self._server_tasks.update_icp(self.icp_in_labview_modules(), register_icp=False)
self._python_tasks.install_genie_python3()
self._client_tasks.install_ibex_client()
self._server_tasks.upgrade_instrument_configuration()
self._server_tasks.install_shared_scripts_repository()
Expand All @@ -174,7 +172,6 @@ def run_instrument_install(self) -> None:
self._server_tasks.install_ibex_server()
self._system_tasks.create_virtual_envs()
self._server_tasks.update_icp(self.icp_in_labview_modules())
self._python_tasks.install_genie_python3()
self._mysql_tasks.install_mysql()
self._client_tasks.install_ibex_client()
self._git_tasks.checkout_to_release_branch()
Expand Down Expand Up @@ -236,7 +233,6 @@ def run_instrument_deploy_main(self) -> None:
self._server_tasks.install_ibex_server()
self._system_tasks.create_virtual_envs()
self._server_tasks.update_icp(self.icp_in_labview_modules())
self._python_tasks.install_genie_python3()
self._mysql_tasks.install_mysql()
self._system_tasks.install_or_upgrade_vc_redist()
self._client_tasks.install_ibex_client()
Expand Down Expand Up @@ -303,7 +299,6 @@ def run_vhd_creation(self) -> None:
self._vhd_tasks.request_mount_vhds()
try:
self._server_tasks.install_ibex_server()
self._python_tasks.install_genie_python3()
self._mysql_tasks.install_mysql_for_vhd()
self._client_tasks.install_ibex_client()
self._server_tasks.setup_config_repository()
Expand Down
20 changes: 6 additions & 14 deletions installation_and_upgrade/ibex_install_utils/tasks/python_tasks.py
Original file line number Diff line number Diff line change
@@ -1,38 +1,30 @@
import os

from ibex_install_utils.run_process import RunProcess
from ibex_install_utils.task import task
from ibex_install_utils.tasks import BaseTasks
from ibex_install_utils.tasks.common_paths import APPS_BASE_DIR, INSTRUMENT_BASE_DIR
from ibex_install_utils.tasks.common_paths import INSTRUMENT_BASE_DIR


class PythonTasks(BaseTasks):
"""
Tasks relating to installing or maintaining an installation of genie_python.
"""

@task("Installing Genie Python 3")
def install_genie_python3(self):
"""
Install ibex server.
"""
self._file_utils.mkdir_recursive(APPS_BASE_DIR)
RunProcess(self._genie_python_3_source_dir, "genie_python_install.bat").run()

@task("Update script generator script definitions")
def update_script_definitions(self):
def update_script_definitions(self) -> None:
"""
Update (or at least ask the user to update) the script definitions used by the script generator.
Prompt the user to update the script definitions used by the script generator.
"""
if os.path.exists("C:\\ScriptGeneratorConfigs") or os.path.exists("C:\\ScriptDefinitions"):
print(
"Update the script definitions for the script generator (likely in C:\\ScriptDefinitions or C:\\ScriptGeneratorConfigs)."
"Update the script definitions for the script generator"
" (likely in C:\\ScriptDefinitions or C:\\ScriptGeneratorConfigs)."
+ "Check with the scientists that it is ok to do this."
+ "You can do it by git pull, you may need to merge changes made on the instrument."
)

@task("Remove instrument scripts githooks")
def remove_instrument_script_githooks(self):
def remove_instrument_script_githooks(self) -> None:
"""
Remove the githooks in the instrument scripts dierectory
"""
Expand Down
Loading