feat: Add a script to update showcased projects' stars#5992
Conversation
willmcgugan
left a comment
There was a problem hiding this comment.
I'd like to suggest an alternative approach that makes this a little easier to maintain.
-
extract PROJECTS in to its own Python file. Call it
project_data.pyor something like that. -
Add a new Python file that maps the project name on to the star count. Call it something lke
project_stars.pySTAR_COUNTS = { "dolpie": "3.2K", "posting": "6.2K" }
-
Implement a script that loads PROJECTS, runs through each project to get the stars, and then spits out
project_stars.py -
Now in
project_data.py, you can importproject_starsand change the stars toSTAR_COUNTS["dolphie"]etc.
Why do I think this is better? It keeps the project data and star counts in one place. Right now the project information is duplicated over two files. It also avoid writing to a complex Python file. Generating code can be brittle, and it is generally best to limit the potential impact of that.
Would you like to tackle this?
|
So you want me to extract the |
4c82397 to
738e3a7
Compare
738e3a7 to
ca1b1fd
Compare
ca1b1fd to
204936b
Compare
204936b to
87aa6b1
Compare
TomJGooding
left a comment
There was a problem hiding this comment.
Hopefully this runs without crashing now? It would be nice to see the updated star counts to check they match how they are displayed on GitHub?
|
Awesome. Thanks @NSPC911 ! And thanks @TomJGooding for the assist. |
Please review the following checklist.