From c89138c419aceda7d52aec25531139ac66dd9379 Mon Sep 17 00:00:00 2001 From: PawelPlesniak Date: Tue, 21 Jul 2026 15:57:05 +0200 Subject: [PATCH 1/5] Adding stubs, and their inclusion in the venv --- CMakeLists.txt | 2 ++ python/conffwk/dal.py | 18 ++++++++++++++++++ python/conffwk/py.typed | 0 3 files changed, 20 insertions(+) create mode 100644 python/conffwk/py.typed diff --git a/CMakeLists.txt b/CMakeLists.txt index f448eeb..27f20cb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,3 +34,5 @@ daq_add_application(conffwk_dal_resolve_libs dal_resolve_libs.cxx daq_install() + +install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/python/ DESTINATION ${CMAKE_INSTALL_PYTHONDIR} OPTIONAL FILES_MATCHING PATTERN "py.typed" PATTERN "*.pyi") diff --git a/python/conffwk/dal.py b/python/conffwk/dal.py index 758ab39..085d7b3 100644 --- a/python/conffwk/dal.py +++ b/python/conffwk/dal.py @@ -573,6 +573,23 @@ def pyoksTypes(cls): """Returns a join of this class and base class names""" return cls.__okstypes__ +# The following four classes enable type checking for FSM objects, which are a part of +# the OKS schema, but are not generated by the DAL generator. +class FSMData(DalBase): + """This class is used to represent any FSM data object in the system. """ + pass + +class FSMTransition(DalBase): + """This class is used to represent any FSM transition object in the system. """ + pass + +class FSMxTransition(DalBase): + """This class is used to represent any FSM pre/post transition object in the system. """ + pass + +class FSMAction(DalBase): + """This class is used to represent any FSM action object in the system. """ + pass def get_classes(m): """Returns a map with classes in a module, the key is the class name.""" @@ -727,3 +744,4 @@ def module(name, schema, other_dals=[], backend='oksconflibs', db=None): for k in generate(db, other_dals): retval.__dict__[k.pyclassName()] = k return retval + diff --git a/python/conffwk/py.typed b/python/conffwk/py.typed new file mode 100644 index 0000000..e69de29 From 236d6cdfeefb7a1062503e329addf79bb6f59e96 Mon Sep 17 00:00:00 2001 From: PawelPlesniak Date: Tue, 21 Jul 2026 17:57:49 +0200 Subject: [PATCH 2/5] Removing .pyi files from the venv as the py.typed file is sufficient independently --- CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 27f20cb..f448eeb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,5 +34,3 @@ daq_add_application(conffwk_dal_resolve_libs dal_resolve_libs.cxx daq_install() - -install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/python/ DESTINATION ${CMAKE_INSTALL_PYTHONDIR} OPTIONAL FILES_MATCHING PATTERN "py.typed" PATTERN "*.pyi") From 777b6dd1e9d9064f06886df5155685299d070483 Mon Sep 17 00:00:00 2001 From: PawelPlesniak Date: Tue, 21 Jul 2026 17:59:40 +0200 Subject: [PATCH 3/5] Revert "Removing .pyi files from the venv as the py.typed file is sufficient independently" This reverts commit 236d6cdfeefb7a1062503e329addf79bb6f59e96. --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f448eeb..27f20cb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,3 +34,5 @@ daq_add_application(conffwk_dal_resolve_libs dal_resolve_libs.cxx daq_install() + +install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/python/ DESTINATION ${CMAKE_INSTALL_PYTHONDIR} OPTIONAL FILES_MATCHING PATTERN "py.typed" PATTERN "*.pyi") From 320804aded9aedbb3795b216f4efe87a9e4e9f30 Mon Sep 17 00:00:00 2001 From: PawelPlesniak Date: Thu, 23 Jul 2026 12:01:56 +0200 Subject: [PATCH 4/5] Removing the per-repo inclusion of generated stub files, leaving this for review by daq-cmake centrally --- CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 27f20cb..f448eeb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,5 +34,3 @@ daq_add_application(conffwk_dal_resolve_libs dal_resolve_libs.cxx daq_install() - -install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/python/ DESTINATION ${CMAKE_INSTALL_PYTHONDIR} OPTIONAL FILES_MATCHING PATTERN "py.typed" PATTERN "*.pyi") From e20ab579a0a94402d909d812b5b9ba92d31d1901 Mon Sep 17 00:00:00 2001 From: PawelPlesniak Date: Thu, 23 Jul 2026 12:08:12 +0200 Subject: [PATCH 5/5] Enabling pybind11-stubgen to work with conffwk's pybindsrc --- pybindsrc/module.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pybindsrc/module.cpp b/pybindsrc/module.cpp index 2b5b50c..70d5a48 100644 --- a/pybindsrc/module.cpp +++ b/pybindsrc/module.cpp @@ -24,8 +24,8 @@ PYBIND11_MODULE(_daq_conffwk_py, m) m.doc() = "Python interface to the conffwk package"; // optional module docstring - register_conffwk(m); register_conffwkobject(m); + register_conffwk(m); } } // namespace dunedaq::conffwk::python