forked from open-mmlab/mmpretrain
-
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.
[Refactor] Use mdformat instead of markdownlint to format markdown. (o…
…pen-mmlab#844) * [Refactor] Use mdformat instead of markdownlint to format markdown. * Update unavailiable api links in tutorials * Update CONTRIBUTING.md * Use mdformat==0.7.9 to support Python 3.6
- Loading branch information
Showing
72 changed files
with
1,359 additions
and
1,304 deletions.
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
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 |
---|---|---|
@@ -1,32 +1,34 @@ | ||
--- | ||
name: 新功能 | ||
about: 为项目提一个建议 | ||
title: "[Feature]" | ||
title: '[Feature]' | ||
labels: enhancement | ||
assignees: '' | ||
|
||
--- | ||
|
||
推荐使用英语模板 Feature request,以便你的问题帮助更多人。 | ||
|
||
### 描述这个功能 | ||
|
||
[填写这里] | ||
\[填写这里\] | ||
|
||
### 动机 | ||
|
||
请简要说明以下为什么需要添加这个新功能 | ||
例 1. 现在进行 xxx 的时候不方便 | ||
例 2. 最近的论文中提出了有一个很有帮助的 xx | ||
|
||
[填写这里] | ||
\[填写这里\] | ||
|
||
### 相关资源 | ||
|
||
是否有相关的官方实现或者第三方实现?这些会很有参考意义。 | ||
|
||
[填写这里] | ||
\[填写这里\] | ||
|
||
### 其他相关信息 | ||
|
||
其他和这个功能相关的信息或者截图,请放在这里。 | ||
另外如果你愿意参与实现这个功能并提交 PR,请在这里说明,我们将非常欢迎。 | ||
|
||
[填写这里] | ||
\[填写这里\] |
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 |
---|---|---|
@@ -1,39 +1,44 @@ | ||
--- | ||
name: 报告 Bug | ||
about: 报告问题以帮助我们提升 | ||
title: "[Bug]" | ||
title: '[Bug]' | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
推荐使用英语模板 Bug report,以便你的问题帮助更多人。 | ||
|
||
### 描述 bug | ||
|
||
简单地描述一下遇到了什么 bug | ||
|
||
[填写这里] | ||
\[填写这里\] | ||
|
||
### 复现流程 | ||
|
||
在命令行中执行的详细操作 | ||
|
||
```shell | ||
[填写这里] | ||
``` | ||
|
||
### 相关信息 | ||
|
||
1. `pip list | grep "mmcv\|mmcls\|^torch"` 命令的输出 | ||
[填写这里] | ||
\[填写这里\] | ||
2. 如果你修改了,或者使用了新的配置文件,请在这里写明 | ||
|
||
```python | ||
[填写这里] | ||
``` | ||
|
||
3. 如果你是在训练过程中遇到的问题,请填写完整的训练日志和报错信息 | ||
[填写这里] | ||
\[填写这里\] | ||
4. 如果你对 `mmcls` 文件夹下的代码做了其他相关的修改,请在这里写明 | ||
[填写这里] | ||
\[填写这里\] | ||
|
||
### 附加内容 | ||
|
||
任何其他有关该 bug 的信息、截图等 | ||
|
||
[填写这里] | ||
\[填写这里\] |
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 |
---|---|---|
@@ -1,37 +1,42 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: "[Bug]" | ||
title: '[Bug]' | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
### Describe the bug | ||
|
||
A clear and concise description of what the bug is. | ||
|
||
[here] | ||
\[here\] | ||
|
||
### To Reproduce | ||
|
||
The command you executed. | ||
|
||
```shell | ||
[here] | ||
``` | ||
|
||
### Post related information | ||
|
||
1. The output of `pip list | grep "mmcv\|mmcls\|^torch"` | ||
[here] | ||
\[here\] | ||
2. Your config file if you modified it or created a new one. | ||
|
||
```python | ||
[here] | ||
``` | ||
|
||
3. Your train log file if you meet the problem during training. | ||
[here] | ||
\[here\] | ||
4. Other code you modified in the `mmcls` folder. | ||
[here] | ||
\[here\] | ||
|
||
### Additional context | ||
|
||
Add any other context about the problem here. | ||
|
||
[here] | ||
\[here\] |
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 |
---|---|---|
@@ -1,30 +1,32 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: "[Feature]" | ||
title: '[Feature]' | ||
labels: enhancement | ||
assignees: '' | ||
|
||
--- | ||
|
||
### Describe the feature | ||
|
||
[here] | ||
\[here\] | ||
|
||
### Motivation | ||
|
||
A clear and concise description of the motivation of the feature. | ||
Ex1. It is inconvenient when [....]. | ||
Ex2. There is a recent paper [....], which is very helpful for [....]. | ||
Ex1. It is inconvenient when \[....\]. | ||
Ex2. There is a recent paper \[....\], which is very helpful for \[....\]. | ||
|
||
[here] | ||
\[here\] | ||
|
||
### Related resources | ||
|
||
If there is an official code release or third-party implementation, please also provide the information here, which would be very helpful. | ||
|
||
[here] | ||
\[here\] | ||
|
||
### Additional context | ||
|
||
Add any other context or screenshots about the feature request here. | ||
If you would like to implement the feature and create a PR, please leave a comment here and that would be much appreciated. | ||
|
||
[here] | ||
\[here\] |
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
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,61 @@ | ||
# Contributing to OpenMMLab | ||
|
||
All kinds of contributions are welcome, including but not limited to the following. | ||
|
||
- Fix typo or bugs | ||
- Add documentation or translate the documentation into other languages | ||
- Add new features and components | ||
|
||
## Workflow | ||
|
||
1. fork and pull the latest OpenMMLab repository (MMClassification) | ||
2. checkout a new branch (do not use master branch for PRs) | ||
3. commit your changes | ||
4. create a PR | ||
|
||
```{note} | ||
If you plan to add some new features that involve large changes, it is encouraged to open an issue for discussion first. | ||
``` | ||
|
||
## Code style | ||
|
||
### Python | ||
|
||
We adopt [PEP8](https://www.python.org/dev/peps/pep-0008/) as the preferred code style. | ||
|
||
We use the following tools for linting and formatting: | ||
|
||
- [flake8](https://github.com/PyCQA/flake8): A wrapper around some linter tools. | ||
- [isort](https://github.com/timothycrosley/isort): A Python utility to sort imports. | ||
- [yapf](https://github.com/google/yapf): A formatter for Python files. | ||
- [codespell](https://github.com/codespell-project/codespell): A Python utility to fix common misspellings in text files. | ||
- [mdformat](https://github.com/executablebooks/mdformat): Mdformat is an opinionated Markdown formatter that can be used to enforce a consistent style in Markdown files. | ||
- [docformatter](https://github.com/myint/docformatter): A formatter to format docstring. | ||
|
||
Style configurations can be found in [setup.cfg](./setup.cfg). | ||
|
||
We use [pre-commit hook](https://pre-commit.com/) that checks and formats for `flake8`, `yapf`, `isort`, `trailing whitespaces`, `markdown files`, | ||
fixes `end-of-files`, `double-quoted-strings`, `python-encoding-pragma`, `mixed-line-ending`, sorts `requirments.txt` automatically on every commit. | ||
The config for a pre-commit hook is stored in [.pre-commit-config](https://github.com/open-mmlab/mmclassification/blob/master/.pre-commit-config.yaml). | ||
|
||
After you clone the repository, you will need to install initialize pre-commit hook. | ||
|
||
```shell | ||
pip install -U pre-commit | ||
``` | ||
|
||
From the repository folder | ||
|
||
```shell | ||
pre-commit install | ||
``` | ||
|
||
After this on every commit check code linters and formatter will be enforced. | ||
|
||
```{important} | ||
Before you create a PR, make sure that your code lints and is formatted by yapf. | ||
``` | ||
|
||
### C++ and CUDA | ||
|
||
We follow the [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html). |
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
Oops, something went wrong.