You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dolphinscheduler.apache.org by li...@apache.org on 2019/12/01 16:10:56 UTC

[incubator-dolphinscheduler-website] branch master updated: update document add contribute

This is an automated email from the ASF dual-hosted git repository.

lidongdai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-dolphinscheduler-website.git


The following commit(s) were added to refs/heads/master by this push:
     new 36251c5  update document add contribute
     new 3d22344  Merge pull request #43 from dailidong/master
36251c5 is described below

commit 36251c54c30483b44e8b54549e09863018f7c8f4
Author: dailidong <da...@gmail.com>
AuthorDate: Mon Dec 2 00:04:08 2019 +0800

    update document add contribute
---
 docs/en-us/development/contribute.md               |  17 +-
 .../development/{contribute.md => unit-test.md}    |   0
 docs/zh-cn/development/contribute.md               | 177 +++++++++++++++++++--
 docs/zh-cn/development/submit-bug.md               |   0
 .../development/{contribute.md => unit-test.md}    |   0
 md_json/docs.json                                  |  18 ++-
 site_config/development.js                         | 162 ++++++++++---------
 7 files changed, 264 insertions(+), 110 deletions(-)

diff --git a/docs/en-us/development/contribute.md b/docs/en-us/development/contribute.md
old mode 100755
new mode 100644
index 5990722..99f1089
--- a/docs/en-us/development/contribute.md
+++ b/docs/en-us/development/contribute.md
@@ -1,16 +1 @@
-## Unit Test coverage
-Unit test writing reference [link](https://github.com/apache/incubator-dolphinscheduler/blob/dev/escheduler-common/src/test/java/cn/escheduler/common/utils/CollectionUtilsTest.java)
-### 1.The benefits of unit testing 
-  * Unit test code can help everyone to go into details and understand the function of the code.
-  * We can find bugs by test case, and then enhance the robustness of the code.
-  * Test case code is also the demo usage of the core code.
-### 2.Some design principle of unit test case 
-  * Steps, fine-grained and combination conditions should be well designed.
-  * Attention to boundary condition test
-  * Test code should also be designed without writing useless code.
-  * When you find a `method` that is hard to write unit test, if you can be sure the `method` is "smelly code", then  refactor it with the committer.
-  * The mock framework in DolphinScheduler is: [mockito](http://site.mockito.org/). Some tutorials:[mockito tutorial](http://www.baeldung.com/bdd-mockito),[mockito refcard](https://dzone.com/refcardz/mockito)
-  * TDD(optional):When you start a new issue, you can try to write test case at first 
-### 3.The specified value of the test coverage
-  * In the stage, the test coverage specified value of delta changed codes is :>=60%. The higher, the better.
-  * We can see the coverage report in this page: https://codecov.io/gh/apache/dolphinscheduler
+# todo
\ No newline at end of file
diff --git a/docs/en-us/development/contribute.md b/docs/en-us/development/unit-test.md
similarity index 100%
copy from docs/en-us/development/contribute.md
copy to docs/en-us/development/unit-test.md
diff --git a/docs/zh-cn/development/contribute.md b/docs/zh-cn/development/contribute.md
old mode 100755
new mode 100644
index 2d7e03d..9493bce
--- a/docs/zh-cn/development/contribute.md
+++ b/docs/zh-cn/development/contribute.md
@@ -1,17 +1,162 @@
-## Unit Test覆盖率
-Unit Test编写参考[链接](https://github.com/apache/incubator-dolphinscheduler/blob/dev/escheduler-common/src/test/java/cn/escheduler/common/utils/CollectionUtilsTest.java)
-### 1.写单元测试的收益 
-  * 单元测试能帮助每个人深入代码细节,了解代码的功能。
-  * 通过测试用例我们能发现bug,并提交代码的健壮性。
-  * 测试用例同时也是代码的demo用法。
-### 2.单元测试用例的一些设计原则 
-  * 应该精心设计好步骤,颗粒度和组合条件。
-  * 注意边界条件。
-  * 单元测试也应该好好设计,不要写无用的代码。
-  * 当你发现一个`方法`很难写单元测试时,如果可以确认这个`方法`是`臭代码`,那么就和开发者一起重构它。
-  * DolphinScheduler: [mockito](http://site.mockito.org/). 下面是一些开发向导:[mockito tutorial](http://www.baeldung.com/bdd-mockito),[mockito refcard](https://dzone.com/refcardz/mockito)
-  * TDD(可选):当你开始写一个新的功能时,你可以试着先写测试用例。 
-### 3.测试覆盖率设定值
-  * 在现阶段,Delta更改代码的测试覆盖设定值为:>=60%,越高越好。
-  * 我们可以在这个页面中看到测试报告: https://codecov.io/gh/apache/dolphinscheduler
+## 贡献
 
+您可以提交一个bug,一个Feature建议或者直接提交改进。
+
+### 1. 如何提交Bug
+
+当您发现一个Bug时,请提交Bug,提交前:
+* 请先在issue列表里查找一下是否该bug已经提交,如果已经有此bug,请在此bug下接着回复。
+* 如果该Bug是可以复现的。请尽量提供完整的重现步骤。
+
+请在issues页面中提交Bug。
+
+一个高质量的Bug通常有以下特征:
+
+* 使用一个清晰并有描述性的标题来定义Bug。
+* 详细的描述复现Bug的步骤。包括您的配置情况,预计产生的结果,实际产生的结果。并附加详细的TRACE日志。
+* 如果程序抛出异常,请附加完整的堆栈日志。
+* 如有可能,请附上屏幕截图或动态的GIF图,这些图片能帮助演示整个问题的产生过程。
+* 哪个版本。
+* 需要修复的优先级(危急、重大、次要、细微)。
+
+下面是Bug的Markdown模板,请按照该模板填写issue。
+
+```shell
+**标题** 
+标题格式: [BUG][Priority] bug标题
+Priority分为四级: Critical、Major、Minor、Trivial
+
+**问题描述**
+[清晰准确描述遇到的问题]
+
+**问题复现步骤:**
+1. [第一步]
+2. [第二步]
+3. [...]
+
+**期望的表现:**
+[在这里描述期望的表现]
+
+**观察到的表现:**
+[在这里描述观察到的表现]
+
+**屏幕截图和动态GIF图**
+![复现步骤的屏幕截图和动态GIF图](图片的url)
+
+**DolphinScheduler版本:(以1.1.0为例)** 
+ -[1.1.0]
+ 
+**补充的内容:**
+[请描述补充的内容,比如]
+
+**需求或者建议**
+[请描述你的需求或者建议]
+```
+
+### 2. 如何提交功能(Feature)建议
+提交前:
+* 请确定这不是一个重复的功能增强建议。 查看Issue Page列表,搜索您要提交的功能增强建议是否已经被提交过。
+
+请在issues页面中提交Feature。
+
+一个高质量的Feature通常有以下特征:
+* 一个清晰的标题来定义Feature
+* 详细描述Feature的行为模式
+* 说明为什么该Feature对大多数用户是有用的。新功能应该具有广泛的适用性。
+* 尽量列出其他调度已经具备的类似功能。商用与开源软件均可。
+
+以下是Feature的Markdown模板,请按照该模板填写issue。
+```shell
+**标题** 
+标题格式: [Feature][Priority] feature标题
+Priority分为四级: Critical、Major、Minor、Trivial
+
+**Feature的描述**
+[描述新Feature应实现的功能]
+
+**为什么这个新功能是对大多数用户有用的**
+[解释这个功能为什么对大多数用户是有用的]
+
+**补充的内容**
+[列出其他的调度是否包含该功能,是如何实现的]
+
+```
+
+
+### 3. 如何领取Bug/Feature
+如果您想实现某个Feature或者修复某个Bug。请参考以下内容:
+
+* 所有的Bug与新Feature建议使用Issues Page进行管理。
+* 如果想要开发实现某个Feature功能,请先回复该功能所关联的Issue,表明您当前正在这个Issue上工作。 并在回复的时候为自己设置一个deadline,并添加的回复内容中。
+* 最好在核心贡献者找到一个导师(指导者),导师会在设计与功能实现上给予即时的反馈。
+* 您应该新建一个分支来开始您的工作,分支的名字为Feature功能名称/issueId。 比如,您想完成依赖功能并提交了Issue 111,那么您的branch名字应为 dependency/111。 功能名称可与导师讨论后确定。
+* 完成后,发送一个pull request到incubator-dolphinscheduler,提交过程具体请参考下面《如何提交代码》。
+
+
+### 4. 如何提交代码
+
+* 首先从远端仓库*https://github.com/apache/incubator-dolphinscheduler.git* fork一份代码到自己的仓库中
+
+* 远端仓库中目前有三个分支:
+    * master 正常交付分支
+	   发布稳定版本以后,将稳定版本分支的代码合并到master上。
+    
+	* dev    日常开发分支
+	   日常dev开发分支,新提交的代码都可以pull request到这个分支上。
+	   
+    * branch-1.0.0 发布版本分支
+	   发布版本分支,后续会有2.0...等版本分支,版本分支只修改bug,不增加新功能。
+
+* 把自己仓库clone到本地
+  
+    ` git clone https://github.com/apache/incubator-dolphinscheduler.git`
+
+*  添加远端仓库地址,命名为upstream
+
+    ` git remote add upstream https://github.com/apache/incubator-dolphinscheduler.git `
+
+*  查看仓库:
+
+    ` git remote -v`
+
+> 此时会有两个仓库:origin(自己的仓库)和upstream(远端仓库)
+
+*  获取/更新远端仓库代码(已经是最新代码,就跳过)
+  
+    ` git fetch upstream `
+
+
+* 同步远端仓库代码到本地仓库
+
+```
+ git checkout origin/dev
+ git merge --no-ff upstream/dev
+```
+
+如果远端分支有新加的分支比如`dev-1.0`,需要同步这个分支到本地仓库
+
+```
+git checkout -b dev-1.0 upstream/dev-1.0
+git push --set-upstream origin dev1.0
+```
+
+* 在本地修改代码以后,提交到自己仓库:
+  
+    `git commit -m 'commit content'`
+    `git push`
+
+* 将修改提交到远端仓库
+
+	* 在github页面,点击New pull request.
+		<p align="center">
+	   <img src="http://geek.analysys.cn/static/upload/221/2019-04-02/90f3abbf-70ef-4334-b8d6-9014c9cf4c7f.png" width="60%" />
+	 </p>
+	 
+	* 选择修改完的本地分支和要合并过去的分支,Create pull request.
+		<p align="center">
+	   <img src="http://geek.analysys.cn/static/upload/221/2019-04-02/fe7eecfe-2720-4736-951b-b3387cf1ae41.png" width="60%" />
+	 </p>
+	
+* 接着社区Committer们会做CodeReview,然后他会与您讨论一些细节(包括设计,实现,性能等)。当团队中所有人员对本次修改满意后,会将提交合并到dev分支
+
+* 最后,恭喜您已经成为了dolphinscheduler的官方贡献者!
diff --git a/docs/zh-cn/development/submit-bug.md b/docs/zh-cn/development/submit-bug.md
new file mode 100644
index 0000000..e69de29
diff --git a/docs/zh-cn/development/contribute.md b/docs/zh-cn/development/unit-test.md
similarity index 100%
copy from docs/zh-cn/development/contribute.md
copy to docs/zh-cn/development/unit-test.md
diff --git a/md_json/docs.json b/md_json/docs.json
index fa867b3..c60c7eb 100755
--- a/md_json/docs.json
+++ b/md_json/docs.json
@@ -1,6 +1,11 @@
 {
   "en-us": [
     {
+      "filename": "contribute.md",
+      "link": "/en-us/docs/development/contribute.html",
+      "meta": {}
+    },
+    {
       "filename": "architecture-design.md",
       "link": "/en-us/docs/development/architecture-design.html",
       "meta": {}
@@ -11,8 +16,8 @@
       "meta": {}
     },
     {
-      "filename": "contribute.md",
-      "link": "/en-us/docs/development/contribute.html",
+      "filename": "unit-test.md",
+      "link": "/en-us/docs/development/unit-test.html",
       "meta": {}
     },
     {
@@ -68,6 +73,11 @@
   ],
   "zh-cn": [
     {
+      "filename": "contribute.md",
+      "link": "/zh-cn/docs/development/contribute.html",
+      "meta": {}
+    },
+    {
       "filename": "architecture-design.md",
       "link": "/zh-cn/docs/development/architecture-design.html",
       "meta": {}
@@ -78,8 +88,8 @@
       "meta": {}
     },
     {
-      "filename": "contribute.md",
-      "link": "/zh-cn/docs/development/contribute.html",
+      "filename": "unit-test.md",
+      "link": "/zh-cn/docs/development/unit-test.html",
       "meta": {}
     },
     {
diff --git a/site_config/development.js b/site_config/development.js
index 3b45a7a..66ab423 100755
--- a/site_config/development.js
+++ b/site_config/development.js
@@ -1,85 +1,99 @@
 export default {
-  'en-us': {
-    sidemenu: [
-      {
-        title: 'Developer guide',
-        children: [
-          {
-            title: 'Architecture Design',
-            link: '/en-us/docs/development/architecture-design.html',
-          },
-          {
-            title: 'Backend Development',
-            link: '/en-us/docs/development/backend-development.html',
-          },
-          {
-            title: 'Frontend Development',
-            link: '/en-us/docs/development/frontend-development.html',
-          },
-          {
-              title: 'plugin-development',
-              link: '/en-us/docs/development/plugin-development.html',
-          },
-        ],
-      },
-      {
-        title: 'Committer Guide',
-        children: [
-          {
-            title: 'Contribute',
-            link: '/en-us/docs/development/contribute.html',
-          },
-          {
-            title: 'Developers',
-            link: '/en-us/docs/development/developers.html',
-          }
-        ]
-      }
-    ],
-    barText: 'Development'
-  },
-  'zh-cn': {
-      sidemenu: [
-        {
-          title: '开发者指南',
-          children: [
-            {
-              title: '架构设计',
-              link: '/zh-cn/docs/development/architecture-design.html',
-            },
-            {
-              title: '后端开发',
-              link: '/zh-cn/docs/development/backend-development.html',
-            },
+    'en-us': {
+        sidemenu: [
             {
-              title: '插件开发',
-              link: '/zh-cn/docs/development/plugin-development.html',
+                title: 'Developer guide',
+                children: [
+                    {
+                        title: 'Architecture Design',
+                        link: '/en-us/docs/development/architecture-design.html',
+                    },
+                    {
+                        title: 'Backend Development',
+                        link: '/en-us/docs/development/backend-development.html',
+                    },
+                    {
+                        title: 'Frontend Development',
+                        link: '/en-us/docs/development/frontend-development.html',
+                    },
+                    {
+                        title: 'plugin-development',
+                        link: '/en-us/docs/development/plugin-development.html',
+                    },
+                ],
             },
             {
-              title: '前端开发',
-              link: '/zh-cn/docs/development/frontend-development.html',
-            },
+                title: 'Committer Guide',
+                children: [
+                    {
+                        title: 'Contribute',
+                        link: '/en-us/docs/development/contribute.html',
+                    },
+                    {
+                        title: 'Developers',
+                        link: '/en-us/docs/development/developers.html',
+                    }
+                ]
+            }
+        ],
+        barText: 'Development'
+    },
+    'zh-cn': {
+        sidemenu: [
             {
-              title: '接口文档',
-              target: '_blank',
-              link: 'http://106.75.43.194:8888/easyscheduler/doc.html?language=zh_CN&lang=zh'
+                title: '贡献指南',
+                children: [
+                    {
+                        title: '订阅邮件列表',
+                        target: '_blank',
+                        link: '/zh-cn/docs/user_doc/subscribe.html',
+                    },
+                    {
+                        title: '参与贡献',
+                        link: '/zh-cn/docs/development/contribute.html',
+                    }
+                ],
             },
-          ],
-        },
-        {
-          title: '提交者向导',
-          children: [
             {
-              title: '参与贡献',
-              link: '/zh-cn/docs/development/contribute.html',
+                title: '开发者指南',
+                children: [
+                    {
+                        title: '架构设计',
+                        link: '/zh-cn/docs/development/architecture-design.html',
+                    },
+                    {
+                        title: '后端开发',
+                        link: '/zh-cn/docs/development/backend-development.html',
+                    },
+                    {
+                        title: '插件开发',
+                        link: '/zh-cn/docs/development/plugin-development.html',
+                    },
+                    {
+                        title: '前端开发',
+                        link: '/zh-cn/docs/development/frontend-development.html',
+                    },
+                    {
+                        title: '接口文档',
+                        target: '_blank',
+                        link: 'http://106.75.43.194:8888/easyscheduler/doc.html?language=zh_CN&lang=zh'
+                    },
+                ],
             },
             {
-              title: '开发人员',
-              link: '/zh-cn/docs/development/developers.html',
+                title: '提交者向导',
+                children: [
+                    {
+                        title: '参与贡献',
+                        link: '/zh-cn/docs/development/contribute.html',
+                    },
+                    {
+                        title: '开发人员',
+                        link: '/zh-cn/docs/development/developers.html',
+                    }
+                ]
             }
-          ]
-        }
-      ],
-      barText: '开发者'
-  }
+        ],
+        barText: '开发者'
+    }
 };