Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools: Export RDF data about features and boards #20395

Draft
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

chrysn
Copy link
Member

@chrysn chrysn commented Feb 16, 2024

Contribution description

Building on #20366, this generates two RDF data sets:

  • A semantically accessible version of the features with their hierarchical classification. This can be visualized eg. on https://skos-play.sparna.fr/play/upload
  • A list of features provided by each board compatible with the above.

Testing procedure

TBD. So far, this is experimental only.

Once this builds successfully (tooling updates required so we can install Python dependencies), the produced documentation will contain a page that shows the large feature matrix. On the long run, I think we'll need to slim that down, or provide a more interactive tool for it. (Anyone with web development skills around?)

Issues/PRs references

Builds on #20366

Next steps

To be useful, the two RDF outputs should be combined into an HTML table before this can be considered for inclusion properly.

@github-actions github-actions bot added Area: doc Area: Documentation Area: build system Area: Build system Area: tools Area: Supplementary tools Area: boards Area: Board ports Area: Kconfig Area: Kconfig integration Area: tests Area: tests and testing framework Area: drivers Area: Device drivers Platform: ESP Platform: This PR/issue effects ESP-based platforms Area: cpu Area: CPU/MCU ports Area: sys Area: System Area: examples Area: Example Applications labels Feb 16, 2024
@github-actions github-actions bot removed Area: tests Area: tests and testing framework Area: drivers Area: Device drivers Platform: ESP Platform: This PR/issue effects ESP-based platforms Area: cpu Area: CPU/MCU ports Area: sys Area: System Area: examples Area: Example Applications labels Feb 19, 2024
@chrysn
Copy link
Member Author

chrysn commented Feb 20, 2024

An illustrative screenshots of the current state of affairs:

Screenshot 2024-02-17 at 22-26-14 RIOT boards and features

This has a lot of useful data, with some fun preprocessing in RDF space (eg. to turn the bit widths from columns into a readable field), but terrible UX. Suggestions on that front would be highly appreciated.

@chrysn chrysn force-pushed the features-experiments branch 3 times, most recently from 21274ec to a5be350 Compare February 25, 2024 20:23
@github-actions github-actions bot removed Area: build system Area: Build system Area: boards Area: Board ports Area: Kconfig Area: Kconfig integration labels Feb 25, 2024
@chrysn chrysn added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Feb 25, 2024
@chrysn chrysn force-pushed the features-experiments branch 2 times, most recently from ecfab61 to 2e08c46 Compare February 26, 2024 23:43
@chrysn chrysn force-pushed the features-experiments branch 2 times, most recently from 370b62f to 4bb03f3 Compare February 27, 2024 00:05
@github-actions github-actions bot added the Area: tests Area: tests and testing framework label Feb 27, 2024
@github-actions github-actions bot added the Area: build system Area: Build system label Feb 27, 2024
@github-actions github-actions bot removed Area: tests Area: tests and testing framework Area: build system Area: Build system labels Feb 27, 2024
@miri64
Copy link
Member

miri64 commented Feb 29, 2024

but terrible UX. Suggestions on that front would be highly appreciated.

For a general overview, I don't think we will get rid of any huge table, maybe it could, however, be rendered as an SVG, heatmap style? For details, I'd say a simple “portfolio” (not sure this is how you would translate “Steckbrief” from German in this case) for each board as a bullet point or description list that we can add to the doc of each board would already be a step up from the current approach.

@miri64
Copy link
Member

miri64 commented Feb 29, 2024

be rendered as an SVG, heatmap style?

Hovering over a cell could then summarize the row & column indices (which then also of course would be shown at the axes)

@chrysn
Copy link
Member Author

chrysn commented Feb 29, 2024

I'd love to have the portfolio. Do you happen to know an algorithm that, given a tree of identifiers and boolean properties at the leaves, finds the shortest (or a short) boolean expression that makes use of the node?

For example, for board XY it should say that it supports "all Arduino features except arduino_pwm and arduino_form_factor_foo, cortexm_svc, cortexm_check_addrs, all flash features except rwee, and these individual peripherals features". (Sure needs some natural language generation to turn the boolean expression tree into readable, and add some collapsing, but that's more straightforward). I can sure code something up, but that sounds like a problem that has been solved over and over already (and is easy once you know the name). This portfolio thing would work on both axes: Likewise, the portfolio of feature periph_pwm would say "All Atmel boards, all NXP except this-and-that" etc (but would be more sensitive to providing the right tree(s?) to group the boards by).

I can play around with the heatmap idea, but that'll either become a huge SVG thing (essentially every pixel spelled out as a rect with its own tool tip) or will be more on the JS heavy side. Maybe that can be combined with collapsing and expanding the table -- I originally had in mind that when you collapse (say) a group of boards, the cell would give a yellow "~" if it contains both yes and no cells, but maybe it can also just show a small heat map of its own, with the full heat map just being the result of collapsing the table into a 1x1 table.

@miri64
Copy link
Member

miri64 commented Feb 29, 2024

I'd love to have the portfolio. Do you happen to know an algorithm that, given a tree of identifiers and boolean properties at the leaves, finds the shortest (or a short) boolean expression that makes use of the node?

This sounds way more complicated than what I had in mind. I was thinking something like this

Supported features

  • Arduino features:
    • arduino_gpio
    • arduino_spi
    • ...
  • CPU features:
    • cortexm_mpu
    • ...

@miri64
Copy link
Member

miri64 commented Feb 29, 2024

Shortly thinking a bit more about the “shortest boolean expression” thing a bit more: I don't think I like it... It assumes that a user knows what, e.g., “all arduino” features are, while a list would explicitly spell out what is supported.

@maribu
Copy link
Member

maribu commented May 3, 2024

Ping?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: doc Area: Documentation Area: tools Area: Supplementary tools CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants