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

Use the number of Github stars on a sliding period of time #929

Open
adpi2 opened this issue Mar 2, 2022 · 0 comments
Open

Use the number of Github stars on a sliding period of time #929

adpi2 opened this issue Mar 2, 2022 · 0 comments

Comments

@adpi2
Copy link
Member

adpi2 commented Mar 2, 2022

Motivation

Currently we use the total number of Github stars to sort the projects. But this metric can usually grow over time and so it favors old projects over new ones. In Scaladex we would like to promote new promising libraries and encourage the community to use them, to sponsor them and to contribute them. We call them trending libabries.

In order to determine which library is trending we can use the number of stars received during the last month or the last year.

Identified Obstacle

How to get and update the number of given stars during a sliding period of time? Is it possible to get the information directly using Github API. Otherwise we can store timeseries of total number of stars and compute the difference in SQL.

Implementation Guideline

For timeseries:

  1. Create a table to persist all number of stars.
  2. Use the GithubUpdater to store the number of stars in this table
  3. Add the starsLastMonth and starsLastYear in the GithubInfoDocument that is indexed in Elasticsearch.
  4. Create the request in SqlDatabase to compute these numbers
  5. Add corresponding Sorting criteria and implement them in ElasticsearchEngine
  6. Add these sorting criteria in the search page and the awesome page

Expectations

  1. The SQL request should be tested.
  2. The implementation of the new Sorting criteria should be tested.
  3. We can easily find the most trending project in the search page and the awesome page.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant