Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: refactor docs about development #1192

Merged
merged 3 commits into from
Oct 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ Thanks for contributing, and thanks for reading this doc before doing it!
The [DevStream Docs website](https://docs.devstream.io) contains information about how to get started, how the community organizes, and more. See the followings for more details before you decide to contribute:

- [Contributing Guide](https://docs.devstream.io/en/latest/contributing_guide/).
- [Development Workflow](https://docs.devstream.io/en/latest/development/development-workflow/), and other docs under the "Developer Guide" section.
- [Development Workflow](https://docs.devstream.io/en/latest/development/git-workflow/git-workflow/), and other docs under the "Developer Guide" section.

Those guidelines, as the name suggests, are only guidelines, not rules. So, use your best judgment, and feel free to propose changes to the contribute/development docs.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Want to remove or reinstall a specific piece in the workflow? DevStream has got

## Quick Start

If you want to get a quick start, follow our [quick start](./docs/quickstart.md) doc now.
If you want to get a quick start, follow our [quick start](https://docs.devstream.io/en/latest/quickstart/) doc now.

## Best Practices Toolchain Integration

Expand All @@ -105,13 +105,13 @@ Alternatively, run `dtm list plugins` and it will show you all the available plu
- Git
- Go (1.18+)

### Build
### Development Guide

See the [build](https://docs.devstream.io/en/latest/development/build/) doc under the "development" section of the documentation website.

### Test

See the [test](https://docs.devstream.io/en/latest/development/test/) doc under the "development" section of the documentation website.
- [Development Environment Setup](https://docs.devstream.io/en/latest/development/dev/dev-env-setup)
- [Code linter](https://docs.devstream.io/en/latest/development/dev/lint.md)
- [Build the source code](https://docs.devstream.io/en/latest/development/dev/build.md)
- [Test the source code: unit test, e2e test](https://docs.devstream.io/en/latest/development/dev/test)
- [Create a plugin](https://docs.devstream.io/en/latest/development/dev/creating-a-plugin)

## Contribute

Expand Down
18 changes: 9 additions & 9 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ A:受 [`git`](https://github.com/git/git#readme) 的启发,这个名字可

## 快速入门

现在就跟随我们的[快速入门](docs/quickstart.zh.md)文档开始使用 DevStream
现在就跟随我们的[快速入门](https://docs.devstream.io/en/latest/quickstart.zh/)文档开始使用 DevStream

## 最佳实践

Expand All @@ -99,24 +99,24 @@ DevStream已经支持许多工具,而且还在不断增加。关于支持的

或者,运行 `dtm list plugins`,它将显示所有可用的插件。

## 开发环境
## 开发指南

### 前提条件

- Git
- Go (1.18版本以上)

### 构建
### 开发指南

参见文档官网development章节下的[build](https://docs.devstream.io/en/latest/development/build/)文档。

### 测试

参见文档官网development章节下的[test](https://docs.devstream.io/en/latest/development/test/)文档。
- [开发环境搭建](https://docs.devstream.io/en/latest/development/dev/dev-env-setup.zh)
- [代码格式检查](https://docs.devstream.io/en/latest/development/dev/lint.zh)
- [源码构建](https://docs.devstream.io/en/latest/development/dev/build.zh)
- [代码测试:单元测试(unit test)、端到端测试(e2e test)](https://docs.devstream.io/en/latest/development/dev/test.zh)
- [开发新插件](https://docs.devstream.io/en/latest/development/dev/creating-a-plugin.zh)

## 贡献

首先,感谢你愿意为DevStream做贡献
首先,感谢你愿意为DevStream做贡献

关于如何贡献、贡献者成长计划、风格指南等更多细节,请查看我们的 [CONTRIBUTING](CONTRIBUTING.md) 文档。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

## 2 Full Process Guide

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

## 3 Flags

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

## 2 完整插件开发指南

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

## 3 命令行参数

Expand Down
35 changes: 22 additions & 13 deletions docs/contributing_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ Absolutely everyone is welcome to come to any of our meetings. You never need an

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

- [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).
- [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."
- [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).
- [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).
- 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.

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.
Expand Down Expand Up @@ -72,17 +72,26 @@ The unwritten rules (heck, we are writing them anyways) for PRs, contributors, a
- 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.
- 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.

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

- linter: [golangci-lint](https://github.com/golangci/golangci-lint)
- recommended IDE: [Visual Studio Code](https://code.visualstudio.com/), [GoLand](https://www.jetbrains.com/go/).
- [docs](https://docs.devstream.io/en/latest/)
- [quick start](./quickstart.md)
- Get the source code: https://github.com/devstream-io/devstream
- [Build the source code](./development/build.md)
- [Test the source code, unit](./development/test.md)
- TODO: Test the source code, integration/end-to-end
- TODO: Generate and preview the documentation locally
## Development

- Recommended IDEs: [Visual Studio Code](https://code.visualstudio.com/), [GoLand](https://www.jetbrains.com/go/)
- [Development Environment Setup](./development/dev/dev-env-setup.md)
- [Code linter](./development/dev/lint.md)
- [Build the source code](./development/dev/build.md)
- [Test the source code: unit test, e2e test](./development/dev/test.md)
- [Create a plugin](./development/dev/creating-a-plugin.md)

## DevStream Architecture

- [Architecture Overall](development/devstream/architecture.md)
- [Project Layout](development/devstream/project-layout.md)

## Documentation Contribution

- [Create documentation for DevStream](./development/docs-contribution/mkdocs.md)
- [Document translation](./development/docs-contribution/translation.md)

## Sign Your Commits

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

- 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.
- Build/test your code. Same as above.
- 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.
- Double-check your commit messages. More details in the [commit message guidelines](./development/git-workflow/commit-messages.md).

## Maintainer Team at Merico

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

- [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)。
- [help wanted](https://github.com/devstream-io/devstream/labels/help%20wanted) 指引了你在完成了 good first issue 后,适合继续贡献的地方。带有这个标签的 issue,除了核心贡献者外的任何人都可参与。
- [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)。
- [help wanted](https://github.com/devstream-io/devstream/labels/help%20wanted) 指引了你在完成了 good first issue 后,适合继续贡献的地方。带有这个标签的 issue,除了核心贡献者外的任何人都可参与。更多信息,请参阅 [help wanted 文档](development/git-workflow/help-wanted.zh.md)。
- 你不需要拘泥于带有这两个标签的 issue,其他任何你感兴趣的 issue,都可以直接参与,无论是方案修改建议、讨论与回复、还是代码。
- 有时 good first issue 或 help wanted 因为社区过于热情导致暂时没有空余,只要你愿意,你仍可以参与贡献!直接在 [Slack](https://join.slack.com/t/devstream-io/shared_invite/zt-16tb0iwzr-krcFGYRN7~Vv1suGZjdv4) 或 [微信群](https://github.com/devstream-io/devstream/main/docs/images/wechat-group-qr-code.png) 联系我们,告诉我们你愿意参与!

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

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

## 开发环境搭建
- 代码格式检查:[golangci-lint](https://github.com/golangci/golangci-lint)
更多关于 GitHub 协作的文档,可参考 [GitHub 协作流程指引](./development/git-workflow/git-workflow.md)。

## 开发

- 推荐的 IDE:[Visual Studio Code](https://code.visualstudio.com/), [GoLand](https://www.jetbrains.com/go/)
- [文档](https://docs.devstream.io/en/latest/index.zh/)
- [快速开始](https://docs.devstream.io/en/latest/quickstart.zh/)
- [源码](https://github.com/devstream-io/devstream)
- [源码构建](https://docs.devstream.io/en/latest/development/build.zh/)
- [代码测试:单元测试(unit test)、端到端测试(e2e test)](https://docs.devstream.io/en/latest/development/test.zh/)
- TODO: 源码测试, 集成/端到端测试
- TODO: 生成本地文档预览
- [开发环境搭建](./development/dev/dev-env-setup.zh.md)
- [代码格式检查](./development/dev/lint.zh.md)
- [源码构建](./development/dev/build.zh.md)
- [代码测试:单元测试(unit test)、端到端测试(e2e test)](./development/dev/test.zh.md)
- [开发新插件](./development/dev/creating-a-plugin.zh.md)

## 架构解读

- [整体架构](development/devstream/architecture.zh.md)
- [项目组织结构](development/devstream/project-layout.zh.md)

## 文档类贡献

- [为DevStream创建文档](./development/docs-contribution/mkdocs.zh.md)
- [文档翻译](./development/docs-contribution/translation.zh.md)

## 代码提交署名(Sign Off)

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

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

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

## Maintainer 团队

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## 0 Thanks for Contributing!

First, please read our [CONTRIBUTING](https://github.com/devstream-io/devstream/blob/main/CONTRIBUTING.md) doc.
First, please read our [CONTRIBUTING](../../contributing_guide.md) doc.

## 1 Scaffolding Automagically

Expand All @@ -24,7 +24,7 @@ Although dtm is automagic, but it can’t read your mind. I’m afraid that you

Please fill in the main logic of the plugin here.

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

## 2 Interfaces

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## 0 感谢你的贡献!

首先,请阅读我们的 [CONTRIBUTING](https://github.com/devstream-io/devstream/blob/main/CONTRIBUTING.md) 文档。
首先,请阅读我们的[贡献指引](../../contributing_guide.zh.md)文档。

## 1 自动建立新插件的代码框架

Expand All @@ -24,7 +24,7 @@

请在这里编写插件的主要逻辑。

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

## 2 接口

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ OK. So you want to get started with Golang/Kubernetes development. You've come t

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

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

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

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

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

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

---

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

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

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

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".

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

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:

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

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`.

### 2.3 Install `kubectl`

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

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

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

Expand Down Expand Up @@ -116,4 +116,4 @@ For example, you can try a local build:
make build -j10 VERSION=0.8.0
```

Or, maybe you would like to have a go with it first? Check our [quickstart guide](../quickstart.md). Happy hacking!
Or, maybe you would like to have a go with it first? Check our [quickstart guide](../../quickstart.md). Happy hacking!
Loading