Skip to content

Commit

Permalink
Reorder
Browse files Browse the repository at this point in the history
  • Loading branch information
jacoblee93 committed Feb 20, 2024
1 parent 19d55ee commit d92e536
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 20 deletions.
24 changes: 18 additions & 6 deletions .github/actions/people/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,10 @@ def get_graphql_response(


def get_graphql_pr_edges(*, settings: Settings, after: Union[str, None] = None):
six_months_ago = (datetime.now() - timedelta(days=6*30)).strftime('%Y-%m-%d')
data = get_graphql_response(
settings=settings,
query=prs_query,
filter=f"repo:langchain-ai/langchain is:pr is:merged created:>{six_months_ago}",
filter=f"repo:langchain-ai/langchain is:pr is:merged",
after=after
)
graphql_response = PullRequestResponse.model_validate(data)
Expand Down Expand Up @@ -453,6 +452,7 @@ def get_contributors(settings: Settings):

contributors = Counter()
contributor_scores = Counter()
recent_contributor_scores = Counter()
reviewers = Counter()
authors: Dict[str, Author] = {}

Expand All @@ -469,8 +469,12 @@ def get_contributors(settings: Settings):
contributors[pr.author.login] += 1
files_changed = pr.changedFiles
lines_changed = pr.additions + pr.deletions
contributor_scores[pr.author.login] += _logistic(files_changed, 20) + _logistic(lines_changed, 100)
return contributors, contributor_scores, reviewers, authors
score = _logistic(files_changed, 20) + _logistic(lines_changed, 100)
contributor_scores[pr.author.login] += score
three_months_ago = (datetime.now(timezone.utc) - timedelta(days=6*30))
if datetime.fromisoformat(pr.createdAt) > three_months_ago:
recent_contributor_scores[pr.author.login] += score
return contributors, contributor_scores, recent_contributor_scores, reviewers, authors


def get_top_users(
Expand Down Expand Up @@ -506,7 +510,7 @@ def get_top_users(
# question_commentors, question_last_month_commentors, question_authors = get_experts(
# settings=settings
# )
contributors, contributor_scores, reviewers, pr_authors = get_contributors(
contributors, contributor_scores, recent_contributor_scores, reviewers, pr_authors = get_contributors(
settings=settings
)
# authors = {**question_authors, **pr_authors}
Expand All @@ -527,7 +531,8 @@ def get_top_users(
"obi1kenobi",
"langchain-infra",
"jacoblee93",
"dqbd"
"dqbd",
"bracesproul",
}
bot_names = {"dosubot", "github-actions", "CodiumAI-Agent"}
maintainers = []
Expand Down Expand Up @@ -560,6 +565,12 @@ def get_top_users(
# authors=authors,
# skip_users=skip_users,
# )
top_recent_contributors = get_top_users(
counter=recent_contributor_scores,
min_count=min_score_contributor,
authors=authors,
skip_users=skip_users,
)[:20]
top_contributors = get_top_users(
counter=contributor_scores,
min_count=min_score_contributor,
Expand All @@ -577,6 +588,7 @@ def get_top_users(
"maintainers": maintainers,
# "experts": experts,
# "last_month_active": last_month_active,
"top_recent_contributors": top_recent_contributors,
"top_contributors": top_contributors,
"top_reviewers": top_reviewers,
}
Expand Down
22 changes: 13 additions & 9 deletions docs/docs/people.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,27 @@ There are some incredible humans from all over the world who have been instrumen

This page highlights a few of those folks who have dedicated their time to the open-source repo in the form of direct contributions and reviews.

## Top contributors
## Top reviewers

The list below contains contributors who have had the most PRs merged in the last six months, imperfectly weighted by impact.
As LangChain has grown, the amount of surface area that maintainers cover has grown as well.

For a full list of contributors, see [this GitHub page](https://github.com/langchain-ai/langchain/graphs/contributors).
Thank you to the following folks who have gone above and beyond in reviewing incoming PRs 🙏!

Thank you all so much for your time and efforts in making LangChain better ❤️!
<People type="top_reviewers"></People>

<People type="top_contributors"></People>
## Top recent contributors

## Top reviewers
The list below contains contributors who have had the most PRs merged in the last three months, weighted (imperfectly) by impact.

As LangChain has grown, the amount of surface area that maintainers cover has grown as well.
Thank you all so much for your time and efforts in making LangChain better ❤️!

Thank you to the following folks who have gone above and beyond in reviewing incoming PRs 🙏 - again, this is not an exhaustive list!
<People type="top_recent_contributors"></People>

<People type="top_reviewers"></People>
## Top all-time contributors

This is an all-time list of all-stars who have made significant contributions to the framework 🌟:

<People type="top_contributors"></People>

## Core maintainers

Expand Down
9 changes: 4 additions & 5 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,16 +176,15 @@ const config = {
label: "API",
position: "left",
},
{
to: "/docs/people/",
label: "People",
position: "left",
},
{
type: "dropdown",
label: "More",
position: "left",
items: [
{
to: "/docs/people/",
label: "People",
},
{
to: "/docs/packages",
label: "Versioning",
Expand Down

0 comments on commit d92e536

Please sign in to comment.