-
Notifications
You must be signed in to change notification settings - Fork 193
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
Update activity score calculation algorithm #341
Conversation
* replace `watchers_count` by `subscribers_count` * fix slice number * simplify check * repo JSON access standardization
Thanks for the contribution @3cpt! Very cool that you are reviewing the pseudo code here. You mentioned elsewhere that you are planning to add a score calculation function to one of the reference implementations of the crawlers, right? Great catch with the watchers/stargazers/subscribers topic. I need to learn more about this. I am a bit confused after reading the article that you referenced above. Maybe I just got to read it again. :) I left one inline comment for you, to see if we could improve readability of the score calculation even further. Not sure how we could go about validating the pseudo code here. @Michadelic you will find this one interesting. Any feedback and ideas what we could use to validation the algorithm? |
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the improvements, looks good now!
@spier PR can be merged now, looking good |
Thank you for this contribution @3cpt !!! Much appreciated fix. Also we are looking forward to see your reference implementation. |
This PR contains changes to the Repository Activity Score algorithm.
watchers_count
bysubscribers_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.