Skip to content
Closed
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
16 changes: 16 additions & 0 deletions src/upgrade_step_from_25p8p0.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from src.file_access import FileAccess
from src.local_logger import LocalLogger
from src.upgrade_step import UpgradeStep
import os

Check failure on line 4 in src/upgrade_step_from_25p8p0.py

View workflow job for this annotation

GitHub Actions / call-workflow / ruff

Ruff (I001)

src/upgrade_step_from_25p8p0.py:1:1: I001 Import block is un-sorted or un-formatted


class UpgradeFrom25p8p0(UpgradeStep):
"""
Adds a task to run the following script at 1 minute intervals:
C:\Instrument\Apps\EPICS\ISIS\inst_servers\master\scripts\copy_bluesky_runs.bat
"""

def perform(self, file_access: FileAccess, logger: LocalLogger):

Check failure on line 13 in src/upgrade_step_from_25p8p0.py

View workflow job for this annotation

GitHub Actions / call-workflow / ruff

Ruff (ANN201)

src/upgrade_step_from_25p8p0.py:13:9: ANN201 Missing return type annotation for public function `perform`
os.system('schtasks /Create /SC MINUTE /TN "bluesky_copier" /TR "C:\\Instrument\\Apps\\'
'EPICS\\ISIS\\inst_servers\\master\\scripts\\copy_bluesky_runs.vbs"')

4 changes: 3 additions & 1 deletion upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from src.upgrade_step_from_15p0p0 import UpgradeFrom15p0p0
from src.upgrade_step_from_25p2p1 import UpgradeFrom25p2p1
from src.upgrade_step_from_25p2p1p1 import UpgradeFrom25p2p1p1
from src.upgrade_step_from_25p8p0 import UpgradeFrom25p8p0
from src.upgrade_step_noop import UpgradeStepNoOp

# A list of upgrade step tuples tuple is name of version to apply the upgrade to and upgrade class.
Expand Down Expand Up @@ -76,10 +77,11 @@
("25.2.1", UpgradeFrom25p2p1()),
("25.2.1.1", UpgradeFrom25p2p1p1()),
("25.2.2", UpgradeStepNoOp()),
("25.8.0", None),
("25.8.0", UpgradeFrom25p8p0()),
("25.8.0.1", None),
# to add step see README.md
## Do not consider dropping the previous last entry even if adding a new step that does nothing.
## Though that version may not have been deployed to any instruments, the config version will exist

Check failure on line 84 in upgrade.py

View workflow job for this annotation

GitHub Actions / call-workflow / ruff

Ruff (E501)

upgrade.py:84:101: E501 Line too long (103 > 100)
## on system test and build servers and probably some developer's machines too and will cause
## an upgrade to abort as it will not be able to find the starting version to upgrade from
]
Expand Down
Loading