Skip to content

Commit

Permalink
Run pre-commit run --all-files
Browse files Browse the repository at this point in the history
Signed-off-by: lizz <[email protected]>
  • Loading branch information
innerlee authored and yl-1993 committed Aug 23, 2021
1 parent 8f1dba2 commit 5706ed9
Show file tree
Hide file tree
Showing 34 changed files with 2,247 additions and 1,580 deletions.
23 changes: 18 additions & 5 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,36 @@ before_script:
- nvidia-smi
- python -c "import torch; print(torch.__version__)"
- ffmpeg -version
- export http_proxy=http://172.16.1.135:3128/
- export https_proxy=http://172.16.1.135:3128/
- export HTTP_PROXY=http://172.16.1.135:3128/
- export HTTPS_PROXY=http://172.16.1.135:3128/

linting:
stage: linting
script:
- pip install flake8 yapf isort==4.3.21
- flake8 .
- isort -rc --check-only --diff mmhuman3d/ tools/ tests/
- yapf -r -d mmhuman3d/ tools/ tests/ configs/
- pip install interrogate
- apt update && apt install curl libyaml-dev git -y
- curl -L https://get.rvm.io | bash -s -- --autolibs=read-fail
- source /etc/profile.d/rvm.sh
- rvm autolibs disable
- rvm install 2.7.1
- pip install pre-commit
- pre-commit install
- pre-commit run --all-files --verbose
- echo "Docstring coverage results:"
- interrogate -vinmMI -f 50 mmhuman3d/

test:
stage: test
tags:
- gpu
script:
- echo "Start building..."
- pip install opencv-python-headless
- pip install h5py tqdm
- conda install -c conda-forge xorg-libx11
- pip install vedo numpy scipy
- pip install vedo numpy scipy
- pip install -e .
- python -c "import mmhuman3d; print(mmhuman3d.__version__)"
- echo "Start testing..."
Expand Down
28 changes: 22 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,43 @@
exclude: .*/tests/data/
repos:
- repo: https://gitlab.com/pycqa/flake8.git
rev: 3.8.0
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.3
hooks:
- id: flake8
- repo: https://github.com/asottile/seed-isort-config
rev: v2.1.0
rev: v2.2.0
hooks:
- id: seed-isort-config
- repo: https://github.com/timothycrosley/isort
rev: 4.3.21
hooks:
- id: isort
- id: isort
- repo: https://github.com/pre-commit/mirrors-yapf
rev: v0.29.0
rev: v0.30.0
hooks:
- id: yapf
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.5.0
rev: v3.1.0
hooks:
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
exclude: .*/tests/data/
- 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/jumanjihouse/pre-commit-hooks
rev: 2.1.4
hooks:
- id: markdownlint
args: [ "-r", "~MD002,~MD007,~MD013,~MD024,~MD029,~MD033,~MD034,~MD036" ]
- repo: https://github.com/myint/docformatter
rev: v1.3.1
hooks:
- id: docformatter
args: ["--in-place", "--wrap-descriptions", "79"]
Loading

0 comments on commit 5706ed9

Please sign in to comment.