diff --git a/.github/workflows/continuous-integration-conda.yml b/.github/workflows/continuous-integration-conda.yml index 8c977d0dd..14e33af8d 100644 --- a/.github/workflows/continuous-integration-conda.yml +++ b/.github/workflows/continuous-integration-conda.yml @@ -58,10 +58,9 @@ jobs: $ErrorActionPreference='silentlycontinue' # Install mock on Python 2.7 conda install mock --freeze-installed - # install black if available (Python 3.6 and above), and autopep8 for testing the pipe mode + # install black, isort if available (Python 3.6 and above), and autopep8 for testing the pipe mode conda install black --freeze-installed - # install isort from source - pip install git+https://github.com/timothycrosley/isort.git + conda install isort>=5.3.0 --freeze-installed conda install autopep8 --freeze-installed # install sphinx_gallery and matplotlib if available conda install sphinx-gallery --freeze-installed diff --git a/.github/workflows/continuous-integration-pip.yml b/.github/workflows/continuous-integration-pip.yml index 29ff50bf5..7687629ff 100644 --- a/.github/workflows/continuous-integration-pip.yml +++ b/.github/workflows/continuous-integration-pip.yml @@ -19,8 +19,9 @@ jobs: python -m pip install --upgrade pip pip install -r requirements.txt pip install -r requirements-dev.txt - # install black if available (Python 3.6 and above), and autopep8 for testing the pipe mode + # install black, isort if available (Python 3.6 and above), and autopep8 for testing the pipe mode pip install black || true + pip install isort>=5.3.0 || true pip install autopep8 || true # install sphinx_gallery and matplotlib if available (may not work on pypy) pip install sphinx_gallery || true diff --git a/requirements-dev.txt b/requirements-dev.txt index 6a861c886..49832db4b 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -10,3 +10,5 @@ toml # Python 2 pathlib + +#isort>=5.3.0 #Python 3.6 and above diff --git a/tests/utils.py b/tests/utils.py index b1f7b7994..7471808fc 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -27,7 +27,10 @@ def tool_version(tool): not tool_version("jupytext"), reason="jupytext is not installed" ) requires_black = pytest.mark.skipif(not tool_version("black"), reason="black not found") -requires_isort = pytest.mark.skipif(not tool_version("isort"), reason="isort not found") +requires_isort = pytest.mark.skipif( + not tool_version("isort") or tool_version("isort") <= "5.3.0", + reason="isort not found", +) requires_flake8 = pytest.mark.skipif( not tool_version("flake8"), reason="flake8 not found" )