aasx: OPCPackageWriter.write_relationships() is called twice when submodel_split_parts is True
The following warnings are logged when running the AASX tests:
/usr/lib/python3.8/zipfile.py:1517: UserWarning: Duplicate name: 'aasx/https___acplt_org_Test_AssetAdministrationShell/_rels/https___acplt_org_Test_AssetAdministrationShell.aas.xml.rels'
return self._open_to_write(zinfo, force_zip64=force_zip64)
/usr/lib/python3.8/zipfile.py:1517: UserWarning: Duplicate name: 'aasx/https___acplt_org_Test_AssetAdministrationShell/_rels/https___acplt_org_Test_AssetAdministrationShell.aas.json.rels'
return self._open_to_write(zinfo, force_zip64=force_zip64)
These are caused by AASXWriter.write_aas() calling write_relationships() by itself when submodel_split_parts is True. Since write_aas() also calls write_aas_objects(), which also writes relationships, this results in two calls to write_relationships() for the same AAS, which in turn results in duplicate names being written to the file.
Edited by Leon Mauritz Möller