mmsegmentation/.pre-commit-config.yaml
MengzhangLI 8aca73e187
[CI] Fix CI (#2029)
* [CI] Fix CI

* fix wrong command

* remove mmcv

* fix lint error

* add pytorch install

* fix pytorch installation

* fix mmengine error

* fix mmcv installation in pr_stage

* fix docstring coverage in lint and delete cu102 in pr_stage windows

* fix lint.yml and reset test.yml

* ignore some ut in build_windows of pr_stage

* test merge stage test

* fix mmseg dependencies in pr_stage_test.yml

* delete redundant lines in pr_stage and fix mmseg dependencies in mr_stage

* fix error in merge_stage

* delete python -m in merge_stage

* fix error in merge_stage

* let mmcv installation before mmengine

* fix error of mmcv not found

* fix ut error in merge)stage_test.yml

* fix build_windows ut in metge_stage

* fix error

* fix windows error of merge_stag

* Update .github/workflows/merge_stage_test.yml

* Update .github/workflows/merge_stage_test.yml

* Update .github/workflows/merge_stage_test.yml

* fix error

* delete skip timm ut

* add requitements/optinal.txt in test.yml

* Update .github/workflows/merge_stage_test.yml

Co-authored-by: Miao Zheng <76149310+MeowZheng@users.noreply.github.com>
2022-09-13 13:43:13 +08:00

61 lines
1.8 KiB
YAML

repos:
- repo: https://gitlab.com/pycqa/flake8.git
rev: 3.8.3
hooks:
- id: flake8
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort
- repo: https://github.com/pre-commit/mirrors-yapf
rev: v0.30.0
hooks:
- id: yapf
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.1.0
hooks:
- id: trailing-whitespace
- id: check-yaml
- id: end-of-file-fixer
- id: requirements-txt-fixer
- id: double-quote-string-fixer
- id: check-merge-conflict
- id: fix-encoding-pragma
args: ["--remove"]
- id: mixed-line-ending
args: ["--fix=lf"]
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.9
hooks:
- id: mdformat
args: ["--number"]
additional_dependencies:
- mdformat-openmmlab
- mdformat_frontmatter
- linkify-it-py
- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
hooks:
- id: codespell
- repo: https://github.com/myint/docformatter
rev: v1.3.1
hooks:
- id: docformatter
args: ["--in-place", "--wrap-descriptions", "79"]
- repo: local
hooks:
- id: update-model-index
name: update-model-index
description: Collect model information and update model-index.yml
entry: .dev/md2yml.py
additional_dependencies: [lxml, opencv-python, mmengine]
language: python
files: ^configs/.*\.md$
require_serial: true
- repo: https://github.com/open-mmlab/pre-commit-hooks
rev: v0.2.0 # Use the rev to fix revision
hooks:
- id: check-algo-readme
- id: check-copyright
args: ["mmseg", "tools", "tests", "demo"] # the dir_to_check with expected directory to check