forked from oceanbase/miniob
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…ceanbase#129) 增加License、CODE_OF_CONDUCT、NOTICE和CONTRIBUTING文件 Co-authored-by: wangyunlai <[email protected]>
- Loading branch information
1 parent
aaa8f64
commit b6d6123
Showing
4 changed files
with
317 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Contributor Covenant Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity, and expression, level of experience, education, socioeconomic status, nationality, personal appearance, race, religion, or sexual identity and orientation. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment include: | ||
|
||
* Using welcoming and inclusive language | ||
* Being respectful of differing viewpoints and experiences | ||
* Gracefully accepting constructive criticism | ||
* Focusing on what is best for the community | ||
* Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
* The use of sexualized language or imagery and unwelcome sexual attention or advances | ||
* Trolling, insulting/derogatory comments, and personal or political attacks | ||
* Public or private harassment | ||
* Publishing others' private information, such as a physical or electronic address, without explicit permission | ||
* Other conduct which could reasonably be considered inappropriate in a professional setting | ||
|
||
## Our Responsibilities | ||
|
||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies within all project spaces, and it also applies when an individual is representing the project or its community in public spaces. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality about the reporter of an incident. Further details of specific enforcement policies may be posted separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 1.4. | ||
|
||
For answers to common questions about this code of conduct, see [FAQ](https://www.contributor-covenant.org/faq). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
# OceanBase 贡献指南 | ||
|
||
OceanBase 社区热情欢迎每一位对数据库技术热爱的开发者,期待携手开启思维碰撞之旅。无论是文档格式调整或文字修正、问题修复还是增加新功能,都是对 OceanBase 社区参与和贡献方式之一,立刻开启您的 First Contribution 吧! | ||
|
||
## 阅读建议 | ||
|
||
为了帮助开发者更好的上手并学习 miniob, 建议阅读: | ||
|
||
1. [miniob 框架介绍](https://github.com/oceanbase/miniob/blob/main/docs/miniob-introduction.md) | ||
2. [如何编译 miniob 源码](https://github.com/oceanbase/miniob/blob/main/docs/how_to_build.md) | ||
3. [开发环境搭建(本地调试, 适用 Linux 和 Mac)](https://github.com/oceanbase/miniob/blob/main/docs/how_to_dev_miniob_by_vscode.md) | ||
4. [开发环境搭建(远程调试, 适用于 Window, Linux 和 Mac)](https://github.com/oceanbase/miniob/blob/main/docs/how_to_dev_in_docker_container_by_vscode.md) | ||
5. [miniob 词法语法解析开发与测试](docs/miniob-sql-parser.md) | ||
|
||
更多的文档, 可以参考 [docs](https://github.com/oceanbase/miniob/tree/main/docs), 为了帮助大家更好的学习数据库基础知识, OceanBase 社区提供了一系列教程, 建议学习: | ||
|
||
1. [《从0到1数据库内核实战教程》 视频教程](https://open.oceanbase.com/activities/4921877?id=4921946) | ||
2. [《从0到1数据库内核实战教程》 基础讲义](https://github.com/oceanbase/kernel-quickstart) | ||
3. [《数据库管理系统实现》 华中科技大学实现教材](https://github.com/oceanbase/miniob/blob/main/docs/lectures/index.md) | ||
|
||
## 如何找到一个合适issue | ||
|
||
* 通过[寻找一个合适的issue](https://github.com/oceanbase/miniob/issues), 找到一个可以入手的issue | ||
* 通过`bug`/`new feature`找到当前版本的bug和建议添加的功能 | ||
找到合适的issue之后,可以在issue下回复`/assign` 将issue分配给自己,并添加`developing`标签,这个标签表示当前这个issue在编码开发中 | ||
|
||
## 代码贡献流程 | ||
|
||
以 Mac 操作系统为例 | ||
|
||
### 1. Fork 项目仓库 | ||
|
||
1. 访问项目的 [GitHub 地址](https://github.com/oceanbase/miniob)。 | ||
2. 点击 Fork 按钮创建远程分支。 | ||
|
||
### 2. 配置本地环境变量 | ||
|
||
``` | ||
working_dir=$HOME/workspace # 定义工作目录 | ||
user={GitHub账户名} # 和github上的用户名保持一致 | ||
``` | ||
|
||
### 3. 克隆代码 | ||
|
||
``` | ||
mkdir -p $working_dir | ||
cd $working_dir | ||
git clone [email protected]:$user/miniob.git | ||
# 添加上游分支 | ||
cd $working_dir/miniob | ||
git remote add upstream [email protected]:oceanbase/miniob.git | ||
# 为上游分支设置 no_push | ||
git remote set-url --push upstream no_push | ||
# 确认远程分支有效 | ||
git remote -v | ||
``` | ||
|
||
### 4. 创建新分支 | ||
|
||
``` | ||
# 更新本地 master 分支。 | ||
new_branch_name={issue_xxx} # 设定分支名,建议直接使用issue+id的命名 | ||
cd $working_dir/oceanbase | ||
git fetch upstream | ||
git checkout main | ||
git rebase upstream/main | ||
git checkout -b $new_branch_name | ||
``` | ||
|
||
### 5. 开发 | ||
|
||
在新建的分支上完成开发 | ||
|
||
### 6. 提交代码 | ||
|
||
``` | ||
# 检查本地文件状态 | ||
git status | ||
# 添加您希望提交的文件 | ||
# 如果您希望提交所有更改,直接使用 `git add .` | ||
git add <file> ... | ||
# 为了让 github 自动将 pull request 关联上 github issue, | ||
# 建议 commit message 中带上 " #{issueid}", 其中{issueid} 为issue 的id, | ||
git commit -m "commit-message: update the xx" | ||
# 在开发分支执行以下操作 | ||
git fetch upstream | ||
git rebase upstream/main | ||
git push -u origin $new_branch_name | ||
``` | ||
|
||
### 7. 创建 PR | ||
|
||
1. 访问您 Fork 的仓库。 | ||
2. 单击 {new_branch_name} 分支旁的 Compare & pull request 按钮。 | ||
|
||
### 8. 签署 CLA 协议 | ||
签署[Contributor License Agreement (CLA)](https://cla-assistant.io/oceanbase/oceanbase) ;在提交 Pull Request 的过程中需要签署后才能进入下一步流程。如果没有签署,在提交流程会有如下报错: | ||
|
||
 | ||
|
||
### 9. 代码审查与合并 | ||
有review、合并权限的维护者,会帮助开发者进行代码review;review意见通过后,后续的操作都会由维护者进行,包括运行CI测试(目前包括centos和ubuntu的编译)等,最终代码会有维护者通过后合入. | ||
|
||
### 10. 祝贺成为贡献者 | ||
|
||
当 pull request 合并后, 则所有的 contributing 工作全部完成, 恭喜您, 您成为 OceanBase 贡献者. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
OceanBase miniob | ||
|
||
Copyright (c) 2021 Xie Meiyi([email protected]) and OceanBase and/or its affiliates. All rights reserved. | ||
|
||
miniob is licensed under [Mulan PSL v2.](http://license.coscl.org.cn/MulanPSL2) | ||
|
||
|
||
=============================== Libevent =============================== | ||
Libevent is available for use under the following license, commonly known | ||
as the 3-clause (or "modified") BSD license: | ||
|
||
============================== | ||
Copyright (c) 2000-2007 Niels Provos <[email protected]> | ||
Copyright (c) 2007-2012 Niels Provos and Nick Mathewson | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions | ||
are met: | ||
1. Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
2. Redistributions in binary form must reproduce the above copyright | ||
notice, this list of conditions and the following disclaimer in the | ||
documentation and/or other materials provided with the distribution. | ||
3. The name of the author may not be used to endorse or promote products | ||
derived from this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | ||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | ||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | ||
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
============================== | ||
|
||
============================== JsonCpp ================================= | ||
The JsonCpp library's source code, including accompanying documentation, | ||
tests and demonstration applications, are licensed under the following | ||
conditions... | ||
|
||
Baptiste Lepilleur and The JsonCpp Authors explicitly disclaim copyright in all | ||
jurisdictions which recognize such a disclaimer. In such jurisdictions, | ||
this software is released into the Public Domain. | ||
|
||
In jurisdictions which do not recognize Public Domain property (e.g. Germany as of | ||
2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur and | ||
The JsonCpp Authors, and is released under the terms of the MIT License (see below). | ||
|
||
In jurisdictions which recognize Public Domain property, the user of this | ||
software may choose to accept it either as 1) Public Domain, 2) under the | ||
conditions of the MIT License (see below), or 3) under the terms of dual | ||
Public Domain/MIT License conditions described here, as they choose. | ||
|
||
The MIT License is about as close to Public Domain as a license can get, and is | ||
described in clear, concise terms at: | ||
|
||
http://en.wikipedia.org/wiki/MIT_License | ||
|
||
The full text of the MIT License follows: | ||
|
||
======================================================================== | ||
Copyright (c) 2007-2010 Baptiste Lepilleur and The JsonCpp Authors | ||
|
||
Permission is hereby granted, free of charge, to any person | ||
obtaining a copy of this software and associated documentation | ||
files (the "Software"), to deal in the Software without | ||
restriction, including without limitation the rights to use, copy, | ||
modify, merge, publish, distribute, sublicense, and/or sell copies | ||
of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS | ||
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN | ||
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
======================================================================== | ||
|
||
=============================== googletest ============================= | ||
Copyright 2008, Google Inc. | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are | ||
met: | ||
|
||
* Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
* Redistributions in binary form must reproduce the above | ||
copyright notice, this list of conditions and the following disclaimer | ||
in the documentation and/or other materials provided with the | ||
distribution. | ||
* Neither the name of Google Inc. nor the names of its | ||
contributors may be used to endorse or promote products derived from | ||
this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |