Open-CMSIS-Pack / Open-CMSIS-Pack-Spec

Common Microcontroller Software Interface Standard - Pack(age) based distribution system
https://open-cmsis-pack.github.io/Open-CMSIS-Pack-Spec/
Apache License 2.0
53 stars 21 forks source link

Adding `image` as child element of the `part` element #246

Closed silviooliva closed 1 year ago

silviooliva commented 1 year ago

Like for the board element and since using the book element for that is not recommended, it could be useful for the part element having a dedicated child element for referencing at least one part image.

A solution could be to reuse the /package/boards/board/image definition (reported below) adapting it also for the part.

image

jkrech commented 1 year ago

@silviooliva So far we have tried to map device's elements to part's elements whereas image is taken from the board but I clearly prefer it over abusing the book element. I would suggest to replace large and small with top. We could not do it at the time of adding bottom and perspective for backward compatibility. Is the expectation that at least one image is mandatory or if specified all three variants need to be specified?

@silviooliva, are you happy to prepare a PR for this?

silviooliva commented 1 year ago

Hi @jkrech, if I understand correctly, you are suggesting to define a new image element for the part (with top attribute instead of large and small), keeping the image for the board as it is now.

For the part the expectation is that, if the image child element is present, at least one of its attributes needs to be specified.

Anyway, I'll prepare this PR for your review.

jkrech commented 1 year ago

@silviooliva, we need to keep the specification of the board unchanged to not break existing descriptions. We can have a clean specification for the part element, using top, bottom, perspective. I would suggest to make the top attribute required, whereas the other two are optional.

silviooliva commented 1 year ago

@jkrech, PR https://github.com/Open-CMSIS-Pack/Open-CMSIS-Pack-Spec/pull/250 opened for this issue.