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

refactor riot-os.org data update #17

Merged
merged 9 commits into from
Mar 2, 2021

Conversation

jia200x
Copy link
Member

@jia200x jia200x commented Feb 25, 2021

Contribution Description

This PR adds scripts for updating RIOT data (contributors, cpus, boards, etc).
These actions can be invoked using make targets (see README.md).

This PR simplifies GH Actions deployment.

Also fixes #25.

@jia200x
Copy link
Member Author

jia200x commented Feb 25, 2021

@aabadie could you give this a look?

@leandrolanzieri leandrolanzieri added the enhancement New feature or request label Feb 25, 2021
Copy link
Contributor

@aabadie aabadie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there's still room for improvement and the already commit data files (that are now generated on the fly) could also be removed.

Comment on lines +13 to +18
RIOT_BOARDS_FILE = $(DATA_DIR)/riot_boards.yml
RIOT_STATS_FILE = $(DATA_DIR)/riot_stats.yml
RIOT_CONTRIBUTORS_FILE = $(DATA_DIR)/contributors.json
RIOT_DRIVERS_FILE = $(DATA_DIR)/riot_drivers.csv
RIOT_DRIVERS_CATS_FILE = $(DATA_DIR)/riot_drivers_cats.csv
RIOT_CPUS_FILE = $(DATA_DIR)/riot_cpus.yml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it means that all these yml files and contributors.json committed in the repo could be git rm'ed and .gitignore'd ? (since they are regenerated automatically)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we were thinking with Leandro to leave some as a stub (so one doesn't need to call the update target). But this would be indeed possible.

What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that if someone generates the website locally to get a local preview, all these files will end up modified (in git), so this will be annoying.
Better remove them.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But one could build the website locally without calling make update_riot_data, then the files would not be updated and the stub values would be used instead.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but we can add a .gitignore and then those files would still be there, but won't be tracked.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it introduces additional (unnecessary) steps

As I said, it doesn't introduce additional steps for the user, since it's automatically handled by make build the first time.

we want to provide a 'minimal' running version that might include outdated data but shows the content elements.

Then why all these stub files are taken from the generator directly. If only the content elements are important (whatever this means), you could simply have dummy data (like fake data), that wouldn't necessarily come from the RIOT website. I mean there's no need to commit a 400 lines files containing all boards supported in February 2021 or a 2k file containing all contributors (and also containing unnecessary information) . Let's also mention this one line json file of 20k columns for the drivers! And this is without mentioning the mixed formats (some in json, some in yml and, with this PR, some in csv). This is just cluttering the repository (repeating myself).

Again, since they are generated, they shouldn't be committed in the repo.

Copy link
Collaborator

@leandrolanzieri leandrolanzieri Feb 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It sounds like having stub files with subsets of the lists is a good tradeoff between having empty pages when not updating, and cluttering the repo with huge files. But in this case make build would not have to trigger an update, right? Should we proceed with that?

Copy link
Member

@waehlisch waehlisch Feb 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then why all these stub files are taken from the generator directly. If only the content elements are important (whatever this means), you could simply have dummy data (like fake data), that wouldn't necessarily come from the RIOT website.

but it doesn't harm either. taking a snapshot and use this as dummy data is completely fine. ... anyhow, as @leandrolanzieri suggested, he will include a reduced set of data for each generated file, to spare some space.

i think we can proceed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's pretty clear that generated data shouldn't be committed.

Note that the only reason why we were doing this was for generating dummy files. Sorry if it was not clear

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as discussed, I reduced the stub files. I chose some numbers that allow to test search functionalities and responsiveness.

Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
_tools/riot-contributors.py Show resolved Hide resolved
_tools/riot-boards.sh Outdated Show resolved Hide resolved
_tools/riot-stats.sh Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
_tools/riot-stats.sh Outdated Show resolved Hide resolved
Copy link
Member

@waehlisch waehlisch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

riot_drivers_cats.csv does not include any stub data.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
_tools/riot-stats.sh Outdated Show resolved Hide resolved
@jia200x
Copy link
Member Author

jia200x commented Feb 26, 2021

riot_drivers_cats.csv does not include any stub data.

Fixed with the last push. I added proper stub files and a make target

_tools/riot-stats.sh Outdated Show resolved Hide resolved
_tools/riot-drivers.sh Outdated Show resolved Hide resolved
_tools/riot-cpus.sh Outdated Show resolved Hide resolved
_tools/riot-stats.sh Outdated Show resolved Hide resolved
@waehlisch waehlisch self-requested a review February 26, 2021 17:47
@waehlisch
Copy link
Member

it seems all remarks are addressed except the reduced amount of data in the stub files, right?

@miri64
Copy link
Member

miri64 commented Feb 26, 2021

Still needs squashing and AFAIK #17 (comment) was not yet fulfilled.

@jia200x
Copy link
Member Author

jia200x commented Mar 1, 2021

rebased

@jia200x
Copy link
Member Author

jia200x commented Mar 1, 2021

@aabadie are you ok with this PR?

@waehlisch
Copy link
Member

i just gave it a nother test and it looks good!

@waehlisch
Copy link
Member

last call for objections. @aabadie? we want to make progress because this PR is also a requirement for decent previews of other PRs.

@waehlisch waehlisch merged commit d22db92 into RIOT-OS:master Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"common" CPUs should be excluded from CPU page
5 participants