Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

prune CI formatting + parallel (#1043)

Jirka Borovec2168f337187b
diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml
index 46224ccca..0cfef1358 100644
--- a/.github/workflows/format.yml
+++ b/.github/workflows/format.yml
@@ -11,66 +11,54 @@ on:
jobs:
linter:
runs-on: [ubuntu-latest]
-
steps:
- uses: actions/checkout@v2
- - name: Setup conda dependencies
- uses: conda-incubator/setup-miniconda@v2
+ - name: Cache pip
+ uses: actions/cache@v2
with:
- auto-update-conda: true
- python-version: 3.7
+ path: ~/.cache/pip
+ key: ${{ runner.os }}-pip-${{ hashFiles('requirements-dev.txt') }}
+ restore-keys: ${{ runner.os }}-pip-
- name: Install dependencies
- shell: bash -l {0}
run: |
- conda install curl make -c conda-forge
- conda install pytorch cpuonly -c pytorch
+ pip install torch --find-links https://download.pytorch.org/whl/cpu/torch_stable.html
pip install -r requirements-dev.txt
- make install
- name: Run linter
- shell: bash -l {0}
run: make lint
static-check:
runs-on: [ubuntu-latest]
-
steps:
- uses: actions/checkout@v2
- - name: Setup conda dependencies
- uses: conda-incubator/setup-miniconda@v2
+ - name: Cache pip
+ uses: actions/cache@v2
with:
- auto-update-conda: true
- python-version: 3.7
+ path: ~/.cache/pip
+ key: ${{ runner.os }}-pip-${{ hashFiles('requirements-dev.txt') }}
+ restore-keys: ${{ runner.os }}-pip-
- name: Install dependencies
- shell: bash -l {0}
run: |
- conda install curl make -c conda-forge
- conda install pytorch cpuonly -c pytorch
+ pip install torch --find-links https://download.pytorch.org/whl/cpu/torch_stable.html
pip install -r requirements-dev.txt
- make install
- name: Run mypy
- shell: bash -l {0}
run: make mypy
doctest:
runs-on: [ubuntu-latest]
-
steps:
- uses: actions/checkout@v2
- - name: Setup conda dependencies
- uses: conda-incubator/setup-miniconda@v2
+ - name: Cache pip
+ uses: actions/cache@v2
with:
- auto-update-conda: true
- python-version: 3.7
+ path: ~/.cache/pip
+ key: ${{ runner.os }}-pip-${{ hashFiles('requirements-dev.txt') }}
+ restore-keys: ${{ runner.os }}-pip-
- name: Install dependencies
- shell: bash -l {0}
run: |
- conda install curl make -c conda-forge
- conda install pytorch cpuonly -c pytorch
+ pip install torch --find-links https://download.pytorch.org/whl/cpu/torch_stable.html
pip install -r requirements-dev.txt
- make install
- - name: Run mypy
- shell: bash -l {0}
+ - name: Run doctest
run: make doctest
diff --git a/Makefile b/Makefile
index 82da7d668..b6ed6cd2d 100644
--- a/Makefile
+++ b/Makefile
@@ -30,10 +30,10 @@ test-slow: FORCE
pytest -v --device all --dtype all -m "(jit or grad or nn)"
lint: FORCE
- pytest -v --flake8 -m flake8
+ pytest -v --numprocesses auto --flake8 kornia/ examples/ test/ # -m flake8
mypy: FORCE
- pytest -v --mypy -m mypy test/
+ pytest -v --numprocesses auto --mypy kornia/ # -m mypy
autopep8: FORCE
autopep8 --in-place --aggressive --recursive kornia/ test/ examples/
@@ -42,7 +42,7 @@ yapf: FORCE
yapf --in-place --parallel --recursive kornia/ test/ examples/
doctest:
- pytest -v --doctest-modules kornia
+ pytest -v --numprocesses auto --doctest-modules kornia/
docstyle: FORCE
pydocstyle kornia/
diff --git a/kornia/augmentation/augmentation.py b/kornia/augmentation/augmentation.py
index 0697bd68b..883c53622 100644
--- a/kornia/augmentation/augmentation.py
+++ b/kornia/augmentation/augmentation.py
@@ -1863,7 +1863,6 @@ class RandomGaussianBlur(IntensityAugmentationBase2D):
class GaussianBlur(RandomGaussianBlur):
- import warnings
warnings.warn(
"GaussianBlur is no longer maintained and will be removed from the future versions. "
"Please use RandomGaussianBlur instead.",
diff --git a/requirements-dev.txt b/requirements-dev.txt
index 2b5e3d04d..0418e660d 100644
--- a/requirements-dev.txt
+++ b/requirements-dev.txt
@@ -1,8 +1,9 @@
# test
-pytest==5.4.2
-pytest-flake8==1.0.6
-pytest-cov==2.9.0
-pytest-mypy==0.7.0
+pytest==6.2.4
+pytest-flake8==1.0.7
+pytest-cov==2.12.0
+pytest-mypy==0.8.1
+pytest-xdist==2.2.1
autopep8
pydocstyle
pre-commit>=2.0
diff --git a/setup.cfg b/setup.cfg
index a7ce95802..5006de78c 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,6 +1,16 @@
[aliases]
test=pytest
+[tool:pytest]
+norecursedirs =
+ .git
+ .github
+ dist
+ build
+addopts =
+ --strict
+ --color=yes
+
[bdist_wheel]
universal=1
diff --git a/setup.py b/setup.py
index 2c6c4637e..916a85ce0 100644
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,9 @@
# Welcome to the Kornia setup.py.
#
-
+import glob
import os
+import shutil
+
from setuptools import setup, find_packages
import subprocess
import distutils.command.clean