Skip to content

Commit 0db190d

Browse files
committed
Update class loading and compilation settings to use 'uk' package and enhance test fixture for unit tests
1 parent 11aad71 commit 0db190d

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

src/iop/_utils.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def setup(path:Optional[str] = None):
4747
path = None
4848

4949
if path:
50-
_Utils.raise_on_error(_iris.get_iris().cls('%SYSTEM.OBJ').LoadDir(path,'cubk',"*.cls",1))
50+
_Utils.raise_on_error(_iris.get_iris().cls('%SYSTEM.OBJ').LoadDir(path,'uk',"*.cls",1))
5151

5252
# for retrocompatibility load grongier.pex
5353
try:
@@ -56,7 +56,11 @@ def setup(path:Optional[str] = None):
5656
path = None
5757

5858
if path:
59-
_Utils.raise_on_error(_iris.get_iris().cls('%SYSTEM.OBJ').LoadDir(path,'cubk',"*.cls",1))
59+
_Utils.raise_on_error(_iris.get_iris().cls('%SYSTEM.OBJ').LoadDir(path,'uk',"*.cls",1))
60+
61+
# compile loaded classes by package (avoids parallel worker crashes in IRIS 2026.1+)
62+
_Utils.raise_on_error(_iris.get_iris().cls('%SYSTEM.OBJ').Compile("IOP.*", 'cb'))
63+
_Utils.raise_on_error(_iris.get_iris().cls('%SYSTEM.OBJ').Compile("Grongier.*", 'cb'))
6064

6165
@staticmethod
6266
def register_message_schema(msg_cls: type):

src/tests/e2e/local/bench/settings.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@
1515
# create a strings with current_dir and src_dir with a | separator
1616
classpaths = f"{current_dir}|{src_dir}"
1717

18-
# load Cos Classes
18+
# load Cos Classes (load source first, then compile in a single pass)
1919
iris.cls('%SYSTEM.OBJ').LoadDir(os.path.join(
20-
current_dir, 'cls'), 'cubk', "*.cls", 1)
20+
current_dir, 'cls'), 'uk', "*.cls", 1)
21+
iris.cls('%SYSTEM.OBJ').Compile("Bench.*", 'cb')
2122

2223
CLASSES = {
2324
"Python.BenchIoPOperation": BenchIoPOperation,

src/tests/e2e/local/test_dtl.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
# Fixtures
1212
@pytest.fixture
1313
def load_cls_files():
14-
_Utils.raise_on_error(iris.cls('%SYSTEM.OBJ').LoadDir(TEST_DATA_DIR, 'cubk', "*.cls", 1))
14+
_Utils.raise_on_error(iris.cls('%SYSTEM.OBJ').LoadDir(TEST_DATA_DIR, 'uk', "*.cls", 1))
15+
_Utils.raise_on_error(iris.cls('%SYSTEM.OBJ').Compile("UnitTest.*", 'cb'))
1516

1617
@pytest.fixture
1718
def iop_message():

0 commit comments

Comments
 (0)