Skip to content

Commit 5cfae5f

Browse files
committed
review comments
1 parent 43a6566 commit 5cfae5f

File tree

8 files changed

+9
-41
lines changed

8 files changed

+9
-41
lines changed

installation_and_upgrade/calibration_files_updater.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def __exit__(self, *args: Any) -> None: # noqa: ANN401
7676

7777
def get_instrument_hosts() -> Generator[str, None, None]:
7878
"""
79-
Returns: A collection of instrument host names
79+
Returns: A generator yielding instrument host names
8080
"""
8181
instlist_raw = caget("CS:INSTLIST")
8282
if instlist_raw is None:

installation_and_upgrade/developer_update.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ IF ERRORLEVEL 1 (
1919
)
2020

2121
start /wait cmd /c "%START_IBEX%"
22-
call rmdir /s /q %UV_TEMP_VENV%
22+
call rmdir /s /q %UV_TEMP_VENV%

installation_and_upgrade/ibex_install_utils/install_tasks.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -267,32 +267,6 @@ def run_instrument_deploy_pre_stop(self) -> None:
267267
Current the server can not be started or stopped in this python script.
268268
"""
269269
self._system_tasks.user_confirm_upgrade_type_on_machine("Client/Server Machine")
270-
271-
# Check whether inst is SECI or not
272-
try:
273-
central_inst_info = caget("CS:INSTLIST")
274-
assert central_inst_info is not None and isinstance(central_inst_info, np.ndarray)
275-
central_inst_info = FileUtils.dehex_and_decompress(central_inst_info.tobytes()).decode(
276-
"utf-8"
277-
)
278-
central_inst_info = json.loads(central_inst_info)
279-
except Exception:
280-
central_inst_info = {}
281-
282-
_, _, my_pv_prefix = get_machine_details_from_identifier()
283-
284-
central_specific_inst_info = None
285-
for inst in central_inst_info:
286-
if inst["name"] == my_pv_prefix[3:-1]:
287-
central_specific_inst_info = inst
288-
break
289-
290-
if central_specific_inst_info is None:
291-
warnings.warn("Unable to find instrument in central list of instruments.", UserWarning)
292-
else:
293-
if central_specific_inst_info["seci"] == "true":
294-
self._system_tasks.record_running_vis()
295-
296270
self._server_tasks.save_motor_blocks_blockserver_to_file()
297271

298272
def run_truncate_database(self) -> None:

installation_and_upgrade/ibex_install_utils/tasks/system_tasks.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,6 @@ class SystemTasks(BaseTasks):
5959
firewalls, etc.
6060
"""
6161

62-
@task("Record running LabVIEW VIs or any relevant looking other programs")
63-
def record_running_vis(self) -> None:
64-
"""
65-
Get user to record running vis
66-
"""
67-
self.prompt.prompt_and_raise_if_not_yes(
68-
"Write down any LabVIEW VIs/relevant looking programs which are running for use later?"
69-
)
7062

7163
@task("Upgrading Notepad++. Please follow system dialogs")
7264
def upgrade_notepad_pp(self) -> None:

installation_and_upgrade/instrument_install.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ if %errorlevel% neq 0 goto ERROR
88

99
set "SOURCE=\\isis.cclrc.ac.uk\inst$\Kits$\CompGroup\ICP\Releases"
1010

11+
call "%~dp0set_epics_ca_addr_list.bat"
1112
call "%~dp0install_or_update_uv.bat"
1213
call "%~dp0set_up_venv.bat"
1314
if %errorlevel% neq 0 goto ERROR

installation_and_upgrade/instrument_test.bat

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
setlocal EnableDelayedExpansion
22
set "SOURCE=\\isis.cclrc.ac.uk\inst$\Kits$\CompGroup\ICP\Releases"
33

4+
call "%~dp0set_epics_ca_addr_list.bat"
45
call "%~dp0install_or_update_uv.bat"
56
call "%~dp0set_up_venv.bat"
67
if %errorlevel% neq 0 goto ERROR
78

8-
call "%LATEST_PYTHON%" "%~dp0IBEX_upgrade.py" --release_dir "%SOURCE%" --confirm_step instrument_test
9+
call python "%~dp0IBEX_upgrade.py" --release_dir "%SOURCE%" --confirm_step instrument_test
910
if %errorlevel% neq 0 goto ERROR
1011

1112
call rmdir /s /q %UV_TEMP_VENV%

installation_and_upgrade/set_up_venv.bat

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ REM sets up temporary virtual environment for deployment and installs requiremen
33
set UV_TEMP_VENV=C:\Instrument\Var\tmp\.deployscriptvenv
44
set UV_PYTHON=3.12
55
REM use the on-disk location as we'll be using a venv anyway so it won't dirty the install
6-
uv venv %UV_TEMP_VENV%
7-
call %UV_TEMP_VENV%\scripts\activate
8-
uv pip install -r %~dp0\requirements.txt --no-build
6+
uv venv "%UV_TEMP_VENV%"
7+
call "%UV_TEMP_VENV%\scripts\activate"
8+
uv pip install -r "%~dp0\requirements.txt" --no-build

installation_and_upgrade/vhd_build.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ IF EXIST "C:\Instrument\Apps\EPICS\stop_ibex_server.bat" (
1212
start /wait cmd /c "C:\Instrument\Apps\EPICS\stop_ibex_server.bat"
1313
)
1414

15-
call "%LATEST_PYTHON%" "%~dp0IBEX_upgrade.py" --kits_icp_dir "%KITS_ICP_PATH%" create_vhds --quiet --no_log_to_var
15+
call python "%~dp0IBEX_upgrade.py" --kits_icp_dir "%KITS_ICP_PATH%" create_vhds --quiet --no_log_to_var
1616
IF %ERRORLEVEL% NEQ 0 (
1717
set errcode = %ERRORLEVEL%
1818
call rmdir /s /q %UV_TEMP_VENV%

0 commit comments

Comments
 (0)