diff --git a/python/podio/test_MemberParser.py b/python/podio/test_MemberParser.py index 3cc375fc5..4d0ca534d 100644 --- a/python/podio/test_MemberParser.py +++ b/python/podio/test_MemberParser.py @@ -120,7 +120,7 @@ def test_parse_valid(self): # pylint: disable=too-many-statements self.assertEqual(parsed.description, r'with a top level type') self.assertTrue(not parsed.is_builtin_array) self.assertEqual(parsed.array_type, r'::GlobalType') - self.assertEqual(parsed.julia_type, r'MVector{1, Main.GlobalTypeStruct}') + self.assertEqual(parsed.julia_type, r'MVector{1, GlobalTypeStruct}') parsed = parser.parse(r'std::array fixedWidthArray // a fixed width type array') self.assertEqual(parsed.full_type, r'std::array') diff --git a/python/podio_class_generator.py b/python/podio_class_generator.py index c1370ea08..dab2cc297 100755 --- a/python/podio_class_generator.py +++ b/python/podio_class_generator.py @@ -114,6 +114,8 @@ def __init__(self, yamlfile, install_dir, package_name, io_handlers, verbose, dr self.any_changes = False def _process_parent_module(self, datamodel): + """Process parent module of julia that contains constructor definitions + of components and datatypes""" self._fill_templates("ParentModule", datamodel) def process(self): @@ -259,7 +261,7 @@ def _process_component(self, name, component): includes.update(component.get("ExtraCode", {}).get("includes", "").split('\n')) component['includes'] = self._sort_includes(includes) - component['includes_jl'] = {'struct': includes_jl} + component['includes_jl'] = {'struct': sorted(includes_jl)} component['class'] = DataType(name) self._fill_templates('Component', component) @@ -289,6 +291,7 @@ def _preprocess_for_julia(self, datatype): if not member.is_builtin: includes_jl_struct.add(self._build_julia_include(member)) datatype['includes_jl']['struct'].update((includes_jl_struct)) + sorted(datatype['includes_jl']['struct']) @staticmethod def _get_julia_params(datatype): @@ -431,7 +434,7 @@ def _preprocess_datatype(self, name, definition): data['class'] = DataType(name) data['includes_data'] = self._get_member_includes(definition["Members"]) data['includes_jl'] = {'struct': self._get_member_includes(definition["Members"], julia=True)} - data['params_jl'] = self._get_julia_params(data) + data['params_jl'] = sorted(self._get_julia_params(data)) self._preprocess_for_class(data) self._preprocess_for_obj(data) self._preprocess_for_collection(data) diff --git a/python/templates/CMakeLists.txt b/python/templates/CMakeLists.txt index b4f8c1a9e..ba1a57d7e 100644 --- a/python/templates/CMakeLists.txt +++ b/python/templates/CMakeLists.txt @@ -22,8 +22,6 @@ set(PODIO_TEMPLATES ${CMAKE_CURRENT_LIST_DIR}/macros/sioblocks.jinja2 ${CMAKE_CURRENT_LIST_DIR}/macros/utils.jinja2 - ${CMAKE_CURRENT_LIST_DIR}/JuliaCollection.jl.jinja2 - ${CMAKE_CURRENT_LIST_DIR}/Constructor.jl.jinja2 ${CMAKE_CURRENT_LIST_DIR}/MutableStruct.jl.jinja2 ${CMAKE_CURRENT_LIST_DIR}/ParentModule.jl.jinja2 )