Skip to content

Ranking System v2 #1186

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

Merged
merged 17 commits into from
May 26, 2023
Merged

Ranking System v2 #1186

merged 17 commits into from
May 26, 2023

Conversation

francois-rozet
Copy link
Collaborator

@francois-rozet francois-rozet commented Jul 13, 2021

Hello @anuraghazra 👋

As #883, #455 and #1029, I've noticed that the function calculateRank doesn't work as expected.

The first problem is the use of a normal distribution instead of an exponential distribution, as pointed out by #960 . The second is that each metric has the same weight in the score, while some are clearly better indicators (e.g. stars). I've corrected both problems in this PR.

If you want to try it out before merging, I've hosted this version on Vercel.

Importantly, in #960, being extremely good in a single metric (e.g. 100k commits) while being terrible elsewhere still gets an "S+" rank. In my implementation, in order to get "S+", you need to be outstanding everywhere. However, you can still get "A+" or "S" if a single metric is poor (e.g. contributions or issues) but you have a lot of stars and followers.

@vercel
Copy link

vercel bot commented Jul 13, 2021

@francois-rozet is attempting to deploy a commit to the github readme stats Team on Vercel.

A member of the Team first needs to authorize it.

@francois-rozet francois-rozet changed the title Revise rank calculation Patch rank calculation Jul 13, 2021
@francois-rozet francois-rozet changed the title Patch rank calculation Patch rank calculation (not yet another theme) Jul 15, 2021
@anuraghazra
Copy link
Owner

So in #960 seems like linustorvals is getting S+ rank which is good, since atleast we know a baseline that there are people who can get S+ but in this PR your changes seems to stretch the stats maybe a little bit too far?

@anuraghazra anuraghazra mentioned this pull request Jul 18, 2021
@francois-rozet
Copy link
Collaborator Author

Hi @anuraghazra 👋 I've edited the weights such that Linus Torvalds is now S+.

By the way S+ is top 2.5%, S 10%, A+ 25%, A 50% and B+ 75% and B 100%.

@RodrigoDornelles
Copy link

o in #960 seems like linustorvals is getting S+ rank which is good, since atleast we know a baseline that there are people who can get S+ but in this PR your changes seems to stretch the stats maybe a little bit too far?

thought it was great, in the current algorithm most are in the A+, even accounts with less than 5 commits and no stars get this rank, due to the huge amount of registered guests. and accounts with numerous commits, repositories and pull requests also remain with the same rank as this one.

@anuraghazra anuraghazra changed the title Patch rank calculation (not yet another theme) Ranking System v2 Sep 7, 2021
@anuraghazra
Copy link
Owner

By the way S+ is top 2.5%, S 10%, A+ 25%, A 50% and B+ 75% and B 100%.

This ratio seems well balanced.

@francois-rozet
Copy link
Collaborator Author

francois-rozet commented Sep 14, 2021

@anuraghazra Any updates on your plans ?

@akhildevelops
Copy link

This is one of the good ways of modeling the data to exponential distribution. I frequently work with datasets and most of them don't fit into normal distribution (I think the current ranking depends on fitting the data to a normal distribution).

As we currently have no idea on the whole data i.e, meta-data for all the github users with respect to commits, prs, stargazers etc..,. It would be difficult to obtain right parameter values and weights for the model to explain the distribution,

For fun I've tried to see what's the minimum count(MC) required for only one type of parameter (considering others to be zero count) to achieve a given rank.

Rank threshold MC - Commits MC - Prs MC-Followers MC-Stars
S+ 2.5% None None None None
S+ 10% None None None None
A+ 25% None None None None
A 50% None None None 300
B+ 75% None None None 83
B 100% None None None None

Interestingly the weights are so strict that one can achieve only upto Rank A who has only a minimum of 300 stargazers.

I'll try to share more stats based on combinations of parameters.

@francois-rozet
Copy link
Collaborator Author

Hello @Enforcer007, I'm not sure to understand what you want to say.

Do you think it is bad that one cannot get S+ (or even A+ in fact) by maximizing a single metric ?

@akhildevelops
Copy link

Hi @francois-rozet,

The weights you used is a good start, as it restricts users to go higher in ranks who only focus on one kind type of parameter.

@anuraghazra
Copy link
Owner

Just testing out few numbers with the ranking system

https://codesandbox.io/s/calculaterank-9nj6d?file=/src/index.js

One scenario which I'm seeing is that if someone is overall decent on all stats but has 0 stars gained they will always get B+ rank which isn't ideal.

See codesandbox for more info.

@francois-rozet
Copy link
Collaborator Author

francois-rozet commented Sep 19, 2021

Hello @anuraghazra,

You seem to have a really warped view of what is a "decent" number of stars. Most users don't have any stars, let alone more than 100. "just a few thousand stars" is already incredibly outstanding. For instance, here you see that only 5000 users have more than 2750 stars and there are over 40 millions active users on GitHub.

Same for the number of commits, followers, PRs, etc. (2500 commits or 750 followers is not average at all). The values I have chosen were calculated (by hand) as the averages over the stargazers of one of my repos (francois-rozet/piqa). The stargazers of this repository (there are ~30k) would be much more representative. Since you are familiar with GitHub's API it shouldn't be too hard for you to gather the metrics of these users and then compute the averages.

@anuraghazra
Copy link
Owner

anuraghazra commented Sep 19, 2021

You seem to have a really warped view of what is a "decent" number of stars. Most users don't have any stars, let alone more than 100

Exactly, thats why I said if someone is overall decent on all stats but has 0 stars gained they will always get B+ rank which is really unfair.

I'm talking about the first case


// Average user but with 0 stars will always get B+
console.log(
  calculateRank({
    totalCommits: 1500,
    followers: 500,
    prs: 150,
    issues: 65,
    stargazers: 0
  })
);

@francois-rozet
Copy link
Collaborator Author

You can reduce the weight of stars if you want. STARS_WEIGHT = 0.5 seems balanced.

@francois-rozet
Copy link
Collaborator Author

Any updates @anuraghazra ?

@dreamyguy
Copy link

Could this be published and enabled with an extra URL parameter - or with a 'v2' as part of the URL? This would not cause breaking changes for anyone, and we could carry on from there. 🚀 🌔

@rickstaa

This comment has been minimized.

@rickstaa
Copy link
Collaborator

rickstaa commented Nov 9, 2021

@francois-rozet I reviewed your pull request and found one small bug in the tests. When that is fixed, I think it should be fine to be merged into the master branch.

@rickstaa
Copy link
Collaborator

rickstaa commented May 22, 2023

The new system is good, but I'd like to express my personal opinion. I believe that a grading system with only S, A, B tiers is not very good, because people might unconsciously believe that there exist tiers like C, D, F. I've previously stated that a "grading system that satisfies everyone" could ultimately lose its reference value, and the meaning represented by the rank "B" could eventually become the new F.

I trust that people's spirits are not so fragile that they cannot face their own grades, and even lower grades can serve as motivation for personal growth. We don't have to view this system as competitive ranking, instead, we can try to understand this system as a measure of a developer's "growth from the initial state". If we really don't want the grade F to appear, we could use a format like Lv1, Lv2, Lv3... and so forth.

@ZjzMisaka thank you so much for giving your two cents 🙏🏻. I agree that the rank names can be improved. As stated in #1186 (comment) however we will tackle this in a subsequent pull request. Possible improvements are found and discussed in #2265 👍🏻. Maybe you can add your suggestion there?

@everybody Feel free to add your two cents. I will merge this PR in:

Relative date

Copy link
Collaborator

@qwerty541 qwerty541 left a comment

Choose a reason for hiding this comment

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

It is very surprising for me that Linus Torvalds, having in his profile a project with an abnormally large number of stars of 150,000+, receives only an A+ grade from the new ranking system. As far as I understand, the new ranking system mainly takes into account the number of open pull requests and issues. Considering that the purpose of this project is to motivate developers and newcomers to contribute more actively in open source projects, then this change looks logical and correct. But I still think that an abnormally large number of stars, commits or followers should also elevate the user to at least the S rank.

@ZjzMisaka
Copy link

It is very surprising for me that Linus Torvalds, having in his profile a project with an abnormally large number of stars of 150,000+, receives only an A+ grade from the new ranking system. As far as I understand, the new ranking system mainly takes into account the number of open pull requests and issues. Considering that the purpose of this project is to motivate developers and newcomers to contribute more actively in open source projects, then this change looks logical and correct. But I still think that an abnormally large number of stars, commits or followers should also elevate the user to at least the S rank.

I agree with this perspective. It's important to recognize that some users may not be involved in a variety of open-source projects, but they could be focusing on their own open-source projects and making significant contributions there. This type of work should also be encouraged, as it has a positive effect on the open-source community as a whole.

@francois-rozet
Copy link
Collaborator Author

francois-rozet commented May 25, 2023

The ranking takes all stats into account (and mainly stars and prs). To have S or S+, you need to be great everywhere. This is the whole point of this PR. If we allow to be good in a single stat, then users with 0 stars, 0 issues, 0 PRs, 0 followers, but 100000 commits still get S+, which makes no sense, especially if the goal is to push devs to collaborate. Besides, it is very rare (try to find another) to find cases like Linus Torvalds with huge number of stars but barely any PRs/issues. Implementing an exception mechanism for a handful of users, which would never use this project anyway, is pointless.

@rickstaa
Copy link
Collaborator

The ranking takes all stats into account (and mainly stars and prs). To have S or S+, you need to be great everywhere. This is the whole reason for this PR. If you allow to be good in a single stat, then users with 0 stars, 0 issues, 0 PRs, 0 followers, but 100000 commits still get S+, which makes no sense, especially if the goal is to push devs to collaborate. Besides, it is very rare to find other cases like Linus Torvalds with huge number of stars but barely any PRs/issues.

I have to agree with @francois-rozet on this one. An excellent developer S+ has to score high in all fields. Although the contributions of Linus Torvald are indispensable for the OS community, and he should therefore have the S+ ranking, we unfortunately cannot deduce this from his GitHub statistics alone 🤔. Furthermore, the big number of commits made by Linus Torvalds that is displayed on the stats card is incorrect. This is caused by a bug in GRS (see #564) 😅. The actual commits made by Linus are in the order of 28k, which is not too far from of @anuraghazra, who scores higher on the other stats.

Although, still would prefer a ranking scheme where I get a S ranking instead of a S+ but I couldn't find weights that don't skew the other developers too much. I therefore still think the solution provided by @francois-rozet is the most balanced one. If you guys can find a combination of weights which gives Linux a S ranking without degrading this balance, feel free to open a subsequent pull request. I will likely merge this pull request tomorrow, since it is an enormous improvement compared to the old behaviour, but will consider any improvements in future PRs 👍🏻.

@ZjzMisaka
Copy link

#1186 (comment)

Here's an idea, but this idea may not be mature enough and it may be difficult to implement......
perhaps we can assign individual rankings for commits, PRs, issues, stars, and followers, we can even create a five-dimensional graph based on these data points. This way, we can have a more intuitive visualization of a developer's overall skill level without struggling to evaluate them using just a single score.

@rickstaa
Copy link
Collaborator

rickstaa commented May 25, 2023

#1186 (comment)

Here's an idea, but this idea may not be mature enough and it may be difficult to implement...... perhaps we can assign individual rankings for commits, PRs, issues, stars, and followers, we can even create a five-dimensional graph based on these data points. This way, we can have a more intuitive visualization of a developer's overall skill level without struggling to evaluate them using just a single score.

Although I agree your idea results in a better developer skill display, I think the extra code and development time required for this idea is not worth it 😅. People can rank developers based on how important they find the individual items displayed on the stats card. The rank was added as a motivator for developers.

@FleetAdmiralJakob
Copy link

@rickstaa

@rickstaa rickstaa merged commit c96e84a into anuraghazra:master May 26, 2023
@rickstaa
Copy link
Collaborator

@rickstaa

Done 🎉!

@rickstaa
Copy link
Collaborator

@francois-rozet thanks again for implementing this improvement 👍🏻.

@sunpm
Copy link

sunpm commented May 29, 2023

The weight of commit is very low

@rickstaa
Copy link
Collaborator

The weight of commit is very low

@sunpm feel free to create an improvement pull request 👍🏻.

@lorezyra
Copy link

ref:

Instead of some letter, why not use what most apps do in gamification: show an XP or numerical level rank? Everyone starts from zero. But few can keep pushing the top.

@francois-rozet francois-rozet deleted the patch-rank branch June 1, 2023 11:21
@Dgdiniz
Copy link

Dgdiniz commented Jun 2, 2023

Hi, I think the formula needs some tweeks. I tested here with some values, and for 1000 commits we have:
{ level: 'B+', score: 69.07599578073207 }

For 10000 commits we have:
{ level: 'B+', score: 67.93963214438497 }

And for 100000 commits we have:
{ level: 'B+', score: 67.93963214436843 }

So the values are converging too fast, and after a while makes no difference to increase a particular value.

@francois-rozet
Copy link
Collaborator Author

This is expected. People with 1000 commits per year are already in the top 5 percentiles (for that statistic). So more commits will not improve the total rank dramatically. If you want to improve the rank, you will have to work on the other stats.

@rickstaa
Copy link
Collaborator

rickstaa commented Jun 2, 2023

Hi, I think the formula needs some tweeks. I tested here with some values, and for 1000 commits we have: { level: 'B+', score: 69.07599578073207 }

For 10000 commits we have: { level: 'B+', score: 67.93963214438497 }

And for 100000 commits we have: { level: 'B+', score: 67.93963214436843 }

So the values are converging too fast, and after a while makes no difference to increase a particular value.

I agree that in the current formula levels out too quickly when people are only good in one statistic. Luckily, @francois-rozet already created a new PR that in my opinion offers a good balance 🙏🏻. @Dgdiniz maybe you can review #2762 (review)? I hosted it on https://github-readme-stats-git-rank-rickstaa.vercel.app:

[![Anurag's GitHub stats](https://github-readme-stats-git-rank-rickstaa.vercel.app/api?username=Dgdiniz)](https://github.com/anuraghazra/github-readme-stats)

Anurag's GitHub stats

@Dgdiniz
Copy link

Dgdiniz commented Jun 3, 2023

Hi @rickstaa, I tested here but the behavior is similar. After a while makes no difference improving a category. I was thinking in a simpler approach. Each category has a weight, so a commit is 2 points and a star is 4 points. So each rank just needs a certain number of points. So each category could reach rank S. The number of points could be calculated using some top contributor as reference. Like 200k points is S+. The points destribution could follow some curve, so from C+ to B- we need few points, but from A+ to S- we need much more points. It's very unlikely to have 50k commits, but some repos have thousands of stars, so I don't know the best way to weight the categories. But today we can have billions of points in a category and still be at rank B. But the idea of forcing points in more than one category is also cool.

@rickstaa
Copy link
Collaborator

rickstaa commented Jun 3, 2023

Hi @rickstaa, I tested here but the behavior is similar. After a while makes no difference improving a category. I was thinking in a simpler approach. Each category has a weight, so a commit is 2 points and a star is 4 points. So each rank just needs a certain number of points. So each category could reach rank S. The number of points could be calculated using some top contributor as reference. Like 200k points is S+. The points destribution could follow some curve, so from C+ to B- we need few points, but from A+ to S- we need much more points. It's very unlikely to have 50k commits, but some repos have thousands of stars, so I don't know the best way to weight the categories. But today we can have billions of points in a category and still be at rank B. But the idea of forcing points in more than one category is also cool.

@Dgdiniz thanks for your feedback. Although I like the simplicity of your system, I love that the current system promotes good code practices like working with pull requests and being a well-rounded developer 🤔. As can be seen in #2762 (comment) I think all ranks are douable when people: make use of both pull requests and commits and get stars and followers by creating OS projects that have value to other people.

@rickstaa
Copy link
Collaborator

rickstaa commented Jun 3, 2023

@Dgdiniz However, as said before, this is a community-owned OS project, so all feedback is welcome. Therefore, You are welcome to open a feature request with your proposal. If enough people upvote your idea, I will review it. I use #1935 to judge which features or bugs I donate my leisure time to 😄.

#1186 and #2762 were/will be merged because there was a lot of demand for a better ranking system (see #455). @francois-rozet did a fantastic job at improving the old system, since getting a rank higher or lower than an A+ in the old system was tough. I also think that creating a rank system that will make everybody happy is not doable since we don't have the ground truth of what is an average GitHub developer 😅.

LucienZhang pushed a commit to LucienZhang/github-readme-stats that referenced this pull request Jun 5, 2023
* Revise rank calculation

* Replace contributions by commits

* Lower average stats and S+ threshold

* Fix calculateRank.test.js

Missing key in dictionary constructor

Co-authored-by: Rick Staa <rick.staa@outlook.com>

* refactor: run prettier

* feat: change star weight to 0.75

* Separate PRs and issues

* Tweak weights

* Add count_private back

* fix: enable 'count_private' again

* test: fix tests

* refactor: improve code formatting

* Higher targets

---------

Co-authored-by: Rick Staa <rick.staa@outlook.com>
devantler pushed a commit to devantler/github-readme-stats that referenced this pull request Sep 24, 2023
* Revise rank calculation

* Replace contributions by commits

* Lower average stats and S+ threshold

* Fix calculateRank.test.js

Missing key in dictionary constructor

Co-authored-by: Rick Staa <rick.staa@outlook.com>

* refactor: run prettier

* feat: change star weight to 0.75

* Separate PRs and issues

* Tweak weights

* Add count_private back

* fix: enable 'count_private' again

* test: fix tests

* refactor: improve code formatting

* Higher targets

---------

Co-authored-by: Rick Staa <rick.staa@outlook.com>
Copy link

@aaron-muti-420 aaron-muti-420 left a comment

Choose a reason for hiding this comment

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

Con you consider leaving comments

necofuryai added a commit to necofuryai/github-readme-stats that referenced this pull request May 19, 2025
* Revise rank calculation

* Replace contributions by commits

* Lower average stats and S+ threshold

* Fix calculateRank.test.js

Missing key in dictionary constructor

Co-authored-by: Rick Staa <rick.staa@outlook.com>

* refactor: run prettier

* feat: change star weight to 0.75

* Separate PRs and issues

* Tweak weights

* Add count_private back

* fix: enable 'count_private' again

* test: fix tests

* refactor: improve code formatting

* Higher targets

---------

Co-authored-by: Rick Staa <rick.staa@outlook.com>
xhayper pushed a commit to xhayper/github-readme-stats that referenced this pull request Jul 2, 2025
* Revise rank calculation

* Replace contributions by commits

* Lower average stats and S+ threshold

* Fix calculateRank.test.js

Missing key in dictionary constructor

Co-authored-by: Rick Staa <rick.staa@outlook.com>

* refactor: run prettier

* feat: change star weight to 0.75

* Separate PRs and issues

* Tweak weights

* Add count_private back

* fix: enable 'count_private' again

* test: fix tests

* refactor: improve code formatting

* Higher targets

---------

Co-authored-by: Rick Staa <rick.staa@outlook.com>
Qreepex added a commit to Qreepex/github-readme-stats that referenced this pull request Aug 7, 2025
* Include all repo w/ access to

* parameterize affiliation

* Use GraphQL variable syntax

* Custom ownerAffiliations for general stats

* Add default affiliation

* Apply patches

anuraghazra#1122 (comment)

* build(deps): bump json5 from 2.2.1 to 2.2.3 (anuraghazra#2373)

Bumps [json5](https://github.com/json5/json5) from 2.2.1 to 2.2.3.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](json5/json5@v2.2.1...v2.2.3)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: update snapshots

* Add loading Animation to Most used Language card (anuraghazra#2197)

* add: text animation

* compact progress done

* cleaned code

* non compact animation done

* tests fixed + prettier

* revert: vercel.json

* remove: unnecessary import

* added parameter in docs

* style: improve syntax

Co-authored-by: rickstaa <rick.staa@outlook.com>

* ci: fix theme readme generation action (anuraghazra#2271)

* Revert "build(deps): bump json5 from 2.2.1 to 2.2.3 (anuraghazra#2373)" (anuraghazra#2393)

This reverts commit 42fdff6.

* Revert "ci: fix theme readme generation action (anuraghazra#2271)" (anuraghazra#2394)

This reverts commit 5ae959b.

* Revert "Add loading Animation to Most used Language card (anuraghazra#2197)" (anuraghazra#2396)

This reverts commit 77dcdab.

* fix: retryer fixed (anuraghazra#2400)

* Revert "Revert "ci: fix theme readme generation action (anuraghazra#2271)" (anuraghazra#2394)" (anuraghazra#2418)

This reverts commit 70f0264.

* refactor: update code formatting

* Revert "Revert "Add loading Animation to Most used Language card (anuraghazra#2197)" (anuraghazra#2396)" (anuraghazra#2419)

This reverts commit 4b8198f.

* Update readme.md (anuraghazra#2442)

* test: fix e2e tests

* test: update snapshots

* test: fix e2e test data

* test: update e2e test data

* feat: fix e2e tests

* fix: fix e2e test data

* feat: enable multi page star fetching for private vercel instances (anuraghazra#2159)

* feat: enable multi-page stars' fetching for private vercel instances

This commit enables multi-page stars' support from fetching on private Vercel
instances. This feature can be disabled on the public Vercel instance by adding
the `FETCH_SINGLE_PAGE_STARS=true` as an env variable in the public Vercel
instance. This variable will not be present when people deploy their own Vercel
instance, causing the code to fetch multiple star pages.

* fix: improve stats multi-page fetching behavoir

This commit makes sure that the GraphQL api is only called one time per
100 repositories. The old method added one unnecesairy GraphQL call.

* docs: update documentation

* style: improve code syntax

Co-authored-by: Matteo Pierro <pierromatteo@gmail.com>

* lol happy new year

* docs: remove rate limit documentation for now

Remove the `FETCH_SINGLE_PAGE_STARS` from documentation for now since it
might confuse people.

* fix: fix error in automatic merge

* feat: make sure  env variable is read

Co-authored-by: Matteo Pierro <pierromatteo@gmail.com>
Co-authored-by: Anurag <hazru.anurag@gmail.com>

* chore: resolve conflict (anuraghazra#2453)

* test: fix e2e tests

* test: update snapshots

* test: fix e2e test data

* test: update e2e test data

Co-authored-by: rickstaa <rick.staa@outlook.com>

* feat: parse role parameter

* fix: change prod deployment branch to vercel branch to fix maxDuration bug (anuraghazra#2424)

* Create deploy-prep.yml

* Create deploy-prep.py

* Update vercel.json

* Update deploy-prep.yml

* Update vercel.json

* Added coauthor

Co-authored-by: Dou Xiaobo <93511091+douxiaobo@users.noreply.github.com>

* Update deploy-prep.yml

* refactor: format code

* Added if condition to disable deployments on forks

Co-authored-by: Rick Staa <rick.staa@outlook.com>

* Update deploy-prep.yml

Co-authored-by: Dou Xiaobo <93511091+douxiaobo@users.noreply.github.com>
Co-authored-by: Anurag Hazra <hazru.anurag@gmail.com>
Co-authored-by: rickstaa <rick.staa@outlook.com>

* fix: fixes card overflow problem anuraghazra#2452 (anuraghazra#2460)

This commit makes sure that the card width is formatted correctly.

* fix: fix language card ownerAffiliation bug

This commit fixes a small error in the stats-fetcher that caused the
`exclude_repo` parameter values to be seen as the `ownerAffiliation`
inputs.

* ci: prevent certain actions from running on forks (anuraghazra#2466)

* feat: add PAT monitoring functions (anuraghazra#2178)

* feat: add PAT monitoring functions

This commit adds two monitoring functions that can be used to check
whether the PATs are functioning correctly:
 - status/up: Returns whether the PATs are rate limited.
 - status/pat-info: Returns information about the PATs.

* feat: add shields.io dynamic badge json response

This commit adds the ability to set the return format of the
`/api/status/up` cloud function. When this format is set to `shields` a
dynamic shields.io badge json is returned.

* feat: add 'json' type to up monitor

* feat: cleanup status functions

* ci: decrease pat-info rate limiting time

* feat: decrease monitoring functions rate limits

* refactor: pat code

* feat: add PAT monitoring functions

This commit adds two monitoring functions that can be used to check
whether the PATs are functioning correctly:
 - status/up: Returns whether the PATs are rate limited.
 - status/pat-info: Returns information about the PATs.

* feat: add shields.io dynamic badge json response

This commit adds the ability to set the return format of the
`/api/status/up` cloud function. When this format is set to `shields` a
dynamic shields.io badge json is returned.

* feat: add 'json' type to up monitor

* feat: cleanup status functions

* ci: decrease pat-info rate limiting time

* feat: decrease monitoring functions rate limits

* refactor: pat code

* test: fix pat-info tests

* Update api/status/pat-info.js

Co-authored-by: Anurag Hazra <hazru.anurag@gmail.com>

* test: fix broken tests

* chore: fix suspended account

* chore: simplify and refactor

* chore: fix test

* chore: add resetIn field

---------

Co-authored-by: Anurag <hazru.anurag@gmail.com>

* chore: minor changes in pat info (anuraghazra#2481)

* ci: add update languages action (anuraghazra#2484)

* ci: add update languages action

* ci: make sure PR is created when upstream languages are updated

* Add `rose` theme (anuraghazra#2480)

Co-authored-by: 강민지 <68285922+Kminzzi@users.noreply.github.com>

* Support hide_progress for top-langs feature (anuraghazra#2514)

* Add support for hide_progress in top languages feature

* Fix mistake

* Add documents for all languages

* Remove unnecessary value check

* Update top-languages-card.js

* Revert document for all languages except English

* Update documentation

* Update documentation

---------

Co-authored-by: Zohan Subhash <zohan.subhash@gmail.com>

* add holi_theme (anuraghazra#2539)

* add holi_theme

* add holi_theme

* Add one_dark_pro (anuraghazra#2507)

This colors were taken from One Dark Pro theme in VSCode extention. Please add it and I will use it in my profile

Co-authored-by: Zohan Subhash <zohan.subhash@gmail.com>

* fix: fix JSON themes bug. (anuraghazra#2544)

This fixes a JSON bug that was introduced in anuraghazra#2507.

* Add auto-labelling for documentation updates (anuraghazra#2526)

* ci: fix unsafe directory bug (anuraghazra#2518)

This commit fixes a bug that was introduced due to a upstream change in
the git package. See https://stackoverflow.com/questions/71849415/i-cannot-add-the-parent-directory-to-safe-directory-in-git/71904131#71904131
for more information.

* Update readme.md (anuraghazra#2414)

fix: missing "&" in show_icons=true in Showing icons section

* test: update snapshots (anuraghazra#2519)

* fix: for issue anuraghazra#2534 (anuraghazra#2536)

* Add option to deploy using other services (anuraghazra#2525)

* Create express.js

* Update readme.md

* Update readme.md

* ci: update e2e tests (anuraghazra#2548)

* ci: fix a bug in the theme preview action (anuraghazra#2549)

* refactor: format code (anuraghazra#2550)

* refactor: update languages JSON (anuraghazra#2554)

Co-authored-by: rickstaa <rickstaa@users.noreply.github.com>

* Preview theme workflow fix (anuraghazra#2557)

* Fix octokit error

* ci: make octokit instance global

---------

Co-authored-by: rickstaa <rick.staa@outlook.com>

* ci: preview theme workflow fix (anuraghazra#2559)

* Fix octokit error

* ci: make octokit instance global

* Fix preview theme (move declarations to global)

* refactor: make constants uppercase

---------

Co-authored-by: rickstaa <rick.staa@outlook.com>

* refactor: fix code comments and change 'up' rate limit (anuraghazra#2560)

* Preview action fix (anuraghazra#2561)

* Fix error

* refactor: remove unused code

---------

Co-authored-by: Rick Staa <rick.staa@outlook.com>

* ci: fix theme preview action (anuraghazra#2563)

* fix theme preview (anuraghazra#2564)

* ci: fix theme preview action

* fix: fix some bugs in the 'theme-preveiw' action

* ci: fixes theme preview action (anuraghazra#2566)

* ci: improve theme preview action (anuraghazra#2572)

* Added "Shadow" set (Red, Green, Blue, transparent BG) (anuraghazra#2529)

* Added "Shadow" set (Red, Green, Blue, transparent BG)

3 additional themes sticking primarily to flat colors, which the exception of icons and border being slightly darker. All 3 themes also have transparent backgrounds that will show differently per-user via GiHub's own light and dark themes. Transparency should also still provide easy readability for both.

* Test

Just want to see if we can make the themes have a transparent background.

* Shadows moved under Transparent

---------

Co-authored-by: Zohan Subhash <zohan.subhash@gmail.com>

* ci: fix theme docs generate bug (anuraghazra#2573)

* update my theme (anuraghazra#2576)

* refactor: update languages JSON (anuraghazra#2596)

Co-authored-by: rickstaa <rickstaa@users.noreply.github.com>

* Add format stats option (anuraghazra#2155)

* feat: added `format_stats` option (anuraghazra#2128)

* refactor: change `format_stats` to `short_values` (anuraghazra#2128)

* test: create shorten values test (anuraghazra#2128)

* Update readme.md

Co-authored-by: Rick Staa <rick.staa@outlook.com>

* refactor: rename ``short_values`` to ``number_format``

* Update readme.md

Co-authored-by: Rick Staa <rick.staa@outlook.com>

* Update src/cards/stats-card.js

Co-authored-by: Rick Staa <rick.staa@outlook.com>

* refactor: format codebase

---------

Co-authored-by: Rick Staa <rick.staa@outlook.com>

* add github_dark_dimmed theme (anuraghazra#2594)

* feat(theme): add github_dark_dimmed theme

* feat(theme): change github_dark_dimmed icon color

* contrast ratio adjustment

contrast ratio adjustment on github_dark_dimmed theme

* feat(theme): readme preview

* feat(theme): github themes next to each other

* github themes next to each other

* feat(RankIcon): add rank_icon option (anuraghazra#2628)

* feat(theme): add github_dark_dimmed theme

* feat(theme): change github_dark_dimmed icon color

* contrast ratio adjustment

contrast ratio adjustment on github_dark_dimmed theme

* feat(theme): readme preview

* feat(theme): github themes next to each other

* github themes next to each other

* feat(RankIcon): add rank icon option

* feat(RankIcon): extract rankIcon to icons file

* feat(RankIcon): update readme

* feat(RankIcon): test coverage

* Update readme.md

Co-authored-by: Rick Staa <rick.staa@outlook.com>

---------

Co-authored-by: Rick Staa <rick.staa@outlook.com>

* Updated the custom error there was a Typo. (anuraghazra#2618)

"Something went while trying to retrieve the stats data using the GraphQL API." -> "Something went wrong while trying to retrieve the stats data using the GraphQL API."

* Fix typos inside wakatime test name (anuraghazra#2617)

* removed redundant comparison (anuraghazra#957)

* dev (anuraghazra#1782)

* fix path to powered by vercel image (anuraghazra#1792)

* Synchonize cache seconds min value inside docs translations with main readme (anuraghazra#2616)

* New top language algorithm implementation (anuraghazra#1732)

* Reduced vercel maxDuration

* Implemented new algorithm for Top Langs

* Revert "Reduced vercel maxDuration"

This reverts commit b0bc626.

* Added documentation

* Fixed broken implementation

* Update fetchTopLanguages.test.js

Changed tests

* Now uses the general formula

The parameters p and q can be set by the user.

* Updated tests and added new test

* Added new test

New test for order by repo count.

* Updated documentation

Added explanation and examples for new options.

* Updated documentation

This was overwritten in the merge commit.

* docs: improve docs and fix tests

* Renamed parameters

Renamed `p` and `q` to `size_weight` and `count_weight`, respectively.

* Updated the documentation

Changes introduced in f2516d6

---------

Co-authored-by: rickstaa <rick.staa@outlook.com>

* feat: improve CONTRIBUTING.md (anuraghazra#2609)

* docs: update give logo (anuraghazra#2605)

* Fixed typo in word color inside README (anuraghazra#2652)

* Fixed docs typo inside src/common/utils.js (anuraghazra#2651)

* Fixed several typos inside preview theme script (anuraghazra#2650)

* Fixed todo inside stats card data fetcher (anuraghazra#2649)

* docs: fix README language card usage order (anuraghazra#2659)

* Fixed vscode type error in get card colors function (anuraghazra#2660)

* Show no activity error in compact layout of wakatime card (anuraghazra#2662)

* Fixed card constructor docstring to resolve vscode type errors (anuraghazra#2674)

* Fixed wakatime create text node func docstring to resolve vscode type errors (anuraghazra#2678)

* Fixed docstring for several wakatime card gen functions to resolve multiple type errors (anuraghazra#2690)

* Fixed docstring for stats card create text node function to resolve type errors (anuraghazra#2689)

* Update codecov action version to resolve github action deprecation warning (anuraghazra#2677)

* Add PRs cache cleaning workflow (anuraghazra#2661)

* build(deps): bump yaml from 2.1.3 to 2.2.2 (anuraghazra#2644)

Bumps [yaml](https://github.com/eemeli/yaml) from 2.1.3 to 2.2.2.
- [Release notes](https://github.com/eemeli/yaml/releases)
- [Commits](eemeli/yaml@v2.1.3...v2.2.2)

---
updated-dependencies:
- dependency-name: yaml
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(wakatime-fetcher): add default range to prevent user not found error (anuraghazra#2670)

* feat(theme): add github_dark_dimmed theme

* feat(theme): change github_dark_dimmed icon color

* contrast ratio adjustment

contrast ratio adjustment on github_dark_dimmed theme

* feat(theme): readme preview

* feat(theme): github themes next to each other

* github themes next to each other

* feat(RankIcon): add rank icon option

* feat(RankIcon): extract rankIcon to icons file

* feat(RankIcon): update readme

* feat(RankIcon): test coverage

* Update readme.md

Co-authored-by: Rick Staa <rick.staa@outlook.com>

* add wakatime default range

* update wakatime demos in readme with most active user

* update wakatime demo in readme

* remove &range=all_time from wakatime demos in readme

---------

Co-authored-by: Rick Staa <rick.staa@outlook.com>

* Cover with test changes in anuraghazra#2662 pull request (anuraghazra#2673)

* test: fix mistaken pageInfo.endCursor keys (anuraghazra#2657)

The previous mock logic was too simplistic and has been fixed in the
commit. If the mock logic had been properly implemented, then the
mistaken pageInfo.endCursor keys should have made the test case "should
fetch two pages of stars if 'FETCH_MULTI_PAGE_STARS' env variable is set
to `true`" stuck.

* docs: update wakatime user (anuraghazra#2697)

The old example user doesn't have a WakaTime account anymore.

* Fixed docstring for get styles function to resolve vscode type errors (anuraghazra#2700)

* Fixed axios imports inside docstrings to resolve vscode type errors (anuraghazra#2699)

* Fixed typos inside bug report issue template (anuraghazra#2706)

* Update wakatime user inside docs translations (anuraghazra#2705)

* Fixed docstring for create language text node function (anuraghazra#2704)

* Fixed docstring for wakatime card recalculate percentages function (anuraghazra#2710)

* add pie chart layout to language card (anuraghazra#2099)

* add pie chart layout to language card

* resolve failing top-lang card tests

* scale down pie chart

* update readme.md

* Update readme.md

Co-authored-by: Rick Staa <rick.staa@outlook.com>

* style: format code

* update donut layout to be created without dependencies

* minor update

* style: format readme

* resolve failing tests

* refactor: clean up code and add extra tests

This commit cleans up the pie chart generation code and adds additional
tests.

* feat: improve pie chart positioning

* rename layout pie to donut

* add animation to donut layout

* refactor: rename pie and doughnut to donut

* feat: decrease donus animation delay

---------

Co-authored-by: rickstaa <rick.staa@outlook.com>

* Fixed docstring for create donut language node function (anuraghazra#2713)

* Add missing argument to create compact lang node function to resolve vscode type error (anuraghazra#2714)

* Top languages card pie layout (anuraghazra#2709)

* Top languages card donut layout

* Top languages card pie layout

* renames

* dev

* docs

* dev

* dev

* animations

* dev

* handle one language

* Docs: add missing top languages card layouts. (anuraghazra#2717)

* Top languages card render test: move repeated code into helper function (anuraghazra#2718)

* Docs (translations): add missing top languages card layouts. (anuraghazra#2728)

* Top languages card donut vertical layout (anuraghazra#2701)

* Top languages card donut layout

* dev

* dev

* dev

* dev

* Docs (translations): add top languages card donut vertical layout (anuraghazra#2739)

* Docs: fix top languages card available layouts number (anuraghazra#2738)

* Ranking System v2 (anuraghazra#1186)

* Revise rank calculation

* Replace contributions by commits

* Lower average stats and S+ threshold

* Fix calculateRank.test.js

Missing key in dictionary constructor

Co-authored-by: Rick Staa <rick.staa@outlook.com>

* refactor: run prettier

* feat: change star weight to 0.75

* Separate PRs and issues

* Tweak weights

* Add count_private back

* fix: enable 'count_private' again

* test: fix tests

* refactor: improve code formatting

* Higher targets

---------

Co-authored-by: Rick Staa <rick.staa@outlook.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Raymond Nook <59678453+developStorm@users.noreply.github.com>
Co-authored-by: rickstaa <rick.staa@outlook.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Huzaifa Khilawala <55500003+RedHeadphone@users.noreply.github.com>
Co-authored-by: Anurag Hazra <hazru.anurag@gmail.com>
Co-authored-by: Zohan Subhash <zohan.subhash@gmail.com>
Co-authored-by: Matteo Pierro <pierromatteo@gmail.com>
Co-authored-by: Dou Xiaobo <93511091+douxiaobo@users.noreply.github.com>
Co-authored-by: 강민지 <68285922+Meezzi@users.noreply.github.com>
Co-authored-by: 강민지 <68285922+Kminzzi@users.noreply.github.com>
Co-authored-by: Amir <amirhhakimnejad@gmail.com>
Co-authored-by: Mohamed Hassan <mo.hassan2792@gmail.com>
Co-authored-by: Oleksandr Perlov <oleksandrperlov@gmail.com>
Co-authored-by: Cateline Mnemosyne <123184375+catelinemnemosyne@users.noreply.github.com>
Co-authored-by: Raphael Gonçalves <89359384+raphaelricardo10@users.noreply.github.com>
Co-authored-by: Rehman <rehman.2468@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: rickstaa <rickstaa@users.noreply.github.com>
Co-authored-by: Etanarvazac Revorix <etanarvazac@outlook.com>
Co-authored-by: Eduardo Zaniboni <67515606+eduardozaniboni@users.noreply.github.com>
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
Co-authored-by: Fabiano Couto <facodeli@gmail.com>
Co-authored-by: LOKESH SINGH <77314004+LokeshXs@users.noreply.github.com>
Co-authored-by: Alexandr Garbuzov <53787217+qwerty541@users.noreply.github.com>
Co-authored-by: kitswas <90329875+kitswas@users.noreply.github.com>
Co-authored-by: Rongrong <i@rong.moe>
Co-authored-by: Nabil Alamin <aminonimisi2@gmail.com>
Co-authored-by: Alexandr Garbuzov <qwerty541zxc@gmail.com>
Co-authored-by: François Rozet <francois.rozet@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-translation README doc translations. documentation Improvements or additions to documentation. enhancement New feature or request. ranks Feature, Bug fix, improvement related to ranking system. ⭐ top pull request Top pull request. stats-card Feature, Enhancement, Fixes related to stats the stats card.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rank doesn't take into account whether include_all_commits is taken into account