diff --git a/docs/user_docs/intro.md b/docs/user_docs/intro.md index ac3a125..90c1b30 100644 --- a/docs/user_docs/intro.md +++ b/docs/user_docs/intro.md @@ -27,28 +27,28 @@ OpenDigger 实现的所有指标对所有人开放使用, OpenDigger 的静态 - 仓库全域 OpenRank + 仓库全域 OpenRank X-lab openrank.json 链接 Demo - 开发者全域 OpenRank + 开发者全域 OpenRank X-lab openrank.json 链接 Demo - 仓库社区 OpenRank + 仓库社区 OpenRank X-lab community_openrank.json 链接 Demo - 开发者社区 OpenRank + 开发者社区 OpenRank X-lab - 链接 diff --git a/docs/user_docs/metrics/community_openrank.md b/docs/user_docs/metrics/community_openrank.md index 31e27f3..dd50535 100644 --- a/docs/user_docs/metrics/community_openrank.md +++ b/docs/user_docs/metrics/community_openrank.md @@ -1,4 +1,4 @@ -# 社区 OpenRank +# 社区 OpenRank 贡献度 ![From](https://img.shields.io/badge/来自-X--lab-blue) ![For](https://img.shields.io/badge/用于-开发者-blue) @@ -8,21 +8,24 @@ 与全域 OpenRank 指标的计算方法类似,该算法使用项目内的 Issue、PR 等协作数据来构建网络,其网络模型为: -
- ```mermaid -graph TD - classDef rounded rx:5,ry:5; - - Developer["开发者\n---------------------\nOpenRank | 数值"]:::rounded - issue["issue\n---------------------\nOpenRank | 数值"]:::rounded - pull_request["pull_request\n---------------------\nOpenRank | 数值"]:::rounded - repo["仓库\n---------------------\nOpenRank | 数值"]:::rounded - - Developer -->|活跃| issue - Developer -->|活跃| pull_request - issue -->|属于| repo - pull_request -->|属于| repo +erDiagram + Issue }|--|| Repo: belong + ChangeRequest }|--|| Repo: belong + Developer }|--|{ Issue: activity + Developer }|--|{ ChangeRequest: activity + Repo { + OpenRank number + } + ChangeRequest { + OpenRank number + } + Issue { + OpenRank number + } + Developer { + OpenRank number + } ``` ## 代码 diff --git a/docs/user_docs/metrics/global_openrank.md b/docs/user_docs/metrics/global_openrank.md index e69b8f3..b2714b9 100644 --- a/docs/user_docs/metrics/global_openrank.md +++ b/docs/user_docs/metrics/global_openrank.md @@ -1,28 +1,30 @@ -# 全域 OpenRank +# 全域 OpenRank 影响力 ![From](https://img.shields.io/badge/来自-X--lab-blue) ![For](https://img.shields.io/badge/用于-项目/开发者-blue) ## 定义 -全域 OpenRank 是一个由 X-lab 开放实验室提出的开源指标,该指标由赵生宇博士提出,关于全域 OpenRank 的算法细节可以参考[这篇博客](https://blog.frankzhao.cn/how_to_measure_open_source_3)。 +全域 OpenRank 影响力是一个由 X-lab 开放实验室提出的开源指标,该指标由赵生宇博士提出,关于全域 OpenRank 影响力的算法细节可以参考[这篇博客](https://blog.frankzhao.cn/how_to_measure_open_source_3)。 -全域 OpenRank 是`活跃度`指标的一个下游指标,借鉴了`活跃度`来构建 GitHub 全域项目与开发者之间的一个协作网络,其网络模型是: +全域 OpenRank 影响力是[`活跃度`](./activity)指标的一个下游指标,借鉴了`活跃度`来构建 GitHub 全域项目与开发者之间的一个协作网络,其网络模型是: +
+ +
-```mermaid -graph TD - classDef rounded rx:5,ry:5; - - Developer["开发者\n---------------------\nOpenRank | 数值"]:::rounded - repo["仓库\n---------------------\nOpenRank | 数值"]:::rounded +## 价值主张 - Developer --> |活跃| repo -``` -
+全域 OpenRank 影响力使用所有全域开发者与仓库的协作关系构建协作网络,并使用 OpenRank 算法进行评价,其基本价值主张是: -在全域 OpenRank 指标的实现中,使用`活跃度`指标作为开发者与仓库之间的边的权重,从而构建出全域协作网络来计算网络中每个节点在每个月的全域 OpenRank 值。但与`活跃度`不同的地方在于,我们并没有对开发者的加权活跃值进行开方运算,这是由于`活跃度`指标中的开方运算是为了将社区参与人数(社区规模)的因素引入到指标计算中,但对于协作网络而言,社区参与人数这个变量已经隐含在了网络结构中。 +- 影响力大的项目更容易吸引到更多更有影响力的开发者深度参与。 +- 更多的深度参与影响力大的项目会让开发者更有影响力。 +- 全域 OpenRank 的计算会部分继承历史数据,从而体现出对于长期主义的重视 -与传统 PageRank 不同之处在于,计算中每个节点的全域 OpenRank 值将不仅仅依赖于当月的协作网络结构,并且也部分依赖于该节点在上个月的全域 OpenRank 值。即对于全域协作网络中的每个开发者和仓库节点,会部分的继承其历史的 OpenRank 值,这里也是体现了开源中珍视长期价值的价值观。 +## 指标特点 + +- 由于 OpenRank 是通过协作关系构建的网络指标,相较统计型指标有很强的鲁棒性。即便不做额外处理,如果出现相当比例的数据缺失,OpenRank 依然有很好的平滑性。 +- 通过网络关系,可以很好的识别和过滤自动化行为带来的高活跃节点,使得这些节点无法因为高活跃而获得高排名(如 [pddemo](https://github.com/pddemo/demo))。 +- 由于重视长期价值,一些有大量初级开发者参与的学习型仓库并不会获得非常高的排名,因为参与的开发者主要是刚进入开源世界的开发者,而资深开发者则不会深度参与。(如 [first-contributions](https://github.com/firstcontributions/first-contributions))。 ## 代码 @@ -36,8 +38,10 @@ graph TD | 参数名 | 值 | 参数描述 | 注 | | :------------- | :---- | :---------- | :--- | -| OpenRank 默认值 | 1.0 | 协作网中新节点的默认值,例如新加入网络的开发者节点与新仓库 | | -| 开发者继承比例 | 0.5 | 开发者节点对于上个月 OpenRank 的依赖比例 | 该算法认为相较于仓库,开发者的价值更应体现出开源中的长期价值,因此开发者对于历史价值的依赖度较高 | -| 仓库继承比例 | 0.3 | 仓库节点对于上个月 OpenRank 的依赖比例 | | -| OpenRank 衰减系数 | 0.85 | 对于当月不活跃的开发者和仓库节点的 OpenRank 衰减比例 | OpenRank 价值并不会因为开发者或仓库仅在某月不活跃就直接清零 | -| OpenRank 最小值 | 0.1 | 当节点 OpenRank 衰减值该值以下时清空节点 OpenRank | | +| 仓库 OpenRank 默认值 | $0$ | 协作网络中新增仓库节点的默认值 | 该算法认为协作网络中的价值均应来自开发者的活跃,因此仓库节点默认不提供价值 | +| 开发者 OpenRank 默认值 | $0$ | 协作网络中新增开发者节点的默认值 | 该算法认为协作网络中的价值来自开发者活跃,因此开发者默认不提供价值 | +| 开发者 OpenRank 增值 | $min(1,a/88.17)$ | 每次计算时开发者节点的 OpenRank 增值 | 网络中所有价值均来自开发者当月活跃带来的 OpenRank 增值。其中 88.17 为全域开发者每月活跃度分布的 75% 分位数,大于该值则均为 1,小于该值则线性衰减 | +| 开发者继承比例 | $0.5$ | 开发者节点对于上个月 OpenRank 的依赖比例 | 该算法认为相较于仓库,开发者的价值更应体现出开源中的长期价值,因此开发者对于历史价值的依赖度较高 | +| 仓库继承比例 | $0.3$ | 仓库节点对于上个月 OpenRank 的依赖比例 | | +| OpenRank 衰减系数 | $0.85$ | 对于当月不活跃的开发者和仓库节点的 OpenRank 衰减比例 | 所有节点无论是否活跃,均会在当月有一定衰减,从而需要额外的开发者活跃来维持网络价值 | +| OpenRank 最小值 | $1$ | 当节点 OpenRank 衰减至该值以下时清空节点 OpenRank | | diff --git a/docs/user_docs/metrics/metrics_usage_guide.md b/docs/user_docs/metrics/metrics_usage_guide.md index 8937a5e..d4e739f 100644 --- a/docs/user_docs/metrics/metrics_usage_guide.md +++ b/docs/user_docs/metrics/metrics_usage_guide.md @@ -25,28 +25,28 @@ OpenDigger 实现的所有指标对所有人开放使用,OpenDigger 的静态 - 仓库全域 OpenRank + 仓库全域 OpenRank X-lab openrank.json 链接 Demo - 开发者全域 OpenRank + 开发者全域 OpenRank X-lab openrank.json 链接 Demo - 仓库社区 OpenRank + 仓库社区 OpenRank X-lab community_openrank.json 链接 Demo - 开发者社区 OpenRank + 开发者社区 OpenRank X-lab - 链接 @@ -71,7 +71,7 @@ OpenDigger 实现的所有指标对所有人开放使用,OpenDigger 的静态 - 仓库活跃度 + 仓库活跃度 X-lab activity.json 链接 @@ -82,7 +82,7 @@ OpenDigger 实现的所有指标对所有人开放使用,OpenDigger 的静态 Demo - 开发者活跃度 + 开发者活跃度 X-lab activity.json 链接 @@ -100,7 +100,7 @@ OpenDigger 实现的所有指标对所有人开放使用,OpenDigger 的静态 Demo - 技术分叉 + 技术分叉 CHAOSS technical_fork.json 链接 @@ -114,7 +114,7 @@ OpenDigger 实现的所有指标对所有人开放使用,OpenDigger 的静态 Demo - 活跃日期和时间 + 活跃日期和时间 CHAOSS active_dates_and_times.json 链接 @@ -139,7 +139,7 @@ OpenDigger 实现的所有指标对所有人开放使用,OpenDigger 的静态 - 新贡献者 + 新贡献者 CHAOSS new_contributors.json 链接 @@ -149,7 +149,7 @@ OpenDigger 实现的所有指标对所有人开放使用,OpenDigger 的静态 new_contributors_detail.json - 贡献者 + 贡献者 CHAOSS contributors.json 链接 @@ -159,7 +159,7 @@ OpenDigger 实现的所有指标对所有人开放使用,OpenDigger 的静态 contributors_detail.json - 不活跃的贡献者 + 不活跃的贡献者 CHAOSS inactive_contributors.json 链接 @@ -173,7 +173,7 @@ OpenDigger 实现的所有指标对所有人开放使用,OpenDigger 的静态 Demo - 贡献者缺席因素 + 贡献者缺席因素 CHAOSS bus_factor.json 链接 @@ -201,14 +201,14 @@ OpenDigger 实现的所有指标对所有人开放使用,OpenDigger 的静态 - 新问题 + 新问题 CHAOSS issues_new.json 链接 Demo - 已关闭的问题 + 已关闭的问题 CHAOSS issues_closed.json 链接 @@ -220,21 +220,21 @@ OpenDigger 实现的所有指标对所有人开放使用,OpenDigger 的静态 链接 - 问题响应时间 + 问题响应时间 CHAOSS issue_response_time.json 链接 Demo - 问题解决持续时间 + 问题解决持续时间 CHAOSS issue_resolution_duration.json 链接 Demo - 问题年龄 + 问题年龄 CHAOSS issue_age.json 链接 @@ -259,47 +259,47 @@ OpenDigger 实现的所有指标对所有人开放使用,OpenDigger 的静态 - 变更请求 + 变更请求 CHAOSS change_requests.json 链接 Demo - 接受的变更请求 + 接受的变更请求 CHAOSS change_requests_accepted.json 链接 - 变更请求审查 + 变更请求审查 CHAOSS change_requests_reviews.json 链接 - 变更请求响应时间 + 变更请求响应时间 CHAOSS change_request_response_time.json 链接 Demo - 变更请求解决持续时间 + 变更请求解决持续时间 CHAOSS change_request_resolution_duration.json 链接 Demo - 变更请求年龄 + 变更请求年龄 CHAOSS change_request_age.json 链接 Demo - 代码更改行 + 代码更改行 CHAOSS code_change_lines_add.json 链接 diff --git a/i18n/en/docusaurus-plugin-content-docs/current/user_docs/intro.md b/i18n/en/docusaurus-plugin-content-docs/current/user_docs/intro.md index 1a16abd..5e1c878 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/user_docs/intro.md +++ b/i18n/en/docusaurus-plugin-content-docs/current/user_docs/intro.md @@ -32,28 +32,28 @@ Feel free to use the data to construct your own data application and you can ref - Repo Global OpenRank + Repo Global OpenRank X-lab openrank.json Link Demo - Developer Global OpenRank + Developer Global OpenRank X-lab openrank.json Link Demo - Repo Community OpenRank + Repo Community OpenRank X-lab community_openrank.json Link Demo - Developer Community OpenRank + Developer Community OpenRank X-lab - Link diff --git a/i18n/en/docusaurus-plugin-content-docs/current/user_docs/metrics/community_openrank.md b/i18n/en/docusaurus-plugin-content-docs/current/user_docs/metrics/community_openrank.md index f637d84..cdd0ebf 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/user_docs/metrics/community_openrank.md +++ b/i18n/en/docusaurus-plugin-content-docs/current/user_docs/metrics/community_openrank.md @@ -8,21 +8,24 @@ 与全域 OpenRank 指标的计算方法类似,该算法使用项目内的 Issue、PR 等协作数据来构建网络,其网络模型为: -
- ```mermaid -graph TD - classDef rounded rx:5,ry:5; - - Developer["开发者\n---------------------\nOpenRank | 数值"]:::rounded - issue["issue\n---------------------\nOpenRank | 数值"]:::rounded - pull_request["pull_request\n---------------------\nOpenRank | 数值"]:::rounded - repo["仓库\n---------------------\nOpenRank | 数值"]:::rounded - - Developer -->|活跃| issue - Developer -->|活跃| pull_request - issue -->|属于| repo - pull_request -->|属于| repo +erDiagram + Issue }|--|| Repo: belong + ChangeRequest }|--|| Repo: belong + Developer }|--|{ Issue: activity + Developer }|--|{ ChangeRequest: activity + Repo { + OpenRank number + } + ChangeRequest { + OpenRank number + } + Issue { + OpenRank number + } + Developer { + OpenRank number + } ``` ## 代码 diff --git a/i18n/en/docusaurus-plugin-content-docs/current/user_docs/metrics/global_openrank.md b/i18n/en/docusaurus-plugin-content-docs/current/user_docs/metrics/global_openrank.md index 8f0e1e0..ec0ab59 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/user_docs/metrics/global_openrank.md +++ b/i18n/en/docusaurus-plugin-content-docs/current/user_docs/metrics/global_openrank.md @@ -1,41 +1,47 @@ -# Global OpenRank +# Global OpenRank Influence -![From](https://img.shields.io/badge/来自-X--lab-blue) ![For](https://img.shields.io/badge/用于-项目/开发者-blue) +![From](https://img.shields.io/badge/From-X--lab-blue) ![For](https://img.shields.io/badge/For-Projects/Developers-blue) -## 定义 +## Definition -全域 OpenRank 是一个由 X-lab 开放实验室提出的开源指标,该指标由赵生宇博士提出,关于全域 OpenRank 的算法细节可以参考[这篇博客](https://blog.frankzhao.cn/how_to_measure_open_source_3)。 +Global OpenRank Influence is an open-source metric proposed by Dr. Frank Zhao from X-lab. For detailed information on the Global OpenRank Influence algorithm, you can refer to [this blog post](https://blog.frankzhao.cn/how_to_measure_open_source_3). -全域 OpenRank 是`活跃度`指标的一个下游指标,借鉴了`活跃度`来构建 GitHub 全域项目与开发者之间的一个协作网络,其网络模型是: +Global OpenRank Influence is a downstream metric of the [`activity`](./activity) metric, which is used to build a collaboration network between global open source repositories and developers. Its network model is: +
+ +
-```mermaid -graph TD - classDef rounded rx:5,ry:5; - - Developer["开发者\n---------------------\nOpenRank | 数值"]:::rounded - repo["仓库\n---------------------\nOpenRank | 数值"]:::rounded +## Value Proposition - Developer --> |活跃| repo -``` -
+Global OpenRank Influence constructs a collaboration network using the relationships between all global developers and repositories and evaluates them using the OpenRank algorithm. Its core value propositions are: -在全域 OpenRank 指标的实现中,使用`活跃度`指标作为开发者与仓库之间的边的权重,从而构建出全域协作网络来计算网络中每个节点在每个月的全域 OpenRank 值。但与`活跃度`不同的地方在于,我们并没有对开发者的加权活跃值进行开方运算,这是由于`活跃度`指标中的开方运算是为了将社区参与人数(社区规模)的因素引入到指标计算中,但对于协作网络而言,社区参与人数这个变量已经隐含在了网络结构中。 +- Projects with greater influence are more likely to attract more influential developers to deeply participate. +- More deep participation in highly influential projects will make developers more influential. +- The calculation of Global OpenRank partially inherits historical data, reflecting an emphasis on long-termism. -与传统 PageRank 不同之处在于,计算中每个节点的全域 OpenRank 值将不仅仅依赖于当月的协作网络结构,并且也部分依赖于该节点在上个月的全域 OpenRank 值。即对于全域协作网络中的每个开发者和仓库节点,会部分的继承其历史的 OpenRank 值,这里也是体现了开源中珍视长期价值的价值观。 +## Metric Features -## 代码 +- Since OpenRank is a network metric built based on collaboration relationships, it is more robust compared to statistical metrics. Even without additional processing, OpenRank remains smooth and reliable even in the case of significant data loss. +- Through network relationships, it effectively identifies and filters out highly active nodes caused by automated behavior, preventing them from achieving high rankings due to high activity (e.g., [pddemo](https://github.com/pddemo/demo)). +- Due to its emphasis on long-term value, repositories that serve as learning platforms for many junior developers do not receive very high rankings, as the developers participating in these projects are mostly new to the open source world, while senior developers typically do not engage deeply (e.g., [first-contributions](https://github.com/firstcontributions/first-contributions)). -由于全域 OpenRank 是基于 Neo4j 数据库的图指标实现,我们并没有在 OpenDigger 中完全开源全域 OpenRank 的计算代码。但我们将每月的结算结果导入到了 ClickHouse 数据库中,因此依然可以通过 OpenDigger 的[代码](https://github.com/X-lab2017/open-digger/blob/master/src/metrics/indices.ts#L21)来访问各项目与开发者的全域 OpenRank 值。 +## Code -## 参数 +Here is the [**implementation code**](https://github.com/X-lab2017/open-digger/blob/master/src/cron/tasks/global_openrank.ts). -全域 OpenRank 的计算中包含的参数如下: +The underlying Neo4j [plugin project](https://github.com/X-lab2017/openrank-neo4j-gds) used for calculating general OpenRank has been open-sourced. Feel free to use it. -| 参数名 | 值 | 参数描述 | 注 | -| :------------- | :---- | :---------- | :--- | -| OpenRank 默认值 | 1.0 | 协作网中新节点的默认值,例如新加入网络的开发者节点与新仓库 | | -| 开发者继承比例 | 0.5 | 开发者节点对于上个月 OpenRank 的依赖比例 | 该算法认为相较于仓库,开发者的价值更应体现出开源中的长期价值,因此开发者对于历史价值的依赖度较高 | -| 仓库继承比例 | 0.3 | 仓库节点对于上个月 OpenRank 的依赖比例 | | -| OpenRank 衰减系数 | 0.85 | 对于当月不活跃的开发者和仓库节点的 OpenRank 衰减比例 | OpenRank 价值并不会因为开发者或仓库仅在某月不活跃就直接清零 | -| OpenRank 最小值 | 0.1 | 当节点 OpenRank 衰减值该值以下时清空节点 OpenRank | | +## Parameters + +The parameters included in the calculation of Global OpenRank are as follows: + +| Parameter Name | Value | Description | Notes | +| :------------------------- | :------------------------- | :----------------------------------------------------------------- | :------------------------------------------------------------------- | +| Repository OpenRank Default Value | $0$ | Default value for new repository nodes in the collaboration network | The algorithm assumes that the value in the collaboration network should come from developer activity, so repository nodes do not provide initial value by default. | +| Developer OpenRank Default Value | $0$ | Default value for new developer nodes in the collaboration network | The algorithm assumes that the value in the collaboration network comes from developer activity, so developers do not provide initial value by default. | +| Developer OpenRank Increment | $min(1,a/88.17)$ | Developer node OpenRank increment in each calculation | All value in the network comes from the OpenRank increment generated by developer activity during the month. 88.17 is the 75th percentile of global developer monthly activity distribution; values greater than this are capped at 1, while lower values decay linearly. | +| Developer Inheritance Ratio | $0.5$ | Developer node dependency ratio on the previous month's OpenRank | The algorithm assumes that, compared to repositories, the value of developers should better reflect long-term value in open source, so developers have a higher dependency on historical value. | +| Repository Inheritance Ratio | $0.3$ | Repository node dependency ratio on the previous month's OpenRank | | +| OpenRank Decay Coefficient | $0.85$ | OpenRank decay ratio for inactive developers and repository nodes | All nodes, whether active or not, will experience some decay each month, requiring additional developer activity to maintain the network's value. | +| OpenRank Minimum Value | $1$ | When a node's OpenRank decays below this value, its OpenRank is cleared | | diff --git a/i18n/en/docusaurus-plugin-content-docs/current/user_docs/metrics/metrics_usage_guide.md b/i18n/en/docusaurus-plugin-content-docs/current/user_docs/metrics/metrics_usage_guide.md index 37e1070..51830a3 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/user_docs/metrics/metrics_usage_guide.md +++ b/i18n/en/docusaurus-plugin-content-docs/current/user_docs/metrics/metrics_usage_guide.md @@ -25,28 +25,28 @@ Below is a complete list of metric data, and you can try the data on the [Playgr - Repo Global OpenRank + Repo Global OpenRank X-lab openrank.json Link Demo - Developer Global OpenRank + Developer Global OpenRank X-lab openrank.json Link Demo - Repo Community OpenRank + Repo Community OpenRank X-lab community_openrank.json Link Demo - Developer Community OpenRank + Developer Community OpenRank X-lab - Link diff --git a/static/img/global_openrank.svg b/static/img/global_openrank.svg new file mode 100644 index 0000000..77b6303 --- /dev/null +++ b/static/img/global_openrank.svg @@ -0,0 +1,249 @@ + + + + + + + + + + + Repo + + Developer + + Bg + + + + + + + + + +
+

+
+
+
+ + EN + 中文 + +