Update activity score calculation algorithm - #341
Conversation
* replace `watchers_count` by `subscribers_count` * fix slice number * simplify check * repo JSON access standardization
Co-authored-by: Sebastian Spier <github@spier.hu>
Yep. That's why I start analyzing the algorithm, I'm implementing a Python version to integrate in the zkoppert/innersource-crawler. Should we add a section in the pattern to implementations of the algorithm?
As far as I understood, they changed watchers to stars and that created a small problem (More and Other)
Agree. What about use the mock data from the planet's repo.json and generate the score instead of mock it too? |
|
@3cpt just confirming that I didn't forget about your PR. Would just like to wait for @Michadelic for feedback. |
|
@spier No worries. I replicated the same code in Python and C# to validate the consistency of the numbers. |
|
Hi @3cpt @spier, indeed there is holiday season over here so please excuse my late response. I took this code directly from our running crawler on GitHub enterprise, so it is a working JavaScript implemention, but for sure it can be further tweaked and adjusted. If you spot more issues just let me know. Michael |
Michadelic
left a comment
There was a problem hiding this comment.
Great simplifications, just the slice change should be reverted (see my comment)
|
@Michadelic would you mind reviewing/approving this PR once it is in a state that is ready to be merged? |
|
During my last check I verified that the Please, your feedback is welcome, and I could be doing my math wrongly. |
Michadelic
left a comment
There was a problem hiding this comment.
please keep the "1+" as explained in the comment, other changes for readability are appreciated 👍
|
@Michadelic would you mind reviewing the latest status of this PR again, and then approving the PR when everything looks good? To me it looks like @3cpt implemented the change that you asked for (thanks for that!) for but I am not 100% sure so I figured I rather ask you for confirmation. |
Michadelic
left a comment
There was a problem hiding this comment.
Thank you for the improvements, looks good now!
|
@spier PR can be merged now, looking good |

This PR contains changes to the Repository Activity Score algorithm.
watchers_countbysubscribers_count- because stars are the same as watchers, so I just kept stargazers and replaced watchers by subscribers (read more about this here).?json['prop']or json.prop. I picked one for better reading.