├── .github ├── ISSUE_TEMPLATE │ ├── config.yml │ ├── establishing.yaml │ └── problem.yaml └── workflows │ └── issue_labeled.yml ├── CODE_OF_CONDUCT.md ├── GITHUB.md ├── GUIDE.md ├── HONORS.md ├── OP.md ├── README.md ├── REWARD.md ├── ROLES.md ├── epubit-author-writing-guide.pdf ├── statistic.py └── whale-coin.py /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: true 2 | contact_links: 3 | - name: 💬 参与讨论 4 | url: https://github.com/datawhalechina/DOPMC/discussions 5 | about: 欢迎参与到 Datawhale 社区的讨论 6 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/establishing.yaml: -------------------------------------------------------------------------------- 1 | name: 💡 立项 2 | description: 在Datawhale社区发起一个新的项目 3 | title: "这里写项目名称,要求只能包含小写英文字母和-,例如:pumpkin-book、joyful-pandas" 4 | labels: "立项申请" 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | 👏欢迎你来到Datawhale社区发起新的项目,为了便于我们了解你的项目,请填写以下信息~ 10 | ❗❗❗注意❗❗❗:如果不知道如何填写或者有任何疑问均可随时联系微信:at-Sm1les进行咨询~ 11 | - type: checkboxes 12 | attributes: 13 | label: "你是否已经阅读并同意《Datawhale开源项目指南》?" 14 | options: 15 | - label: "我已阅读并同意[《Datawhale开源项目指南》](https://github.com/datawhalechina/DOPMC/blob/main/GUIDE.md)" 16 | required: true 17 | - type: checkboxes 18 | attributes: 19 | label: "你是否已经阅读并同意《Datawhale开源项目行为准则》?" 20 | options: 21 | - label: "我已阅读并同意[《Datawhale开源项目行为准则》](https://github.com/datawhalechina/DOPMC/blob/main/CODE_OF_CONDUCT.md)" 22 | required: true 23 | - type: textarea 24 | id: description 25 | attributes: 26 | label: "项目简介" 27 | description: "请对你的项目做个简单的介绍" 28 | validations: 29 | required: true 30 | - type: textarea 31 | id: motivation 32 | attributes: 33 | label: "立项理由" 34 | description: "请描述一下你发起这个项目的理由" 35 | validations: 36 | required: true 37 | - type: textarea 38 | id: audience 39 | attributes: 40 | label: "项目受众" 41 | description: "请描述一下这个项目所面向的受众" 42 | validations: 43 | required: true 44 | - type: textarea 45 | id: highlight 46 | attributes: 47 | label: "项目亮点" 48 | description: "请确保已对类似项目做过充分调研,如果已有类似项目,请详细列出,并阐述本项目的不同之处" 49 | validations: 50 | required: true 51 | - type: textarea 52 | id: plan 53 | attributes: 54 | label: "项目规划" 55 | description: "请分别从内容、时间和人员三个方面描述一下你的项目规划" 56 | value: | 57 | 至少包括以下内容: 58 | 1.目录(如有多级至少精确到二级) 59 | 2.各章节负责人 60 | 3.各章节预估完成日期 61 | 4.可预见的困难 62 | validations: 63 | required: true 64 | - type: textarea 65 | id: content 66 | attributes: 67 | label: "已完成内容" 68 | description: "如果你已经写好了部分或者全部内容,请在下方填写可公开访问的链接,例如GitHub链接、博客链接等" 69 | - type: checkboxes 70 | attributes: 71 | label: "❗❗❗注意事项❗❗❗:为了便于我们跟你取得联系,请务必加我们的微信:at-Sm1les(备注你来自于项目立项即可),发起立项申请后DOPMC成员将会在7天内给出审核意见并评论在该Issue,若7天内无反对意见则默认立项通过,如有任何疑问或者需要帮助均可随时联系微信:at-Sm1les" 72 | options: 73 | - label: "我已知悉上述注意事项并添加了微信:at-Sm1les" 74 | required: true 75 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/problem.yaml: -------------------------------------------------------------------------------- 1 | name: 🥰 反馈问题 2 | description: 一起改进 Datawhale 社区 3 | title: "" 4 | labels: [feedback] 5 | assignees: 6 | - SuperSupeng 7 | body: 8 | - type: markdown 9 | attributes: 10 | value: | 11 | 感谢参与到 Datawhale 社区中来,请填写以下信息! 12 | - type: checkboxes 13 | attributes: 14 | label: Datawhale 社区中是否已经存在了相似的问题? 15 | description: 请在 issue 列表中搜索一下社区是否存在类似问题 16 | options: 17 | - label: I have searched the existing issues 18 | required: true 19 | - type: textarea 20 | id: field1 21 | attributes: 22 | label: 描述 23 | description: | 24 | 详细描述一下问题 25 | render: markdown 26 | validations: 27 | required: true 28 | - type: textarea 29 | id: field2 30 | attributes: 31 | label: 解决方案 32 | description: 是否有初步的解决方案 33 | render: markdown 34 | validations: 35 | required: false 36 | - type: textarea 37 | id: field3 38 | attributes: 39 | label: 其他信息? 40 | description: | 41 | 相关链接或者其他与该问题相关的信息,或者任何其他的背景资料信息 42 | render: markdown 43 | validations: 44 | required: false 45 | -------------------------------------------------------------------------------- /.github/workflows/issue_labeled.yml: -------------------------------------------------------------------------------- 1 | name: Issue Reply 2 | 3 | on: 4 | issues: 5 | types: [labeled] 6 | 7 | jobs: 8 | reply-helper: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: help wanted 12 | if: github.event.label.name == 'help wanted' 13 | uses: actions-cool/issues-helper@v3 14 | with: 15 | actions: 'create-comment' 16 | token: ${{ secrets.GITHUB_TOKEN }} 17 | issue-number: ${{ github.event.issue.number }} 18 | body: | 19 | 你好 @${{ github.event.issue.user.login }},Datawhale 社区已经收到求助信息 ⚠️,会很快进行反馈。 20 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Datawhale开源项目行为准则 2 | ## 为什么会有此行为准则? 3 | 本行为准则是Datawhale与其下属开源项目团队所约定的行为准则,由[Datawhale开源项目管理委员会(Datawhale Open-source Project Management Committee,简称DOPMC)](https://github.com/datawhalechina/DOPMC)制定并发行,其旨在规范化管理开源项目,明确DOPMC、项目负责人和开源项目团队(由项目负责人及其核心贡献者所构成的团队,以下简称“项目团队”)的责任与义务。 4 | 5 | ## 谁会受到行为准则的约束? 6 | 本行为准则的约束对象为DOPMC成员、项目负责人、核心贡献者和贡献者,具体角色说明参见:[Roles](./ROLES.md)。 7 | 8 | ## 违反行为准则有什么后果? 9 | 若经DOPMC评估,项目负责人或项目团队有违反本行为准则或其他有违Datawhale社区价值观的行为,则DOPMC可重新指定项目负责人或项目团队。 10 | 11 | ## 权益 12 | 1. 项目版权归项目负责人所有; 13 | 2. 项目产生的商业收益须部分捐赠于Datawhale社区; 14 | 3. DOPMC的决策均须全员投票表决,DOPMC成员可弃票,除弃票外全部赞同则通过; 15 | 4. DOPMC成员投反对票时须给出理由,若其他DOPMC成员均不认同该理由,则当前的反对票改为弃票; 16 | 5. 所负责的项目达到毕业状态后方可申请立项新项目; 17 | 6. 项目立项和毕业由DOPMC决策。 18 | 19 | ## 运营 20 | 1. Issue是项目对外沟通的最重要渠道; 21 | 2. 项目团队须公开及时地处理Issue中的问题。 22 | 23 | ## 内容 24 | 1. 教程类项目须搭建可在线浏览的网站,同时在项目完成后发布PDF版本; 25 | 2. 项目根目录下的README.md里必须包含以下内容: 26 | - 项目负责人以及项目团队成员的联系方式; 27 | - Datawhale的宣传信息; 28 | - 项目所采用的开源协议; 29 | - 若非完全原创内容,则需要给出必要的版权说明。 30 | 31 | ## 协作 32 | 1. 项目团队须撰写相应的《贡献指南》用于指导贡献者如何正确参与贡献; 33 | 2. 贡献者须按照《贡献指南》发起Pull Request。 34 | 35 | 36 | -------------------------------------------------------------------------------- /GITHUB.md: -------------------------------------------------------------------------------- 1 | ## ISSUE 2 | 1. 打开项目的 ISSUE 列表,点击 New issue 按钮![](https://tva1.sinaimg.cn/large/e6c9d24ely1h1h9km0vb3j21gr0cbgn9.jpg) 3 | 2. 选择你想要创建的 ISSUE 类型![](https://tva1.sinaimg.cn/large/e6c9d24ely1h1xrdww3qbj21fw0bv3zv.jpg) 4 | 3. 根据模板填写对应的详细信息![](https://tva1.sinaimg.cn/large/e6c9d24ely1h1xrgu4x5xj20r00lamyg.jpg) 5 | 4. 点击 Submit new issue 按钮后就可以看到你提交的 ISSUE 啦✨![](https://tva1.sinaimg.cn/large/e6c9d24ely1h1hb700oq4j21gc0efwh9.jpg) 6 | 5. 如果你没有找到对应的 ISSUE 类型可以在 [Discussion](https://github.com/datawhalechina/DOPMC/discussions) 中进行讨论。 7 | 8 | ## PR 9 | 1. 首先在项目中创建对应的 ISSUE![](https://tva1.sinaimg.cn/large/e6c9d24ely1h1hafqc2zzj21gd0cmwg2.jpg) 10 | 2. 然后将项目 fork 到自己名下的仓库中![](https://tva1.sinaimg.cn/large/e6c9d24ely1h1h9re2007j21g40k9acr.jpg)![](https://tva1.sinaimg.cn/large/e6c9d24ely1h1h9sxgbq2j21gc0f2tah.jpg) 11 | 3. 待 fork 完毕后会看到属于你的项目分支版本,并点击 Proposals 目录![](https://tva1.sinaimg.cn/large/e6c9d24ely1h1h9u4myjyj21g10ldwi1.jpg) 12 | 4. 在这里点击 Add file 按钮可以看到,你可以选择直接新建文件或者将本地已经写好的 proposal 上传![](https://tva1.sinaimg.cn/large/e6c9d24ely1h1h9xrrfskj21g40bndhe.jpg) 13 | 5. 如果你选择新建文件的话,那么就输入文件名称并以 `.md` 结尾,在正文中填写对应的内容![](https://tva1.sinaimg.cn/large/e6c9d24ely1h1ha3mx3dzj20zq0homxr.jpg) 14 | 6. 无论你是选择直接新建文件或者将本地已经写好的 proposal 上传,在处理完毕后都需要填写本次提交的目的是什么,填写完毕后点击 Commit new file 后即可看到你创建的文件内容![](https://tva1.sinaimg.cn/large/e6c9d24ely1h1ha6b5k0jj20xv0bzmy9.jpg) 15 | 7. 待修改完毕后,点击进入 Pull requests 界面,点击 New pull request 按钮,可以看到该操作是想要将属于你项目的修改提交到 Datawhale 的项目中,当提示 Able to merge 按钮时再点击 Create pull request 按钮![](https://tva1.sinaimg.cn/large/e6c9d24ely1h1ha8czx9mj21fy0h5q4o.jpg)![](https://tva1.sinaimg.cn/large/e6c9d24ely1h1haarjypsj21gb0jaacw.jpg) 16 | 8. 在界面中 Title 处填写提交这个 PR 的目的,并在内容中通过 `#`(记得`#`前添加空格) 链接到对应的issue,然后点击Create pull request 按钮![](https://tva1.sinaimg.cn/large/e6c9d24ely1h1hai12zxhj21gc0kgdj5.jpg) 17 | 9. 你就可以看到对应的 PR 啦✨![](https://tva1.sinaimg.cn/large/e6c9d24ely1h1han36kcvj21ft0m6dj4.jpg) -------------------------------------------------------------------------------- /GUIDE.md: -------------------------------------------------------------------------------- 1 | # Datawhale开源项目指南 2 | 本指南由 [Datawhale开源项目管理委员会(Datawhale Open-source Project Management Committee,简称DOPMC)](https://github.com/datawhalechina/DOPMC)制定并发行,其用于指导如何在Datawhale社区从零开始发起开源项目直至项目毕业。 3 | 4 | ## 项目周期 5 | 开源项目的完整周期分为以下几个阶段:筹划、立项、内测、公测、毕业。 6 | 7 | ## 筹划 8 | 该阶段用于进行组建团队、进度规划、调研分析等准备工作,准确完毕后便可进入到立项阶段,在此阶段项目负责人可联系[保姆团队](./OP.md)辅助其在Datawhale社群招募合作者,项目负责人不可私自在Datawhale社群中发布招募信息。 9 | 10 | ## 立项 11 | 该阶段用于项目的综合评估,其流程如下: 12 | 1. 项目负责人需阅读熟知并同意[《Datawhale开源项目行为准则》](./CODE_OF_CONDUCT.md)中的所有内容; 13 | 2. 项目负责人使用Datawhale仓库模版在自己的GitHub账号下创建项目仓库(注意仓库名只能包含小写字母和“-”),模版链接:https://github.com/datawhalechina/repo-template ,使用方式如下: 14 | image 15 | 16 | 3. 创建完项目仓库后开始推进项目,项目完成度达到计划的50%时,打开[创建Issue](https://github.com/datawhalechina/DOPMC/issues/new/choose),选择创建“立项”型Issue,根据提示填写立项申请; 17 | 4. [DOPMC](./ROLES.md)公开审核立项申请,并在相应Issue评论审核意见; 18 | 5. [DOPMC](./ROLES.md)审核通过则立项成功,由[保姆团队](./OP.md)将Issue划归至[项目看板](https://github.com/datawhalechina/DOPMC/projects/1)的“立项”区,部分通过则划归至“筹划”区,待项目负责人按照审核意见修缮后再继续审核,直至项目立项成功; 19 | 6. 立项成功后,项目负责人联系[保姆团队](./OP.md)将项目仓库从自己的GitHub账号下迁移至Datawhale,并赋予项目负责人Maintain权限; 20 | 21 | ## 内测 22 | 该阶段用于项目的快速验证,其流程如下: 23 | 1. 项目开始推进后,项目负责人可随时联系[保姆团队](./OP.md)发起内测; 24 | 2. 项目负责人告知[保姆团队](./OP.md)招募内测用户的要求,[保姆团队](./OP.md)根据其要求招募内测用户; 25 | 3. 项目负责人制定内测任务和内测结束时间,内测期间项目负责人根据内测用户反馈修缮项目; 26 | 4. 内测结束时由[保姆团队](./OP.md)向内测用户发放调查问卷,收集内测用户反馈。 27 | 28 | ## 公测 29 | 该阶段用于项目的普适验证,其流程如下: 30 | 1. 完成内测后,项目负责人可随时联系[保姆团队](./OP.md)发起公测; 31 | 2. [保姆团队](./OP.md)联系组队学习小组举办组队学习; 32 | 3. 项目负责人按照[保姆团队](./OP.md)和组队学习小组的要求举办组队学习; 33 | 4. 组队学习结束时由[保姆团队](./OP.md)向学员发放调查问卷,收集学员反馈。 34 | 35 | ## 毕业 36 | 该阶段用于项目的验收,其流程如下: 37 | 1. 项目负责人完成项目所有内容后,联系[DOPMC](./ROLES.md)发起毕业审核; 38 | 2. [DOPMC](./ROLES.md)公开审核毕业申请,并在相应Issue评论审核意见; 39 | 3. [DOPMC](./ROLES.md)全员审核通过则毕业成功,由[保姆团队](./OP.md)将Issue划归至[项目看板](https://github.com/datawhalechina/DOPMC/projects/1)的“毕业”区,部分通过则由项目负责人按照审核意见修缮后再继续审核,直至项目毕业成功; 40 | 4. [保姆团队](./OP.md)联系宣传小组为毕业项目安排宣发。 41 | -------------------------------------------------------------------------------- /HONORS.md: -------------------------------------------------------------------------------- 1 |

开源徽章颁发规则

2 | 3 | ## 开源致新 4 | 优秀开源新项目 5 | 6 | 【评选规则】:star数达到1k 7 | 8 | ## 开源致成 9 | 优秀毕业项目 10 | 11 | 【评选规则】:通过DOMC毕业审核 12 | 13 | ## 开源致远 14 | 持续维护的优秀毕业项目 15 | 16 | 【评选规则】:持续release新版本的毕业项目 17 | 18 | ## 开源致卓 19 | 取得新突破的优秀毕业项目 20 | 21 | 【评选规则】:出版成书或者全新改版发布的毕业项目 22 | 23 | ## 最强辅助 24 | 优秀的开源项目保姆 25 | 26 | 【评选规则】:辅助开源项目获得任一开源徽章的保姆 27 | 28 | 29 |

颁发记录

30 | 31 |

2022年Q2颁奖名单

32 | 33 | #### 致卓奖 34 | 【获奖人】:谢文睿 35 | 36 | 【获奖理由】:从0到1发起南瓜书项目,是目前组织影响力最大的开源项目,同时做了开源项目背后大量的保姆工作,作为Datawhale开源项目负责人,推动开源项目持续发展。 37 | 38 | 【提名人】:范晶晶 39 | 40 | 【获奖人】:谢文睿 41 | 42 | 【获奖作品】:[pumpkin-book](https://github.com/datawhalechina/pumpkin-book) 43 | 44 | 【获奖理由】:取得新突破的优秀毕业项目 45 | 46 | 【提名人】:范晶晶 47 | 48 | 49 | 【获奖人】:秦州 50 | 51 | 【获奖作品】:[pumpkin-book](https://github.com/datawhalechina/pumpkin-book) 52 | 53 | 【获奖理由】:取得新突破的优秀毕业项目 54 | 55 | 【提名人】:范晶晶 56 | 57 | 58 | 【获奖人】:王琦 59 | 60 | 【获奖作品】:[easy-rl](https://github.com/datawhalechina/easy-rl) 61 | 62 | 【获奖理由】:取得新突破的优秀毕业项目 63 | 64 | 【提名人】:谢文睿 65 | 66 | 67 | 【获奖人】:杨毅远 68 | 69 | 【获奖作品】:[easy-rl](https://github.com/datawhalechina/easy-rl) 70 | 71 | 【获奖理由】:取得新突破的优秀毕业项目 72 | 73 | 【提名人】:谢文睿 74 | 75 | 76 | 【获奖人】:江季 77 | 78 | 【获奖作品】:[easy-rl](https://github.com/datawhalechina/easy-rl) 79 | 80 | 【获奖理由】:取得新突破的优秀毕业项目 81 | 82 | 【提名人】:谢文睿 83 | 84 | #### 致远奖 85 | 【获奖人】:耿远昊 86 | 87 | 【获奖作品】:[joyful-pandas](https://github.com/datawhalechina/joyful-pandas) 88 | 89 | 【获奖理由】:持续维护的优秀毕业项目 90 | 91 | 【提名人】:谢文睿 92 | 93 | 94 | 【获奖人】:王复振 95 | 96 | 【获奖作品】:[wonderful-sql](https://github.com/datawhalechina/wonderful-sql) 97 | 98 | 【获奖理由】:持续维护的优秀毕业项目 99 | 100 | 【提名人】:谢文睿 101 | 102 | #### 致成奖 103 | 【获奖人】:刘羽中 104 | 105 | 【获奖作品】:[competition-baseline](https://github.com/datawhalechina/competition-baseline) 106 | 107 | 【获奖理由】:优秀毕业项目 108 | 109 | 【提名人】:谢文睿 110 | 111 | 112 | 【获奖人】:王贺 113 | 114 | 【获奖作品】:[competition-baseline](https://github.com/datawhalechina/competition-baseline) 115 | 116 | 【获奖理由】:优秀毕业项目 117 | 118 | 【提名人】:谢文睿 119 | 120 | 121 | 【获奖人】:李嘉骐 122 | 123 | 【获奖作品】:[thorough-pytorch](https://github.com/datawhalechina/thorough-pytorch) 124 | 125 | 【获奖理由】:优秀毕业项目 126 | 127 | 【提名人】:谢文睿 128 | 129 | 130 | 【获奖人】:牛志康 131 | 132 | 【获奖作品】:[thorough-pytorch](https://github.com/datawhalechina/thorough-pytorch) 133 | 134 | 【获奖理由】:优秀毕业项目 135 | 136 | 【提名人】:谢文睿 137 | 138 | #### 致新奖 139 | 【获奖人】:王茂霖 140 | 141 | 【获奖作品】:[leeml-notes](https://github.com/datawhalechina/leeml-notes) 142 | 143 | 【获奖理由】:优秀新项目 144 | 145 | 【提名人】:谢文睿 146 | 147 | 148 | 【获奖人】:王佳旭 149 | 150 | 【获奖作品】:[leeml-notes](https://github.com/datawhalechina/leeml-notes) 151 | 152 | 【获奖理由】:优秀新项目 153 | 154 | 【提名人】:谢文睿 155 | 156 | 157 | 【获奖人】:金一鸣 158 | 159 | 【获奖作品】:[leeml-notes](https://github.com/datawhalechina/leeml-notes) 160 | 161 | 【获奖理由】:优秀新项目 162 | 163 | 【提名人】:谢文睿 164 | 165 | 166 | 【获奖人】:罗如意 167 | 168 | 【获奖作品】:[fun-rec](https://github.com/datawhalechina/fun-rec) 169 | 170 | 【获奖理由】:优秀新项目 171 | 172 | 【提名人】:谢文睿 173 | 174 | #### 保姆奖 175 | 【获奖人】:谢文睿 176 | 177 | 【获奖理由】:做了许多开源项目保姆工作 178 | 179 | 【提名人】:范晶晶 -------------------------------------------------------------------------------- /OP.md: -------------------------------------------------------------------------------- 1 | # Datawhale开源项目保姆团队 2 | ## 职责 3 | 服务好各个开源项目团队 4 | 5 | ## 名单 6 | | 姓名 | 联系方式 | 7 | | :----: |:----:| 8 | | 谢文睿 | 微信:at-Sm1les | 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

DOPMC

2 | 3 | Datawhale开源项目管理委员会(Datawhale Open-source Project Management Committee,简称DOPMC),其成员体系参见[Roles](https://github.com/datawhalechina/DOPMC/blob/main/ROLES.md)。 4 | 5 | ## 文档清单 6 | - [Datawhale社区参与指南](https://github.com/datawhalechina/.github/blob/main/profile/README.md) 7 | - [Datawhale开源项目指南](https://github.com/datawhalechina/DOPMC/blob/main/GUIDE.md) 8 | - [Datawhale开源项目行为准则](https://github.com/datawhalechina/DOPMC/blob/main/CODE_OF_CONDUCT.md) 9 | - [Datawhale开源项目保姆团队](https://github.com/datawhalechina/DOPMC/blob/main/OP.md) 10 | - [Datawhale开源项目鲸币奖励规则](https://github.com/datawhalechina/DOPMC/blob/main/REWARD.md) 11 | 12 | ## 关注我们 13 |
14 |

扫描下方二维码关注公众号:Datawhale

15 | 16 |
17 | -------------------------------------------------------------------------------- /REWARD.md: -------------------------------------------------------------------------------- 1 |

Datawhale开源项目鲸币奖励规则

2 | 3 | 为回馈Datawhale开源社区成员为社区所做的贡献,现设定本规则奖励社区成员,其可用被奖励的鲸币兑换想要的Datawhale周边礼品。 4 | 5 | ## 总则 6 | 1. 社区成员角色不同,所做的贡献不同,因此奖励规则也应当不同,但是角色之间无高低之分,大家都是社区中不可或缺的一份子! 7 | 2. 诚信是不可逾越的红线,凡是有不诚信行为的取消其鲸币奖励资格! 8 | 3. 为了保证资源充分利用,采用主动申请原则,不申请则不发放! 9 | 10 | ## 术语说明 11 | - 有效PR: 12 | - bug修复PR:被标记为“bug”且被merge进repo的Pull Request,要求有实质性错误修正,不能是错别字修正、文档修正、简单代码逻辑修正等; 13 | - 内容新增PR:指标记为“enhancement”且被merge进repo的Pull Request,要求至少包含一个完整小节内容; 14 | 15 | ## 开源项目负责人奖励规则 16 | | 行为 | 奖励 | 17 | | --- | --- | 18 | | 所负责的项目有>=1次有效PR或者Commit | +1鲸币 / 项目,每个项目每天最多1次 | 19 | | 所负责的项目star数达到1k、1w | +100鲸币 / 项目 | 20 | 21 | ## 开源项目贡献者奖励规则 22 | | 行为 | 奖励 | 23 | | --- | --- | 24 | | 为开源项目提交1次内容新增PR | +3鲸币 / 次 | 25 | | 为开源项目提交1次bug修复PR | +1鲸币 / 次 | 26 | | 为开源项目提交1次Commit | +1鲸币 / 次,每个项目每天最多1次 | 27 | | 提交过有效PR或者Commit的项目star数达到1k、1w | +10鲸币 / 项目 | 28 | 29 | ## 开源项目保姆奖励规则 30 | | 行为 | 奖励 | 31 | | --- | --- | 32 | | 完成每周例行进度跟进 | +1鲸币 | 33 | | 所服务的项目star数达到1k、1w | +10鲸币 / 项目 | 34 | 35 | ## 鲸币计算脚本 36 | 运行以下脚本即可计算出你当前被奖励的鲸币数量和明细:[whale-coin.py](https://github.com/datawhalechina/DOPMC/edit/main/whale-coin.py) 37 | 38 | ## 鲸币兑换Datawhale周边 39 | 联系[保姆团队](https://github.com/datawhalechina/DOPMC/blob/main/OP.md) 40 | 41 | -------------------------------------------------------------------------------- /ROLES.md: -------------------------------------------------------------------------------- 1 | # DOPMC成员 2 | ## 名单 3 | | 姓名 | 职责 | 简介 | 4 | | :----| :---- | :---- | 5 | | 谢文睿(微信号:at-Sm1les) | DOPMC成员 & DOPMC负责人 | [pumpkin-book](https://github.com/datawhalechina/pumpkin-book)项目负责人 | 6 | | 刘羽中 | DOPMC成员 | [competition-baseline](https://github.com/datawhalechina/competition-baseline)项目负责人 | 7 | | 耿远昊 | DOPMC成员 | [joyful-pandas](https://github.com/datawhalechina/joyful-pandas)项目负责人 | 8 | | 王琦 | DOPMC成员 | [easy-rl](https://github.com/datawhalechina/easy-rl)项目负责人 | 9 | | 詹好 | DOPMC成员 | [key-book](https://github.com/datawhalechina/key-book)项目负责人 | 10 | | 杨剑砺 | DOPMC成员 | [fantastic-matplotlib](https://github.com/datawhalechina/fantastic-matplotlib)项目负责人 | 11 | | 陈安东 | DOPMC成员 | [hands-on-data-analysis](https://github.com/datawhalechina/hands-on-data-analysis)项目负责人 | 12 | | 王复振 | DOPMC成员 | [wonderful-sql](https://github.com/datawhalechina/wonderful-sql)项目负责人 | 13 | | 牛志康 | DOPMC成员 | [thorough-pytorch](https://github.com/datawhalechina/thorough-pytorch)项目负责人 | 14 | | 罗如意 | DOPMC成员 | [fun-rec](https://github.com/datawhalechina/fun-rec)项目负责人 | 15 | | 杨世超 | DOPMC成员 | [leetcode-notes](https://github.com/datawhalechina/leetcode-notes)项目负责人 | 16 | | 胡明豪 | DOPMC成员 | [smoothly-vslam](https://github.com/datawhalechina/smoothly-vslam)项目负责人 | 17 | | 宋志学 | DOPMC成员 | [self-llm](https://github.com/datawhalechina/self-llm)项目负责人 | 18 | | 邹雨衡 | DOPMC成员 | [self-llm](https://github.com/datawhalechina/self-llm)项目负责人 | 19 | 20 | ## 职责 21 | 制定并审核Datawhale开源社区的制度和流程。 22 | 23 | ## 审核流程 24 | 1. 全员参与:任何审核事项均须DOPMC全部成员参与。 25 | 2. 公开讨论:DOPMC成员的审核意见均须公开。 26 | 27 | ## 评选规则 28 | 所负责项目已达到“毕业”阶段的项目负责人。 29 | -------------------------------------------------------------------------------- /epubit-author-writing-guide.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datawhalechina/DOPMC/eefe3cdeca4ada3e8ff5caac56cc67611f9af469/epubit-author-writing-guide.pdf -------------------------------------------------------------------------------- /statistic.py: -------------------------------------------------------------------------------- 1 | """ 2 | Datawhale仓库统计分析 3 | 使用说明请看下方__main__模块的注释 4 | """ 5 | import os 6 | import datetime 7 | import time 8 | from collections import namedtuple, Counter 9 | import requests 10 | import json 11 | 12 | GITHUB_KEY = os.getenv('GITHUB_KEY') 13 | 14 | 15 | if GITHUB_KEY: 16 | headers = { 17 | "Accept": "application/vnd.github+json", 18 | "Authorization": "Bearer {}".format(GITHUB_KEY), 19 | "X-GitHub-Api-Version": "2022-11-28" 20 | } 21 | else: 22 | headers = { 23 | "Accept": "application/vnd.github+json", 24 | "X-GitHub-Api-Version": "2022-11-28" 25 | } 26 | 27 | 28 | def get_repos(org): 29 | """ 读取组织账户下的仓库列表 """ 30 | url = 'https://api.github.com/orgs/'+ org + '/repos?per_page=100' 31 | 32 | remaining = True 33 | result = [] 34 | while remaining: 35 | res = requests.get(url, headers=headers) 36 | if res.status_code != 200: 37 | raise ValueError(res.text) 38 | header_link = res.headers.get('Link', '') 39 | res = res.json() 40 | result.extend(res) 41 | if 'rel="next"' in header_link: 42 | url = header_link.split('; rel="next"')[0][1:-1] 43 | else: 44 | remaining = False 45 | return result 46 | 47 | 48 | def get_all_contributor_commit_activity(repo=''): 49 | """ 读取仓库下的所有成员的提交记录数 """ 50 | url = 'https://api.github.com/repos/datawhalechina/' + repo + '/stats/contributors' 51 | res = requests.get(url, headers=headers) 52 | if res.status_code != 200: 53 | raise ValueError(res.text) 54 | res = res.json() 55 | return res 56 | 57 | 58 | 59 | 60 | if __name__ == "__main__": 61 | # 统计起始时间点 62 | start_time = '2025-01-01 00:00:00' 63 | 64 | ### 华丽的分界线,分界线以下的代码不用关注 ### 65 | max_try_times = 3 66 | repos = get_repos('datawhalechina') 67 | repos = [x['name'] for x in repos] 68 | 69 | start_time_array = time.strptime(start_time, "%Y-%m-%d %H:%M:%S") 70 | start_time_stamp = int(time.mktime(start_time_array)) 71 | 72 | for repo in repos: 73 | res = [] 74 | try_times = 0 75 | while True: 76 | if try_times > max_try_times: 77 | print('{}\t{}'.format(repo, 'get contributor commit fail')) 78 | break 79 | try: 80 | res = get_all_contributor_commit_activity(repo) 81 | except: 82 | time.sleep(1) 83 | try_times += 1 84 | else: 85 | break 86 | 87 | for item in res: 88 | author = item['author'] 89 | weeks = item['weeks'] 90 | total_a = 0 91 | total_d = 0 92 | total_c = 0 93 | for week in weeks: 94 | if week['w'] < start_time_stamp: 95 | continue 96 | total_a += week['a'] 97 | total_d += week['d'] 98 | total_c += week['c'] 99 | 100 | print('{}\t{}\t{}\t{}\t{}'.format(repo, author['login'], total_a, total_d, total_c)) 101 | 102 | -------------------------------------------------------------------------------- /whale-coin.py: -------------------------------------------------------------------------------- 1 | """ 2 | Datawhale开源项目鲸币奖励计算 3 | 使用说明请看下方__main__模块的注释 4 | """ 5 | import os 6 | import datetime 7 | from collections import namedtuple, Counter 8 | import requests 9 | import json 10 | 11 | GITHUB_KEY = os.getenv('GITHUB_KEY') 12 | 13 | 14 | if GITHUB_KEY: 15 | headers = { 16 | "Accept": "application/vnd.github+json", 17 | "Authorization": "Bearer {}".format(GITHUB_KEY), 18 | "X-GitHub-Api-Version": "2022-11-28" 19 | } 20 | else: 21 | headers = { 22 | "Accept": "application/vnd.github+json", 23 | "X-GitHub-Api-Version": "2022-11-28" 24 | } 25 | 26 | 27 | def get_commits(repo, username=''): 28 | """ 读取commit记录 """ 29 | url = 'https://api.github.com/repos/datawhalechina/'+ repo + '/commits' 30 | if username: 31 | url += '?author=' + username + '&per_page=100' 32 | else: 33 | url += '?per_page=100' 34 | 35 | remaining = True 36 | result = [] 37 | while remaining: 38 | res = requests.get(url, headers=headers) 39 | if res.status_code != 200: 40 | raise ValueError(res.text) 41 | header_link = res.headers.get('Link', '') 42 | res = res.json() 43 | result.extend(res) 44 | if 'rel="next"' in header_link: 45 | url = header_link.split('; rel="next"')[0][1:-1] 46 | else: 47 | remaining = False 48 | return result 49 | 50 | 51 | def get_pr(repo, commit_sha): 52 | """ 读取pull request记录 """ 53 | url = 'https://api.github.com/repos/datawhalechina/' + repo + '/commits/'+ commit_sha + '/pulls' 54 | url += '?per_page=100' 55 | res = requests.get(url, headers=headers) 56 | if res.status_code != 200: 57 | raise ValueError(res.text) 58 | res = res.json() 59 | return res 60 | 61 | 62 | def get_stars(repo): 63 | """ 读取仓库的star数 """ 64 | url = 'https://api.github.com/repos/datawhalechina/' + repo + '' 65 | res = requests.get(url, headers=headers) 66 | if res.status_code != 200: 67 | raise ValueError(res.text) 68 | res = res.json() 69 | return res['stargazers_count'] 70 | 71 | 72 | def compute_coins(cmts, prs): 73 | """ 计算参与贡献的项目奖励的鲸币数量 """ 74 | # 计算通过commit获得的鲸币 75 | date_cmt = {} 76 | cmts_coins = 0 77 | for cmt in cmts: 78 | date = cmt.date.split('T')[0] 79 | if date not in date_cmt: 80 | date_cmt[date] = [] 81 | date_cmt[date].append(cmt) 82 | 83 | if date_cmt: 84 | print('根据Commit记录计算您参与贡献的项目的的奖励明细如下:\n日期\t明细\t鲸币数量') 85 | out_list = [] 86 | for date in date_cmt: 87 | total_coins = len(set([x.repo for x in date_cmt[date]])) 88 | cmts_coins += total_coins 89 | 90 | details = [] 91 | for item in date_cmt[date]: 92 | details.append('{}您在{}提交了Commit:{}({})'.format(item.date, item.repo, item.title, item.url)) 93 | 94 | out_list.append((date, ','.join(details), str(total_coins))) 95 | 96 | out_list_sorted = sorted(out_list, key=lambda x: x[0], reverse=True) 97 | for out in out_list_sorted: 98 | print('\t'.join(out)) 99 | 100 | # 计算通过pull request获得的鲸币 101 | date_pr = {} 102 | prs_coins = 0 103 | for pr in prs: 104 | date = pr.date.split('T')[0] 105 | if date not in date_pr: 106 | date_pr[date] = [] 107 | date_pr[date].append(pr) 108 | 109 | if date_pr: 110 | print('根据Pull Request记录计算您参与贡献的项目的奖励明细如下:\n日期\t明细\t鲸币数量') 111 | out_list = [] 112 | for date in date_pr: 113 | cnt = Counter([x.label for x in date_pr[date]]) 114 | enhancement_coins = cnt['enhancement'] * 3 115 | bug_coins = cnt['bug'] * 1 116 | total_coins = enhancement_coins + bug_coins 117 | prs_coins += total_coins 118 | 119 | details = [] 120 | for item in date_pr[date]: 121 | details.append('{}您在{}提交了类型为{}的Pull Request:{}({})'.format(item.date, item.repo, item.label, item.title, item.url)) 122 | 123 | out_list.append((date, ','.join(details), str(total_coins))) 124 | 125 | out_list_sorted = sorted(out_list, key=lambda x: x[0], reverse=True) 126 | for out in out_list_sorted: 127 | print('\t'.join(out)) 128 | 129 | 130 | return cmts_coins, prs_coins 131 | 132 | 133 | def compute_owner_coins(cmts, stars): 134 | """ 计算所负责的项目所奖励的鲸币数量 """ 135 | # 计算通过commit获得的鲸币 136 | date_cmt = {} 137 | for cmt in cmts: 138 | repo = cmt['html_url'].split('/')[-3] 139 | date = cmt['commit']['author']['date'].split('T')[0] 140 | if date not in date_cmt: 141 | date_cmt[date] = set() 142 | date_cmt[date].add(repo) 143 | 144 | cmts_coins = 0 145 | if date_cmt: 146 | print('根据Commit记录计算您所负责的项目的奖励明细如下:\n日期\t明细\t鲸币数量') 147 | out_list = [] 148 | for date in date_cmt: 149 | total_coins = len(date_cmt[date]) 150 | cmts_coins += total_coins 151 | details = '{}有Commit记录的项目共有{}个:{}'.format(date, len(date_cmt[date]), '、'.join(date_cmt[date])) 152 | out_list.append((date, details, str(total_coins))) 153 | 154 | out_list_sorted = sorted(out_list, key=lambda x: x[0], reverse=True) 155 | for out in out_list_sorted: 156 | print('\t'.join(out)) 157 | 158 | # 计算通过star获得的鲸币 159 | stars_coins = 0 160 | print('根据Star数计算您所参与和负责的项目的奖励明细如下:\n日期\t明细\t鲸币数量') 161 | stages = {1000, 10000} 162 | for star in stars: 163 | repo, style, star_num = star 164 | if star_num < min(stages): 165 | details = '{}的star数为{}尚未达到奖励标准'.format(repo, star_num) 166 | print('\t'.join([datetime.datetime.today().strftime('%Y-%m-%d'), details, '0'])) 167 | continue 168 | 169 | for stage in stages: 170 | if star_num >= stage: 171 | if style == 'contributor': 172 | stars_coins += 10 173 | details = '{}的Star数超过{},作为贡献者奖励10鲸币'.format(repo, stage) 174 | print('\t'.join([datetime.datetime.today().strftime('%Y-%m-%d'), details, '10'])) 175 | 176 | if style == 'owner': 177 | stars_coins += 100 178 | details = '{}的Star数超过{},作为项目负责人奖励100鲸币'.format(repo, stage) 179 | print('\t'.join([datetime.datetime.today().strftime('%Y-%m-%d'), details, '100'])) 180 | 181 | return cmts_coins, stars_coins 182 | 183 | 184 | if __name__ == "__main__": 185 | # 使用说明: 186 | # 1. 将以下的【username、repos、owner_repos】改写为你的信息 187 | # 2. 执行【python3 whale-coin.py > res.txt】命令 188 | # 3. 将【res.txt】中的内容复制,然后打开一个空白excel文档,粘贴即可查看明细 189 | 190 | # GitHub用户名 191 | username = 'Sm1les' 192 | 193 | # 参与贡献的项目 194 | repos = set(['joyful-pandas', 'easy-rl']) 195 | 196 | # 所负责的项目 197 | owner_repos = set(['pumpkin-book']) 198 | 199 | ######## 这里是华丽的分界线,分界线以下的代码请勿改动 ######## 200 | 201 | # 参与贡献的项目和所负责的项目不可重复 202 | if not repos.isdisjoint(owner_repos): 203 | raise ValueError('参与贡献的项目和所负责的项目请分开填写,不能有交集~') 204 | 205 | # 读取参与贡献的项目提交记录 206 | Commit = namedtuple('Commit', 'repo title url date') 207 | Pullrequest = namedtuple('Pullrequest', 'repo label title url date') 208 | 209 | cmts = set() 210 | prs = set() 211 | 212 | real_repos = set() 213 | 214 | for repo in repos: 215 | commits = get_commits(repo, username) 216 | for cmt in commits: 217 | sha = cmt['sha'] 218 | real_repos.add(cmt['html_url'].split('/')[-3]) 219 | pr = get_pr(repo, sha) 220 | 221 | if not pr: 222 | # 无对应PR的commit 223 | cmts.add(Commit(repo, cmt['commit']['message'], cmt['html_url'], cmt['commit']['author']['date'])) 224 | else: 225 | # 有对应PR的commit 226 | for item in pr: 227 | labels = set([x['name'] for x in item['labels']]) 228 | 229 | if not labels or 'enhancement' in labels: 230 | prs.add(Pullrequest(repo, 'enhancement', item['title'], item['html_url'], item['merged_at'])) 231 | 232 | if 'bug' in labels: 233 | prs.add(Pullrequest(repo, 'bug', item['title'], item['html_url'], item['merged_at'])) 234 | 235 | # 修正参与贡献的项目 236 | repos = real_repos 237 | 238 | # 计算参与贡献的项目所奖励的鲸币数量 239 | cmts_coins, prs_coins = compute_coins(cmts, prs) 240 | 241 | # 读取所负责的项目提交记录 242 | cmts = [] 243 | stars = [] 244 | for repo in owner_repos: 245 | commits = get_commits(repo) 246 | cmts.extend(commits) 247 | 248 | # 读取参与贡献的项目的star数 249 | for repo in repos: 250 | stars.append((repo, 'contributor', get_stars(repo))) 251 | 252 | # 读取所负责的项目的star数 253 | for repo in owner_repos: 254 | stars.append((repo, 'owner', get_stars(repo))) 255 | 256 | # 计算所负责的项目所奖励的鲸币数量 257 | owner_cmts_coins, stars_coins = compute_owner_coins(cmts, stars) 258 | 259 | # 输出最终计算结果 260 | print('您通过参与项目贡献提交Commit获得{}鲸币奖励~'.format(cmts_coins)) 261 | print('您通过参与项目贡献提交Pull Request获得{}鲸币奖励~'.format(prs_coins)) 262 | print('您所负责的项目在您的贡献下持续更新迭代获得{}鲸币奖励~'.format(owner_cmts_coins)) 263 | print('您所参与和负责的项目在您的贡献下收获大量star获得{}鲸币奖励~'.format(stars_coins)) 264 | print('您总共获得{}鲸币奖励~'.format(cmts_coins + prs_coins + owner_cmts_coins + stars_coins)) 265 | --------------------------------------------------------------------------------