Skip to content

Commit

Permalink
Merge pull request #154 from BR-IDL/develop
Browse files Browse the repository at this point in the history
Merge current dev to main
  • Loading branch information
xperzy authored Jan 11, 2022
2 parents 5ba4761 + 6a2c063 commit 2a268c6
Show file tree
Hide file tree
Showing 1,039 changed files with 133,653 additions and 4,629 deletions.
12 changes: 6 additions & 6 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe your feature request**

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Describe the reference code or paper**


**Describe the possible solution**


**Additional context**
Add any other context or screenshots about the feature request here.
28 changes: 21 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,27 @@ dmypy.json
# Pyre type checker
.pyre/

# segmentation
./segmentation/output
./segmentation/log
# Paddle checkpoints
*.pdparams
*.pdopt
./segmentation/pytorch_2_paddle.py
./segmentation/readme.txt
setr.py.bak


# Segmentation
/semantic_segmentation/output
/semantic_segmentation/log
/semantic_segmentation/data
/semantic_segmentation/tmp
/semantic_segmentation/pytorch_2_paddle.py
/semantic_segmentation/config.ini
/semantic_segmentation/job.sh
/semantic_segmentation/run.sh

# Image Classification
output/

# macOS
.DS_Store
*/.DS_Store

# Editor Config
.idea/
.vscode/
9 changes: 6 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
English | [简体中文](./CONTRIBUTING_cn.md)

# Contribute Code

You encourage and appreciate researchers and developers to contribute to project **PPViT**.
You encourage and appreciate researchers and developers to contribute to project **PaddleViT**.
To contribute to PaddlePaddle, you have to agree with the [PaddleViT Contributor License Agreement](https://cla-assistant.io/BR-IDL/PaddleViT).

This document explains our workflow and working style.

## Workflow

PPViT uses this [Git branching model](http://nvie.com/posts/a-successful-git-branching-model/). You can follow the listed steps for common contributions.
PaddleViT uses this [Git branching model](http://nvie.com/posts/a-successful-git-branching-model/). You can follow the listed steps for common contributions.

### 1. Fork the repo

Expand Down Expand Up @@ -52,7 +55,7 @@ PPViT uses this [Git branching model](http://nvie.com/posts/a-successful-git-bra
An experienced Git user pulls from the official repo often -- daily or even hourly, so they notice conflicts with others work early, and it's easier to resolve smaller conflicts.
```bash
$ git remote add upstream https://github.com/xperzy/PPViT
$ git remote add upstream https://github.com/BR-IDL/PaddleViT
$ git pull upstream develop
```
Expand Down
124 changes: 124 additions & 0 deletions CONTRIBUTING_cn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
简体中文 | [English](./CONTRIBUTING.md)

## 贡献代码

鼓励并感谢为**PaddleViT**项目提供贡献的研究人员和开发人员。

您需要同意[PaddleViT 参与者许可协议](https://cla-assistant.io/BR-IDL/PaddleViT),方可以参与PaddlePaddle贡献。

本文档描述了我们的工作流程和代码风格。

## 工作流程

PaddleViT 使用这个[Git 分支模型](http://nvie.com/posts/a-successful-git-branching-model/). 您可以按照以下步骤提交代码并参与贡献.

### 1. Fork

请从您的fork中提交 `Pull Requests` .

只需要前往我们的 GitHub repo 页面并点击 ["Fork"](https://help.github.com/articles/fork-a-repo/) 按钮.

### 2. 克隆 (Clone)

将您的fork复制到本地:

```bash
$ git clone https://github.com/your-github-account/PPViT
$ cd PPViT
```

### 3. 创建本地 `feature` 分支

对于日常工作例如添加新功能或修复错误,请在编码之前基于`develop`分支创建一个 `feature` 分支:

```bash
$ git checkout develop
$ git checkout -b feature
```
其中`feature` 可以替换为你正在处理的功能的名称.

### 4. 提交 (Commit)

`during and after` 您的更改,将代码提交到本地存储库.

```shell
$ git add -A
$ git commit -m “message”
```

### 5. 测试

- 我们鼓励编写`unittest` 来测试你编写的类与方法的实现.
- 在开始合并之前,请在相关数据集上测试模型的性能。

### 6. 保持本地仓库最新 (Keep Pulling)
在准备发起Pull Request之前,需要同步原仓库中最新的代码。

有经验的Git用户会经常从官方存储库中pull数据--每天甚至每小时,因此他们会尽早注意到与其他人的工作冲突,并且更容易解决较小的冲突。

```bash
$ git remote add upstream https://github.com/BR-IDL/PaddleViT
$ git pull upstream develop
```

### 7. Push 以及 file a `Pull Request`

1. **Push** 您的本地工作到您的fork仓库中:

```bash
$ git push origin my-cool-stuff
```
> 其中,`my-cool-stuff`是您的分支名称

push操作允许您创建一个pull request,请求此 [official repo](https://github.com/BR-IDL/PaddleViT) 将您的更改拉入到官方库中.

2. 想要创建一个`Pull Request`, 请按照 [这些步骤](https://help.github.com/articles/creating-a-pull-request/).

如果您的更改是`fixing an issue`, 请在pull request的描述部分写下["Fixes <issue-URL>"](https://help.github.com/articles/closing-issues-using-keywords/). 当合并您的 pull request时,Github将关闭该问题.

请记住为您的pull request指定审阅者. 如果您不知道正确的选择,请遵循Github的推荐.

### 8. 删除本地和远程 `feature` 分支

成功合并到`develop`分支后,删除您的`feature` 分支。
为了保持您的本地工作区和fork简洁,您可能想要删除合并的分支:

```bash
$ git push origin :my-cool-stuff
$ git checkout develop
$ git pull upstream develop
$ git branch -d my-cool-stuff
```

## 代码审查

- 请随时通过 IM 或电子邮件来 ping 您的审阅者以发送您的pull request.

- 请回答审阅者的每一条评论. 如果您要关注评论,请写“完成”;否则请给出理由。

- 如果您不希望您的审阅者被电子邮件通知淹没,可以通过 [批量](https://help.github.com/articles/reviewing-proposed-changes-in-a-pull-request/) 回复评论.

- 减少非必要的提交. 存在一些开发人员经常提交,建议通过运行 `git commit --amend` 代替 `git commit`,将一系列小的变动附加到一个提交中.

## Coding Standard

### Code Style

我们的Python代码遵循 [PEP8 language guide](https://zh-google-styleguide.readthedocs.io/en/latest/google-python-styleguide/python_language_rules/) 以及 [PEP8 style guide](https://zh-google-styleguide.readthedocs.io/en/latest/google-python-styleguide/python_style_rules/).

### Use Pylint

[Pylint](http://pylint.pycqa.org/en/latest/) 是一款 Python代码分析工具,可以分析Python代码中的错误,发现不符合编程标准或存在潜在问题的代码。

### Comments and Annotations

为了让其他人更容易使用并生成在线文件,请在每个类方法的每个函数中包含文档的描述字符串。

### 单元测试

请记得添加相关的单元测试

- 对于 Python 代码, 请使用 [Python's standard `unittest` package](http://pythontesting.net/framework/unittest/unittest-introduction/).
尝试对每个类方法的每个函数都进行单元测试。
Binary file modified PaddleViT.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 2a268c6

Please sign in to comment.