COVESA / vss-tools

Software for working with VSS (https://github.com/COVESA/vehicle_signal_specification)
Mozilla Public License 2.0
55 stars 55 forks source link

🐞 Exporting null values of given extended attributes #398

Closed sschleemilch closed 1 month ago

sschleemilch commented 1 month ago

About

Extended user attributes given with -e should always be exported, even if they contain null values. This was the case for the last release. The recent core refactoring changed the behavior and filters all null values. Therefore this change here that handles extended attributes in a special way and not includes them. This only concerns the as_dict method and methods using that (such as as_flat_dict). Exporters not using those methods have not been changed and might need to be updated aswell if users report problems.

Example vspec:

Vehicle:
  type: branch
  description: Vehicle
  foo: ~
  bar: ~

Should result in the export (only when passing -e foo -e bar):

Vehicle:
  bar: null
  description: Vehicle
  foo: null
  type: branch
SebastianSchildt commented 1 month ago

Meeting 08/27: Please review

Bonusgoal: Add a test @sschleemilch

sschleemilch commented 1 month ago

Bonusgoal: Add a test @sschleemilch

Done

erikbosch commented 1 month ago

MoM: