Skip to content

Commit f22e6e0

Browse files
committed
docs: refactor docs about development
Signed-off-by: Bird <aflybird0@gmail.com>
1 parent 30cf3af commit f22e6e0

35 files changed

Lines changed: 110 additions & 76 deletions
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
## 2 Full Process Guide
1212

13-
A detailed guide to the plugin development process can be found in [creating a plugin](../creating-a-plugin.md).
13+
A detailed guide to the plugin development process can be found in [creating a plugin](../development/dev/creating-a-plugin.md).
1414

1515
## 3 Flags
1616

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
## 2 完整插件开发指南
1111

12-
插件开发的详细指南可以在[创建一个插件](../creating-a-plugin.zh.md)找到。
12+
插件开发的详细指南可以在[创建一个插件](../development/dev/creating-a-plugin.zh.md)找到。
1313

1414
## 3 命令行参数
1515

docs/contributing_guide.md

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ Absolutely everyone is welcome to come to any of our meetings. You never need an
4141

4242
We have good first issues for new contributors and help wanted issues suitable for any contributor.
4343

44-
- [good first issue](https://github.com/devstream-io/devstream/labels/good%20first%20issue) has extra information to help you make your first contribution. If you are new to DevStream (or even new to open-source,) this is a good place to get yourself started. For more information, see the [good first issues doc](./development/good-first-issues.md).
45-
- [help wanted](https://github.com/devstream-io/devstream/labels/help%20wanted) are issues suitable for someone who isn't a core maintainer and is good to move onto after your "good first issue."
44+
- [good first issue](https://github.com/devstream-io/devstream/labels/good%20first%20issue) has extra information to help you make your first contribution. If you are new to DevStream (or even new to open-source,) this is a good place to get yourself started. For more information, see the [good first issues doc](development/git-workflow/good-first-issues.md).
45+
- [help wanted](https://github.com/devstream-io/devstream/labels/help%20wanted) are issues suitable for someone who isn't a core maintainer and is good to move onto after your "good first issue." For more information, see the [help wanted doc](development/git-workflow/help-wanted.md).
4646
- Sometimes there won’t be any issues with these labels. That’s ok! There is likely still something for you to work on. If you want to contribute but you don’t know where to start or can't find a suitable issue, you can reach out to us on our [Slack channel](https://cloud-native.slack.com/archives/C03LA2B8K0A) and ask for an issue to work on.
4747

4848
Once you see an issue that you'd like to work on, please post a comment saying that you want to work on it. Something like "I want to work on this" is fine.
@@ -72,17 +72,25 @@ The unwritten rules (heck, we are writing them anyways) for PRs, contributors, a
7272
- Currently, we don't release regularly, so there isn't any guarantee about when your PR will be included in the next release. However, we are trying our best to make releases as frequent as possible.
7373
- As an encouragement to contributors, it's fine to close an issue or merge a PR even if the originally designed features aren't 100% implemented. In cases like this, please encourage contributors to create a follow-up issue and PR to further implement that. Do not make the PR process last too long because it might discourage contributors.
7474

75-
## Development Environment Setup
75+
For more documentation on GitHub collaboration, see the [GitHub Collaboration Process Guidelines](./development/git-workflow/git-workflow.md).
7676

77-
- linter: [golangci-lint](https://github.com/golangci/golangci-lint)
78-
- recommended IDE: [Visual Studio Code](https://code.visualstudio.com/), [GoLand](https://www.jetbrains.com/go/).
79-
- [docs](https://docs.devstream.io/en/latest/)
80-
- [quick start](./quickstart.md)
81-
- Get the source code: https://github.com/devstream-io/devstream
82-
- [Build the source code](./development/build.md)
83-
- [Test the source code, unit](./development/test.md)
84-
- TODO: Test the source code, integration/end-to-end
85-
- TODO: Generate and preview the documentation locally
77+
## Development
78+
79+
- Recommended IDEs: [Visual Studio Code](https://code.visualstudio.com/), [GoLand](https://www.jetbrains.com/go/)
80+
- [Development Environment Setup](./development/dev/dev-env-setup.md)
81+
- [Code linter](./development/dev/lint.md)
82+
- [Build the source code](./development/dev/build.md)
83+
- [Test the source code: unit test, e2e test](./development/dev/test.md)
84+
85+
## DevStream Architecture
86+
87+
- [overall architecture](development/devstream/architecture.md)
88+
- [Project Organization](development/devstream/project-layout.md)
89+
90+
## Documentation Contribution
91+
92+
- [Create documentation for DevStream](./development/docs-contribution/mkdocs.md)
93+
- [Document translation](./development/docs-contribution/translation.md)
8694

8795
## Sign Your Commits
8896

@@ -108,7 +116,7 @@ When you submit your pull request, or you push new commits to it, our automated
108116

109117
- Lint your code. Although this will be checked by our CI, linting it yourself locally first before creating a PR will save you some time and effort.
110118
- Build/test your code. Same as above.
111-
- Double-check your commit messages. See if they meet the [conventional commits specification](https://www.conventionalcommits.org/en/v1.0.0/). Again, this will also be validated by our CI, but checking it yourself beforehand will speed things up drastically.
119+
- Double-check your commit messages. More details in the [commit message guidelines](./development/git-workflow/commit-messages.md).
112120

113121
## Maintainer Team at Merico
114122

docs/contributing_guide.zh.md

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
- Bug 修复
2020
- 文档
2121
- Issue 分类、发起、回复、管理、维护等(Issue Triage)
22-
- 在 微信群、Sack、邮件列表解答问题
22+
- 在 微信群、Slack、邮件列表解答问题
2323
- 网站页面设计
2424
- 在各种媒体、博客文章宣传 DevStream
2525
- 发版管理
@@ -38,12 +38,12 @@ DevStream 真诚地欢迎每一个人参与我们的会议,不需要被邀请
3838
## 寻找 Issue
3939
你可以在 Issue 列表找到这样两个标签: `good first issue` 表示仅向新贡献者开放,`help wanted` 适合于所有贡献者。
4040

41-
- [good first issue](https://github.com/devstream-io/devstream/labels/good%20first%20issue) 含有更多的描述信息与指导,往往只涉及一小部分,完成它不需要你熟悉整个项目。如果你是第一次参与 DevStream(甚至是第一次参与开源),非常推荐你从 good first issue 开始共建之旅。更多信息,请参阅 [good first issue 文档](./development/good-first-issues.zh.md)
42-
- [help wanted](https://github.com/devstream-io/devstream/labels/help%20wanted) 指引了你在完成了 good first issue 后,适合继续贡献的地方。带有这个标签的 issue,除了核心贡献者外的任何人都可参与。
41+
- [good first issue](https://github.com/devstream-io/devstream/labels/good%20first%20issue) 含有更多的描述信息与指导,往往只涉及一小部分,完成它不需要你熟悉整个项目。如果你是第一次参与 DevStream(甚至是第一次参与开源),非常推荐你从 good first issue 开始共建之旅。更多信息,请参阅 [good first issue 文档](development/git-workflow/good-first-issues.zh.md)
42+
- [help wanted](https://github.com/devstream-io/devstream/labels/help%20wanted) 指引了你在完成了 good first issue 后,适合继续贡献的地方。带有这个标签的 issue,除了核心贡献者外的任何人都可参与。更多信息,请参阅 [help wanted 文档](development/git-workflow/help-wanted.zh.md)
4343
- 你不需要拘泥于带有这两个标签的 issue,其他任何你感兴趣的 issue,都可以直接参与,无论是方案修改建议、讨论与回复、还是代码。
4444
- 有时 good first issue 或 help wanted 因为社区过于热情导致暂时没有空余,只要你愿意,你仍可以参与贡献!直接在 [Slack](https://join.slack.com/t/devstream-io/shared_invite/zt-16tb0iwzr-krcFGYRN7~Vv1suGZjdv4)[微信群](https://raw.githubusercontent.com/devstream-io/devstream/main/docs/images/wechat-group-qr-code.png) 联系我们,告诉我们你愿意参与!
4545

46-
若你想负责某个 issue,请在 issue 内留下评论,例如:"I want to work on this"。
46+
如果你对某个 issue 有兴趣,想完成对应内容,请在 issue 内留下评论,例如:"I want to work on this"。
4747

4848
## 寻求帮助
4949
在贡献时,向我们提问的最好的方式如下:
@@ -69,18 +69,28 @@ DevStream 真诚地欢迎每一个人参与我们的会议,不需要被邀请
6969
- 目前,我们不会定期发布,因此无法保证你的 PR 何时包含在下一个版本中。但是,我们正在尽最大努力使发布尽可能频繁。
7070
- 为了鼓励贡献者,你可以在未100%完成原有设计的情况下,完成相应的任务,即关闭 issue 与合并 PR。在这种情况下,你可以再创建个新的 issue,并提交个新的 PR 来完成之前遗漏的工作。我们不希望你在一个 PR 上耗时太久,这会打击你的兴趣。
7171

72-
## 开发环境搭建
73-
- 代码格式检查:[golangci-lint](https://github.com/golangci/golangci-lint)
72+
更多关于 GitHub 协作的文档,可参考 [GitHub 协作流程指引](./development/git-workflow/git-workflow.md)
73+
74+
## 开发
75+
7476
- 推荐的 IDE:[Visual Studio Code](https://code.visualstudio.com/), [GoLand](https://www.jetbrains.com/go/)
75-
- [文档](https://docs.devstream.io/en/latest/index.zh/)
76-
- [快速开始](https://docs.devstream.io/en/latest/quickstart.zh/)
77-
- [源码](https://github.com/devstream-io/devstream)
78-
- [源码构建](https://docs.devstream.io/en/latest/development/build.zh/)
79-
- [代码测试:单元测试(unit test)、端到端测试(e2e test)](https://docs.devstream.io/en/latest/development/test.zh/)
80-
- TODO: 源码测试, 集成/端到端测试
81-
- TODO: 生成本地文档预览
77+
- [开发环境搭建](./development/dev/dev-env-setup.zh.md)
78+
- [代码格式检查](./development/dev/lint.zh.md)
79+
- [源码构建](./development/dev/build.zh.md)
80+
- [代码测试:单元测试(unit test)、端到端测试(e2e test)](./development/dev/test.zh.md)
81+
82+
## 架构解读
83+
84+
- [整体架构](development/devstream/architecture.zh.md)
85+
- [项目组织结构](development/devstream/project-layout.zh.md)
86+
87+
## 文档类贡献
88+
89+
- [为DevStream创建文档](./development/docs-contribution/mkdocs.zh.md)
90+
- [文档翻译](./development/docs-contribution/translation.zh.md)
8291

8392
## 代码提交署名(Sign Off)
93+
8494
授权与认证(licensing) 对于开源项目非常重要,它确保了软件能基于作者提供的条款继续运作。我们需要你在贡献代码的时候署名你的提交,[Developer Certificate of Origin (DCO)](https://developercertificate.org/) 是一种认证你编写了此段代码,并表明你持有这段代码的方式。
8595

8696
你可以通过在提交信息(Git Commit Message)中附加这段信息。注意,你的署名必须与 Git 的用户名和邮箱对应。
@@ -103,7 +113,7 @@ Git 有一个 `-s` 的命令行选项可以帮助你自动署名:
103113

104114
- 检查代码格式问题([golangci-lint](https://github.com/golangci/golangci-lint)): 虽然我们的 CI 会在提交代码时自动运行 lint,但在本地先执行 lint 确保无误后再提交能节省你更多的精力与时间。
105115
- 构建/测试 代码,同上。
106-
- 仔细检查你的提交信息(Commit Message):确认它们符合 [约定式提交](https://www.conventionalcommits.org/zh-hans/v1.0.0/) 规范。同样的,CI 也会执行这一检查,但若你在提交代码前先行检查能加快 PR 合并速度
116+
- 仔细检查你的提交信息(Commit Message):详见 [提交信息规范](./development/git-workflow/commit-messages.zh.md)
107117

108118
## Maintainer 团队
109119

File renamed without changes.
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Although dtm is automagic, but it can’t read your mind. I’m afraid that you
2424
2525
Please fill in the main logic of the plugin here.
2626

27-
You can check out our [Standard Go Project Layout](project-layout.md) document for detailed instruction on the project layout.
27+
You can check out our [Standard Go Project Layout](../devstream/project-layout.md) document for detailed instruction on the project layout.
2828

2929
## 2 Interfaces
3030

docs/development/creating-a-plugin.zh.md renamed to docs/development/dev/creating-a-plugin.zh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
2525
请在这里编写插件的主要逻辑。
2626

27-
可以查看我们的[Standard Go Project Layout](project-layout.zh.md)文件,了解关于项目布局的详细说明。
27+
可以查看我们的[Standard Go Project Layout](../devstream/project-layout.zh.md)文件,了解关于项目布局的详细说明。
2828

2929
## 2 接口
3030

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ OK. So you want to get started with Golang/Kubernetes development. You've come t
66

77
[Head to the official website](https://go.dev/) and click the "Download" button:
88

9-
![](../images/golang-install.png)
9+
![](../../images/golang-install.png)
1010

1111
Make sure you select the correct package according to your operating system and processor:
1212

13-
![](../images/golang-download.png)
13+
![](../../images/golang-download.png)
1414

1515
For Apple macOS users, click the apple logo in the menu bar, and choose "About This Mac" to check your chip:
1616

17-
![](../images/about-this-mac.png)
17+
![](../../images/about-this-mac.png)
1818

1919
---
2020

@@ -26,7 +26,7 @@ The easiest way to run a Kubernetes cluster locally is to run it in a Docker con
2626

2727
[Head to the official website](https://www.docker.com/) and click the download button:
2828

29-
![](../images/docker-install.png)
29+
![](../../images/docker-install.png)
3030

3131
Again, please pay attention to the operating system and processor options. For Apple M1 mac users, choose the "Apple Chip" option. To check what processor you have, see the previous section in "About This Mac".
3232

@@ -42,15 +42,15 @@ _Note: there are other tools which can install a local K8s, such as `kind`, etc.
4242

4343
First, go to the [official website of minikube](https://minikube.sigs.k8s.io/docs/start/), choose the right OS and architecture (again,) and download/install:
4444

45-
![](../images/minikube-install.png)
45+
![](../../images/minikube-install.png)
4646

4747
Alternatively, if you are using [Homebrew](https://brew.sh/) (if you don't know what it is, ignore this line,) you can simply run `brew install minikube`.
4848

4949
### 2.3 Install `kubectl`
5050

5151
Go to [Kubernetes' official documentation website](https://kubernetes.io/docs/tasks/tools/) and follow the guide to install kubectl. Choose your operating system:
5252

53-
![](../images/kubectl-install.png)
53+
![](../../images/kubectl-install.png)
5454

5555
Again, for macOS users, if you are using Homebrew package manager, you can install kubectl with Homebrew:
5656

@@ -116,4 +116,4 @@ For example, you can try a local build:
116116
make build -j10 VERSION=0.8.0
117117
```
118118

119-
Or, maybe you would like to have a go with it first? Check our [quickstart guide](../quickstart.md). Happy hacking!
119+
Or, maybe you would like to have a go with it first? Check our [quickstart guide](../../quickstart.md). Happy hacking!
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66

77
[前往Golang官网](https://go.dev/)并点击“下载”按钮:
88

9-
![](../images/golang-install.png)
9+
![](../../images/golang-install.png)
1010

1111
根据你的操作系统和处理器来选择正确的软件包版本:
1212

13-
![](../images/golang-download.png)
13+
![](../../images/golang-download.png)
1414

1515
对于Apple macOS用户,点击菜单栏中的苹果标志,然后选择“关于本机”以查看您的芯片:
1616

17-
![](../images/about-this-mac.png)
17+
![](../../images/about-this-mac.png)
1818

1919
---
2020

@@ -26,7 +26,7 @@
2626

2727
[前往Docker官网](https://www.docker.com/)点击下载按钮:
2828

29-
![](../images/docker-install.png)
29+
![](../../images/docker-install.png)
3030

3131
同样请注意操作系统和处理器选项。对于Apple M1 mac用户,选择“Apple Chip”选项。如果想确认你的处理器是Apple还是Intel,请参阅上一节中的“关于本机”部分。
3232

@@ -42,15 +42,15 @@ _注意:其实有很多种可以安装本地K8s的工具,如`kind`等;在
4242

4343
首先,访问[minikube官网](https://minikube.sigs.k8s.io/docs/start/),选择正确的操作系统和架构,并下载/安装:
4444

45-
![](../images/minikube-install.png)
45+
![](../../images/minikube-install.png)
4646

4747
或者,如果你在用[Homebrew](https://brew.sh/)的话(如果你不知道它是啥,请忽略)你可以通过运行`brew install minikube`来安装。
4848

4949
### 2.3 安装`kubectl`
5050

5151
前往[Kubernetes的官方文档站点](https://kubernetes.io/docs/tasks/tools/)然后按照指南来安装kubectl。选择您的操作系统:
5252

53-
![](../images/kubectl-install.png)
53+
![](../../images/kubectl-install.png)
5454

5555
需要再次强调的是,对于macOS用户,如果你用Homebrew包管理器,那么你可以用brew装kubectl:
5656

@@ -116,6 +116,6 @@ git clone https://github.com/devstream-io/devstream.git
116116
make build -j10 VERSION=0.8.0
117117
```
118118

119-
或者可能你想先试用一下DevStream?没问题,参考我们的[快速开始](../quickstart.zh.md)文档!
119+
或者可能你想先试用一下DevStream?没问题,参考我们的[快速开始](../../quickstart.zh.md)文档!
120120

121121
Happy hacking!

0 commit comments

Comments
 (0)