[Enhancement] Update ci and docs (#16)

* fix link issue

* fix link issue

* [Docs] update intro and fix issues

* [Docs] fix translation

* [Docs] update introduction

* remove duplicated model_zoo.yml

* update intro and fix codecov icon

* update README

* update CI and README

* add human3d link

* update mmhuman3d link
pull/19/head
Linyiqi 2021-12-05 18:30:13 +08:00 committed by GitHub
parent fd33c3c368
commit 0b0f8b3966
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 90 additions and 40 deletions

View File

@ -1,27 +1,25 @@
name: build name: build
on: [push, pull_request] on:
push:
paths-ignore:
- 'README.md'
- 'README_zh-CN.md'
- 'docs/**'
- 'docs_zh-CN/**'
- 'examples/**'
- '.dev_scripts/**'
pull_request:
paths-ignore:
- 'README.md'
- 'README_zh-CN.md'
- 'docs/**'
- 'docs_zh-CN/**'
- 'examples/**'
- '.dev_scripts/**'
jobs: jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install pre-commit hook
run: |
pip install pre-commit
pre-commit install
- name: Linting
run: pre-commit run --all-files
- name: Check docstring coverage
run: |
pip install interrogate
interrogate -v --ignore-init-method --ignore-module --ignore-nested-functions --ignore-regex "__repr__" --fail-under 80 mmfewshot
build_cpu: build_cpu:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:

27
.github/workflows/lint.yml vendored 100644
View File

@ -0,0 +1,27 @@
name: lint
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install pre-commit hook
run: |
# markdownlint requires ruby >= 2.7
sudo apt-add-repository ppa:brightbox/ruby-ng -y
sudo apt-get update
sudo apt-get install -y ruby2.7
pip install pre-commit
pre-commit install
- name: Linting
run: pre-commit run --all-files
- name: Check docstring coverage
run: |
pip install interrogate
interrogate -v --ignore-init-method --ignore-module --ignore-nested-functions --ignore-regex "__repr__" --fail-under 80 mmfewshot

View File

@ -28,8 +28,8 @@ repos:
args: ["--remove"] args: ["--remove"]
- id: mixed-line-ending - id: mixed-line-ending
args: ["--fix=lf"] args: ["--fix=lf"]
- repo: https://github.com/jumanjihouse/pre-commit-hooks - repo: https://github.com/markdownlint/markdownlint
rev: 2.1.4 rev: v0.11.0
hooks: hooks:
- id: markdownlint - id: markdownlint
args: ["-r", "~MD002,~MD013,~MD024,~MD029,~MD033,~MD034,~MD036", "-t", "allow_different_nesting"] args: ["-r", "~MD002,~MD013,~MD024,~MD029,~MD033,~MD034,~MD036", "-t", "allow_different_nesting"]

View File

@ -53,7 +53,7 @@ This project is released under the [Apache 2.0 license](LICENSE).
Supported algorithms: Supported algorithms:
<details open> <details open>
<summary>classification</summary> <summary>Classification</summary>
- [x] [Baseline](configs/classification/baseline/README.md) (ICLR'2019) - [x] [Baseline](configs/classification/baseline/README.md) (ICLR'2019)
- [x] [Baseline++](configs/classification/baseline_plus/README.md) (ICLR'2019) - [x] [Baseline++](configs/classification/baseline_plus/README.md) (ICLR'2019)
@ -146,3 +146,4 @@ mmfewshot is an open source project that is contributed by researchers and engin
- [MMGeneration](https://github.com/open-mmlab/mmgeneration): OpenMMLab image and video generative models toolbox. - [MMGeneration](https://github.com/open-mmlab/mmgeneration): OpenMMLab image and video generative models toolbox.
- [MMFlow](https://github.com/open-mmlab/mmflow): OpenMMLab optical flow toolbox and benchmark. - [MMFlow](https://github.com/open-mmlab/mmflow): OpenMMLab optical flow toolbox and benchmark.
- [MMFewShot](https://github.com/open-mmlab/mmfewshot): OpenMMLab FewShot Learning Toolbox and Benchmark. - [MMFewShot](https://github.com/open-mmlab/mmfewshot): OpenMMLab FewShot Learning Toolbox and Benchmark.
- [MMHuman3D](https://github.com/open-mmlab/mmhuman3d): OpenMMLab 3D Human Parametric Model Toolbox and Benchmark.

View File

@ -7,6 +7,7 @@
## Introduction ## Introduction
[English](README.md) | 简体中文 [English](README.md) | 简体中文
[![Documentation](https://readthedocs.org/projects/mmfewshot/badge/?version=latest)](https://mmfewshot.readthedocs.io/en/latest/?badge=latest) [![Documentation](https://readthedocs.org/projects/mmfewshot/badge/?version=latest)](https://mmfewshot.readthedocs.io/en/latest/?badge=latest)
[![actions](https://github.com/open-mmlab/mmfewshot/workflows/build/badge.svg)](https://github.com/open-mmlab/mmfewshot/actions) [![actions](https://github.com/open-mmlab/mmfewshot/workflows/build/badge.svg)](https://github.com/open-mmlab/mmfewshot/actions)
[![codecov](https://codecov.io/gh/open-mmlab/mmfewshot/branch/main/graph/badge.svg)](https://codecov.io/gh/open-mmlab/mmfewshot) [![codecov](https://codecov.io/gh/open-mmlab/mmfewshot/branch/main/graph/badge.svg)](https://codecov.io/gh/open-mmlab/mmfewshot)
@ -145,6 +146,7 @@ MMFewShot 是一款由不同学校和公司共同贡献的开源项目。我们
- [MMGeneration](https://github.com/open-mmlab/mmgeneration): OpenMMLab 新一代生成模型工具箱 - [MMGeneration](https://github.com/open-mmlab/mmgeneration): OpenMMLab 新一代生成模型工具箱
- [MMFlow](https://github.com/open-mmlab/mmflow): OpenMMLab 光流估计工具箱与测试基准 - [MMFlow](https://github.com/open-mmlab/mmflow): OpenMMLab 光流估计工具箱与测试基准
- [MMFewShot](https://github.com/open-mmlab/mmfewshot): OpenMMLab 少样本学习工具箱与测试基准 - [MMFewShot](https://github.com/open-mmlab/mmfewshot): OpenMMLab 少样本学习工具箱与测试基准
- [MMHuman3D](https://github.com/open-mmlab/mmhuman3d): OpenMMLab 人体参数化模型工具箱与测试基准
## 欢迎加入 OpenMMLab 社区 ## 欢迎加入 OpenMMLab 社区

View File

@ -146,6 +146,10 @@ html_theme_options = {
'name': 'MMFewShot', 'name': 'MMFewShot',
'url': 'https://mmfewshot.readthedocs.io/en/latest/', 'url': 'https://mmfewshot.readthedocs.io/en/latest/',
}, },
{
'name': 'MMHuman3D',
'url': 'https://github.com/open-mmlab/mmhuman3d',
},
] ]
}, },
{ {

View File

@ -5,9 +5,9 @@
- PyTorch 1.5+ - PyTorch 1.5+
- CUDA 9.2+ - CUDA 9.2+
- GCC 5+ - GCC 5+
- [mmcv](https://mmcv.readthedocs.io/en/latest/#installation) 1.3.12+ - [mmcv](https://mmcv.readthedocs.io/en/latest/get_started/installation.html) 1.3.12+
- [mmdet](https://mmdetection.readthedocs.io/en/latest/#installation) 2.16.0+ - [mmdet](https://mmdetection.readthedocs.io/en/latest/get_started.html#installation) 2.16.0+
- [mmcls](https://mmclassification.readthedocs.io/en/latest/#installation) 0.15.0+ - [mmcls](https://mmclassification.readthedocs.io/en/latest/install.html) 0.15.0+
Compatible MMCV, MMClassification and MMDetection versions are shown as below. Please install the correct version of them to avoid installation issues. Compatible MMCV, MMClassification and MMDetection versions are shown as below. Please install the correct version of them to avoid installation issues.

View File

@ -87,11 +87,11 @@ html_theme_options = {
}, },
{ {
'name': 'name':
'Docs', '文档',
'children': [ 'children': [
{ {
'name': 'MMCV', 'name': 'MMCV',
'url': 'https://mmcv.readthedocs.io/en/latest/', 'url': 'https://mmcv.readthedocs.io/zh_CN/latest/',
}, },
{ {
'name': 'MIM', 'name': 'MIM',
@ -99,24 +99,25 @@ html_theme_options = {
}, },
{ {
'name': 'MMAction2', 'name': 'MMAction2',
'url': 'https://mmaction2.readthedocs.io/en/latest/', 'url': 'https://mmaction2.readthedocs.io/zh_CN/latest/',
}, },
{ {
'name': 'MMClassification', 'name': 'MMClassification',
'url': 'url':
'https://mmclassification.readthedocs.io/en/latest/', 'https://mmclassification.readthedocs.io/zh_CN/latest/',
}, },
{ {
'name': 'MMDetection', 'name': 'MMDetection',
'url': 'https://mmdetection.readthedocs.io/en/latest/', 'url': 'https://mmdetection.readthedocs.io/zh_CN/latest/',
}, },
{ {
'name': 'MMDetection3D', 'name': 'MMDetection3D',
'url': 'https://mmdetection3d.readthedocs.io/en/latest/', 'url':
'https://mmdetection3d.readthedocs.io/zh_CN/latest/',
}, },
{ {
'name': 'MMEditing', 'name': 'MMEditing',
'url': 'https://mmediting.readthedocs.io/en/latest/', 'url': 'https://mmediting.readthedocs.io/zh_CN/latest/',
}, },
{ {
'name': 'MMGeneration', 'name': 'MMGeneration',
@ -124,19 +125,20 @@ html_theme_options = {
}, },
{ {
'name': 'MMOCR', 'name': 'MMOCR',
'url': 'https://mmocr.readthedocs.io/en/latest/', 'url': 'https://mmocr.readthedocs.io/zh_CN/latest/',
}, },
{ {
'name': 'MMPose', 'name': 'MMPose',
'url': 'https://mmpose.readthedocs.io/en/latest/', 'url': 'https://mmpose.readthedocs.io/zh_CN/latest/',
}, },
{ {
'name': 'MMSegmentation', 'name': 'MMSegmentation',
'url': 'https://mmsegmentation.readthedocs.io/en/latest/', 'url':
'https://mmsegmentation.readthedocs.io/zh_CN/latest/',
}, },
{ {
'name': 'MMTracking', 'name': 'MMTracking',
'url': 'https://mmtracking.readthedocs.io/en/latest/', 'url': 'https://mmtracking.readthedocs.io/zh_CN/latest/',
}, },
{ {
'name': 'MMFlow', 'name': 'MMFlow',
@ -144,7 +146,11 @@ html_theme_options = {
}, },
{ {
'name': 'MMFewShot', 'name': 'MMFewShot',
'url': 'https://mmfewshot.readthedocs.io/en/latest/', 'url': 'https://mmfewshot.readthedocs.io/zh_CN/latest/',
},
{
'name': 'MMHuman3D',
'url': 'https://github.com/open-mmlab/mmhuman3d',
}, },
] ]
}, },

View File

@ -139,8 +139,20 @@ def add_mim_extension():
if mode == 'symlink': if mode == 'symlink':
src_relpath = osp.relpath(src_path, osp.dirname(tar_path)) src_relpath = osp.relpath(src_path, osp.dirname(tar_path))
os.symlink(src_relpath, tar_path) try:
elif mode == 'copy': os.symlink(src_relpath, tar_path)
except OSError:
# Creating a symbolic link on windows may raise an
# `OSError: [WinError 1314]` due to privilege. If
# the error happens, the src file will be copied
mode = 'copy'
warnings.warn(
f'Failed to create a symbolic link for {src_relpath}, '
f'and it will be copied to {tar_path}')
else:
continue
if mode == 'copy':
if osp.isfile(src_path): if osp.isfile(src_path):
shutil.copyfile(src_path, tar_path) shutil.copyfile(src_path, tar_path)
elif osp.isdir(src_path): elif osp.isdir(src_path):