diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000000..c4d0ea891b --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,17 @@ +version: 2 +updates: + - package-ecosystem: "pip" + directory: "/" + schedule: + interval: "daily" + labels: + - "dependency" + open-pull-requests-limit: 10 + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + labels: + - "dependency" + open-pull-requests-limit: 10 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index fa9cbeb8d6..dc919e03c7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -8,7 +8,7 @@ on: pull_request: ~ env: - CACHE_VERSION: 0 + CACHE_VERSION: 1 DEFAULT_PYTHON: 3.6 PRE_COMMIT_CACHE: ~/.cache/pre-commit @@ -18,42 +18,31 @@ jobs: name: Prepare base dependencies runs-on: ubuntu-latest outputs: - astroid-hash: ${{ steps.fetch-astroid-hash.outputs.hash }} python-key: ${{ steps.generate-python-key.outputs.key }} pre-commit-key: ${{ steps.generate-pre-commit-key.outputs.key }} steps: - name: Check out code from GitHub - uses: actions/checkout@v2 + uses: actions/checkout@v2.3.4 - name: Set up Python ${{ env.DEFAULT_PYTHON }} id: python - uses: actions/setup-python@v2 + uses: actions/setup-python@v2.2.1 with: python-version: ${{ env.DEFAULT_PYTHON }} - - name: Fetch astroid commit hash - id: fetch-astroid-hash - run: >- - echo "::set-output name=hash::"$( - curl -s https://api.github.com/repos/PyCQA/astroid/branches/master | - grep -E '^ "sha": "(\S*)' | awk '{print substr($0, 13, 40)}') - name: Generate partial Python venv restore key id: generate-python-key run: >- echo "::set-output name=key::base-venv-${{ env.CACHE_VERSION }}-${{ hashFiles('pylint/__pkg_info__.py', 'requirements_test.txt', - 'requirements_test_pypy.txt', 'requirements_docs.txt') }}-${{ - steps.fetch-astroid-hash.outputs.hash }}" + 'requirements_test_min.txt', 'requirements_docs.txt') }}" - name: Restore Python virtual environment id: cache-venv - uses: actions/cache@v2 + uses: actions/cache@v2.1.4 with: path: venv key: >- ${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{ steps.generate-python-key.outputs.key }} restore-keys: | - ${{ runner.os }}-${{ steps.python.outputs.python-version }}-base-venv-${{ env.CACHE_VERSION }}-${{ - hashFiles('pylint/__pkg_info__.py', 'requirements_test.txt', - 'requirements_test_pypy.txt', 'requirements_docs.txt') }}- ${{ runner.os }}-${{ steps.python.outputs.python-version }}-base-venv-${{ env.CACHE_VERSION }}- - name: Create Python virtual environment if: steps.cache-venv.outputs.cache-hit != 'true' @@ -61,7 +50,6 @@ jobs: python -m venv venv . venv/bin/activate python -m pip install -U pip setuptools wheel - pip uninstall -y astroid pip install -U -r requirements_test.txt pip install -U -r requirements_docs.txt pip install -e . @@ -72,7 +60,7 @@ jobs: hashFiles('.pre-commit-config.yaml') }}" - name: Restore pre-commit environment id: cache-precommit - uses: actions/cache@v2 + uses: actions/cache@v2.1.4 with: path: ${{ env.PRE_COMMIT_CACHE }} key: >- @@ -91,15 +79,15 @@ jobs: needs: prepare-base steps: - name: Check out code from GitHub - uses: actions/checkout@v2 + uses: actions/checkout@v2.3.4 - name: Set up Python ${{ env.DEFAULT_PYTHON }} id: python - uses: actions/setup-python@v2 + uses: actions/setup-python@v2.2.1 with: python-version: ${{ env.DEFAULT_PYTHON }} - name: Restore Python virtual environment id: cache-venv - uses: actions/cache@v2 + uses: actions/cache@v2.1.4 with: path: venv key: ${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{ @@ -111,7 +99,7 @@ jobs: exit 1 - name: Restore pre-commit environment id: cache-precommit - uses: actions/cache@v2 + uses: actions/cache@v2.1.4 with: path: ${{ env.PRE_COMMIT_CACHE }} key: ${{ runner.os }}-${{ needs.prepare-base.outputs.pre-commit-key }} @@ -132,15 +120,15 @@ jobs: needs: prepare-base steps: - name: Check out code from GitHub - uses: actions/checkout@v2 + uses: actions/checkout@v2.3.4 - name: Set up Python ${{ env.DEFAULT_PYTHON }} id: python - uses: actions/setup-python@v2 + uses: actions/setup-python@v2.2.1 with: python-version: ${{ env.DEFAULT_PYTHON }} - name: Restore Python virtual environment id: cache-venv - uses: actions/cache@v2 + uses: actions/cache@v2.1.4 with: path: venv key: ${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{ @@ -161,15 +149,15 @@ jobs: needs: prepare-base steps: - name: Check out code from GitHub - uses: actions/checkout@v2 + uses: actions/checkout@v2.3.4 - name: Set up Python ${{ env.DEFAULT_PYTHON }} id: python - uses: actions/setup-python@v2 + uses: actions/setup-python@v2.2.1 with: python-version: ${{ env.DEFAULT_PYTHON }} - name: Restore Python virtual environment id: cache-venv - uses: actions/cache@v2 + uses: actions/cache@v2.1.4 with: path: venv key: ${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{ @@ -193,41 +181,30 @@ jobs: matrix: python-version: [3.6, 3.7, 3.8, 3.9] outputs: - astroid-hash: ${{ steps.fetch-astroid-hash.outputs.hash }} python-key: ${{ steps.generate-python-key.outputs.key }} steps: - name: Check out code from GitHub - uses: actions/checkout@v2 + uses: actions/checkout@v2.3.4 - name: Set up Python ${{ matrix.python-version }} id: python - uses: actions/setup-python@v2 + uses: actions/setup-python@v2.2.1 with: python-version: ${{ matrix.python-version }} - - name: Fetch astroid commit hash - id: fetch-astroid-hash - run: >- - echo "::set-output name=hash::"$( - curl -s https://api.github.com/repos/PyCQA/astroid/branches/master | - grep -E '^ "sha": "(\S*)' | awk '{print substr($0, 13, 40)}') - name: Generate partial Python venv restore key id: generate-python-key run: >- echo "::set-output name=key::venv-${{ env.CACHE_VERSION }}-${{ hashFiles('pylint/__pkg_info__.py', 'requirements_test.txt', - 'requirements_test_pypy.txt') }}-${{ - steps.fetch-astroid-hash.outputs.hash }}" + 'requirements_test_min.txt') }}" - name: Restore Python virtual environment id: cache-venv - uses: actions/cache@v2 + uses: actions/cache@v2.1.4 with: path: venv key: >- ${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{ steps.generate-python-key.outputs.key }} restore-keys: | - ${{ runner.os }}-${{ steps.python.outputs.python-version }}-venv-${{ env.CACHE_VERSION }}-${{ - hashFiles('pylint/__pkg_info__.py', 'requirements_test.txt', - 'requirements_test_pypy.txt') }}- ${{ runner.os }}-${{ steps.python.outputs.python-version }}-venv-${{ env.CACHE_VERSION }}- - name: Create Python virtual environment if: steps.cache-venv.outputs.cache-hit != 'true' @@ -235,7 +212,6 @@ jobs: python -m venv venv . venv/bin/activate python -m pip install -U pip setuptools wheel - pip uninstall -y astroid pip install -U -r requirements_test.txt pip install -e . @@ -249,15 +225,15 @@ jobs: python-version: [3.6, 3.7, 3.8, 3.9] steps: - name: Check out code from GitHub - uses: actions/checkout@v2 + uses: actions/checkout@v2.3.4 - name: Set up Python ${{ matrix.python-version }} id: python - uses: actions/setup-python@v2 + uses: actions/setup-python@v2.2.1 with: python-version: ${{ matrix.python-version }} - name: Restore Python virtual environment id: cache-venv - uses: actions/cache@v2 + uses: actions/cache@v2.1.4 with: path: venv key: ${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{ @@ -270,9 +246,9 @@ jobs: - name: Run pytest run: | . venv/bin/activate - coverage run -m pytest --benchmark-disable tests/ + pytest --benchmark-disable --cov --cov-report= tests/ - name: Upload coverage artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v2.2.2 with: name: coverage-${{ matrix.python-version }} path: .coverage @@ -288,15 +264,15 @@ jobs: COVERAGERC_FILE: .coveragerc steps: - name: Check out code from GitHub - uses: actions/checkout@v2 + uses: actions/checkout@v2.3.4 - name: Set up Python ${{ matrix.python-version }} id: python - uses: actions/setup-python@v2 + uses: actions/setup-python@v2.2.1 with: python-version: ${{ matrix.python-version }} - name: Restore Python virtual environment id: cache-venv - uses: actions/cache@v2 + uses: actions/cache@v2.1.4 with: path: venv key: ${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{ @@ -307,7 +283,7 @@ jobs: echo "Failed to restore Python venv from cache" exit 1 - name: Download all coverage artifacts - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v2.0.8 - name: Combine coverage results run: | . venv/bin/activate @@ -370,43 +346,82 @@ jobs: path: .benchmarks/ + prepare-tests-windows: + name: Prepare tests for Python ${{ matrix.python-version }} (Windows) + runs-on: windows-latest + strategy: + matrix: + python-version: [3.6, 3.7, 3.8, 3.9] + outputs: + python-key: ${{ steps.generate-python-key.outputs.key }} + steps: + - name: Check out code from GitHub + uses: actions/checkout@v2.3.4 + - name: Set up Python ${{ matrix.python-version }} + id: python + uses: actions/setup-python@v2.2.1 + with: + python-version: ${{ matrix.python-version }} + - name: Generate partial Python venv restore key + id: generate-python-key + run: >- + echo "::set-output name=key::venv-${{ env.CACHE_VERSION }}-${{ + hashFiles('pylint/__pkg_info__.py', 'requirements_test_min.txt') }}" + - name: Restore Python virtual environment + id: cache-venv + uses: actions/cache@v2.1.4 + with: + path: venv + key: >- + ${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{ + steps.generate-python-key.outputs.key }} + restore-keys: | + ${{ runner.os }}-${{ steps.python.outputs.python-version }}-venv-${{ env.CACHE_VERSION }}- + - name: Create Python virtual environment + if: steps.cache-venv.outputs.cache-hit != 'true' + run: | + python -m venv venv + . venv\\Scripts\\activate + python -m pip install -U pip setuptools wheel + pip install -U -r requirements_test_min.txt + pip install -e . + pytest-windows: name: Run tests Python ${{ matrix.python-version }} (Windows) runs-on: windows-latest + needs: prepare-tests-windows strategy: fail-fast: false matrix: - include: - - python-version: 3.6 - tox-env: py36 - - python-version: 3.7 - tox-env: py37 - - python-version: 3.8 - tox-env: py38 - - python-version: 3.9 - tox-env: py39 + python-version: [3.6, 3.7, 3.8, 3.9] steps: - name: Set temp directory run: echo "TEMP=$env:USERPROFILE\AppData\Local\Temp" >> $env:GITHUB_ENV # Workaround to set correct temp directory on Windows # https://github.com/actions/virtual-environments/issues/712 - name: Check out code from GitHub - uses: actions/checkout@v2 + uses: actions/checkout@v2.3.4 - name: Set up Python ${{ matrix.python-version }} id: python - uses: actions/setup-python@v2 + uses: actions/setup-python@v2.2.1 with: python-version: ${{ matrix.python-version }} - - name: Create Python virtual environment + - name: Restore Python virtual environment + id: cache-venv + uses: actions/cache@v2.1.4 + with: + path: venv + key: ${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{ + needs.prepare-tests-windows.outputs.python-key }} + - name: Fail job if Python cache restore failed + if: steps.cache-venv.outputs.cache-hit != 'true' run: | - python -m venv venv - . venv\\Scripts\\activate - python -m pip install -U pip setuptools wheel - pip install tox - - name: Run tox + echo "Failed to restore Python venv from cache" + exit 1 + - name: Run pytest run: | . venv\\Scripts\\activate - tox -e ${{ matrix.tox-env }} + pytest --benchmark-disable tests/ prepare-tests-pypy: @@ -416,39 +431,29 @@ jobs: matrix: python-version: ["pypy3"] outputs: - astroid-hash: ${{ steps.fetch-astroid-hash.outputs.hash }} python-key: ${{ steps.generate-python-key.outputs.key }} steps: - name: Check out code from GitHub - uses: actions/checkout@v2 + uses: actions/checkout@v2.3.4 - name: Set up Python ${{ matrix.python-version }} id: python - uses: actions/setup-python@v2 + uses: actions/setup-python@v2.2.1 with: python-version: ${{ matrix.python-version }} - - name: Fetch astroid commit hash - id: fetch-astroid-hash - run: >- - echo "::set-output name=hash::"$( - curl -s https://api.github.com/repos/PyCQA/astroid/branches/master | - grep -E '^ "sha": "(\S*)' | awk '{print substr($0, 13, 40)}') - name: Generate partial Python venv restore key id: generate-python-key run: >- echo "::set-output name=key::venv-${{ env.CACHE_VERSION }}-${{ - hashFiles('pylint/__pkg_info__.py', 'requirements_test_pypy.txt') }}-${{ - steps.fetch-astroid-hash.outputs.hash }}" + hashFiles('pylint/__pkg_info__.py', 'requirements_test_min.txt') }}" - name: Restore Python virtual environment id: cache-venv - uses: actions/cache@v2 + uses: actions/cache@v2.1.4 with: path: venv key: >- ${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{ steps.generate-python-key.outputs.key }} restore-keys: | - ${{ runner.os }}-${{ steps.python.outputs.python-version }}-venv-${{ env.CACHE_VERSION }}-${{ - hashFiles('pylint/__pkg_info__.py', 'requirements_test_pypy.txt') }}- ${{ runner.os }}-${{ steps.python.outputs.python-version }}-venv-${{ env.CACHE_VERSION }}- - name: Create Python virtual environment if: steps.cache-venv.outputs.cache-hit != 'true' @@ -456,8 +461,7 @@ jobs: python -m venv venv . venv/bin/activate python -m pip install -U pip setuptools wheel - pip uninstall -y astroid - pip install -U -r requirements_test_pypy.txt + pip install -U -r requirements_test_min.txt pip install -e . pytest-pypy: @@ -470,15 +474,15 @@ jobs: python-version: ["pypy3"] steps: - name: Check out code from GitHub - uses: actions/checkout@v2 + uses: actions/checkout@v2.3.4 - name: Set up Python ${{ matrix.python-version }} id: python - uses: actions/setup-python@v2 + uses: actions/setup-python@v2.2.1 with: python-version: ${{ matrix.python-version }} - name: Restore Python virtual environment id: cache-venv - uses: actions/cache@v2 + uses: actions/cache@v2.1.4 with: path: venv key: ${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 298a4b5a01..c840044b99 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -47,7 +47,7 @@ repos: types: [python] exclude: tests/functional/|tests/input|tests/extensions/data|tests/regrtest_data/|tests/data/|doc/ - repo: https://github.com/pre-commit/mirrors-mypy - rev: v0.800 + rev: v0.812 hooks: - id: mypy name: mypy diff --git a/ChangeLog b/ChangeLog index df57bcf571..a74175e6f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,9 @@ What's New in Pylint 2.8.0? .. Put new features here +* Workflow and packaging improvements + + What's New in Pylint 2.7.2? =========================== .. diff --git a/README.rst b/README.rst index 1ce0700e64..115a852dfb 100644 --- a/README.rst +++ b/README.rst @@ -2,12 +2,8 @@ README for Pylint - https://pylint.pycqa.org/ ============================================= -.. image:: https://travis-ci.org/PyCQA/pylint.svg?branch=master - :target: https://travis-ci.org/PyCQA/pylint - -.. image:: https://ci.appveyor.com/api/projects/status/rbvwhakyj1y09atb/branch/master?svg=true - :alt: AppVeyor Build Status - :target: https://ci.appveyor.com/project/PCManticore/pylint +.. image:: https://github.com/PyCQA/pylint/actions/workflows/ci.yaml/badge.svg?branch=master + :target: https://github.com/PyCQA/pylint/actions .. image:: https://coveralls.io/repos/github/PyCQA/pylint/badge.svg?branch=master :target: https://coveralls.io/github/PyCQA/pylint?branch=master diff --git a/pylint/__pkginfo__.py b/pylint/__pkginfo__.py index 5d78adfea2..a4f8d4e19f 100644 --- a/pylint/__pkginfo__.py +++ b/pylint/__pkginfo__.py @@ -50,9 +50,9 @@ extras_require = {} extras_require[':sys_platform=="win32"'] = ["colorama"] -extras_require["docs"] = ["sphinx~=3.2", "python-docs-theme"] +extras_require["docs"] = ["sphinx==3.5.1", "python-docs-theme==2020.12"] -license = "GPL" +license = "GPL-2.0-or-later" description = "python code static checker" web = "https://github.com/PyCQA/pylint" mailinglist = "mailto:code-quality@python.org" diff --git a/requirements_docs.txt b/requirements_docs.txt index 10783d349a..a299f539fe 100644 --- a/requirements_docs.txt +++ b/requirements_docs.txt @@ -1,2 +1,2 @@ -sphinx~=3.2 -python-docs-theme +Sphinx==3.5.1 +python-docs-theme==2020.12 diff --git a/requirements_test.txt b/requirements_test.txt index c2bc9cecae..f30968e9b2 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -1,4 +1,9 @@ -r requirements_test_pre_commit.txt --r requirements_test_pypy.txt -pre-commit -pyenchant +-r requirements_test_min.txt +coveralls==3.0.0 +coverage==5.4.0 +pre-commit==2.10.1 +pyenchant==3.2.0 +pytest-cov==2.11.1 +pytest-profiling==1.7.0 +pytest-xdist==2.2.1 diff --git a/requirements_test_min.txt b/requirements_test_min.txt new file mode 100644 index 0000000000..3370e8c4c4 --- /dev/null +++ b/requirements_test_min.txt @@ -0,0 +1,3 @@ +astroid==2.5.0 +pytest==6.2.2 +pytest-benchmark==3.2.3 diff --git a/requirements_test_pre_commit.txt b/requirements_test_pre_commit.txt index 1399e7d93b..1acddec25d 100644 --- a/requirements_test_pre_commit.txt +++ b/requirements_test_pre_commit.txt @@ -2,4 +2,4 @@ autoflake==1.4 black==20.8b1 flake8==3.8.4 isort==5.7.0 -mypy==0.800 +mypy==0.812 diff --git a/requirements_test_pypy.txt b/requirements_test_pypy.txt deleted file mode 100644 index b64d5cdf96..0000000000 --- a/requirements_test_pypy.txt +++ /dev/null @@ -1,7 +0,0 @@ -astroid @ git+git://github.com/PyCQA/astroid.git@astroid-2.5 -coveralls -coverage<5.0 -pytest -pytest-xdist -pytest-benchmark -pytest-profiling diff --git a/tests/regrtest_data/duplicate_data_raw_strings/__init__.py b/tests/regrtest_data/duplicate_data_raw_strings/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/test_self.py b/tests/test_self.py index 27bb342abe..5dad21948c 100644 --- a/tests/test_self.py +++ b/tests/test_self.py @@ -54,7 +54,7 @@ from pylint.utils import utils HERE = abspath(dirname(__file__)) -CLEAN_PATH = re.escape(dirname(dirname(__file__)) + "/") +CLEAN_PATH = re.escape(dirname(dirname(__file__)) + os.path.sep) @contextlib.contextmanager @@ -144,7 +144,8 @@ def _run_pylint(args, out, reporter=None): @staticmethod def _clean_paths(output): """Normalize path to the tests directory.""" - return re.sub(CLEAN_PATH, "", output.replace("\\", "/"), flags=re.MULTILINE) + output = re.sub(CLEAN_PATH, "", output, flags=re.MULTILINE) + return output.replace("\\", "/") def _test_output(self, args, expected_output): out = StringIO() diff --git a/tox.ini b/tox.ini index 390e11b9dc..69a1c5d74d 100644 --- a/tox.ini +++ b/tox.ini @@ -6,8 +6,7 @@ skip_missing_interpreters = true [testenv:pylint] deps = - git+https://github.com/pycqa/astroid@master - pytest + -r {toxinidir}/requirements_test_min.txt commands = # This would be greatly simplified by a solution for https://github.com/PyCQA/pylint/issues/352 pylint -rn --rcfile={toxinidir}/pylintrc --load-plugins=pylint.extensions.docparams, pylint.extensions.mccabe \ @@ -38,127 +37,79 @@ commands = [testenv:formatting] basepython = python3 deps = - pre-commit - sphinx - pytest + -r {toxinidir}/requirements_test_min.txt + pre-commit==2.10.1 commands = pre-commit run --all-files -changedir = {toxinidir} [testenv:mypy] basepython = python3 deps = - pre-commit + pre-commit==2.10.1 commands = pre-commit run mypy --all-files [testenv] -deps = - https://github.com/PyCQA/astroid/tarball/master#egg=astroid - coverage<5.0 - mccabe - isort - pytest - pytest-xdist - pytest-benchmark - pytest-profiling setenv = COVERAGE_FILE = {toxinidir}/.coverage.{envname} +deps = + -r {toxinidir}/requirements_test.txt commands = ; Run tests, ensuring all benchmark tests do not run - python -Wignore -m coverage run -m pytest --benchmark-disable {toxinidir}/tests/ {posargs:} - - ; Transform absolute path to relative path - ; for compatibility with coveralls.io and fix 'source not available' error. - ; If you can find a cleaner way is welcome - python -c "import os;cov_strip_abspath = open(os.environ['COVERAGE_FILE'], 'r').read().replace('.tox' + os.sep + os.path.relpath('{envsitepackagesdir}', '{toxworkdir}') + os.sep, '');open(os.environ['COVERAGE_FILE'], 'w').write(cov_strip_abspath)" -changedir = {toxworkdir} + pytest --benchmark-disable {toxinidir}/tests/ {posargs:} [testenv:spelling] deps = - https://github.com/PyCQA/astroid/tarball/master#egg=astroid - pytest - pytest-xdist - pyenchant -commands = - python -Wi -m pytest {toxinidir}/tests/ {posargs:} -k unittest_spelling -changedir = {toxworkdir} - - -[testenv:coveralls] -setenv = - COVERAGE_FILE = {toxinidir}/.coverage -passenv = - * -deps = - coverage<5.0 - coveralls -skip_install = true + -r {toxinidir}/requirements_test.txt commands = - python -m coverage combine - python -m coverage report --rcfile={toxinidir}/.coveragerc -m - - coveralls --rcfile={toxinidir}/.coveragerc -changedir = {toxinidir} + pytest {toxinidir}/tests/ {posargs:} -k unittest_spelling [testenv:coverage-html] setenv = COVERAGE_FILE = {toxinidir}/.coverage deps = - coverage<5 + -r {toxinidir}/requirements_test.txt skip_install = true commands = - python -m coverage combine - python -m coverage html --ignore-errors --rcfile={toxinidir}/.coveragerc -changedir = {toxinidir} + coverage combine + coverage html --ignore-errors --rcfile={toxinidir}/.coveragerc [testenv:docs] -usedevelop = True changedir = doc/ -extras = - docs +deps = + -r {toxinidir}/requirements_docs.txt +skip_install = true commands = - sphinx-build -W -b html -d _build/doctrees . _build/html + sphinx-build -W -b html -d _build/doctrees . _build/html [testenv:benchmark] deps = - https://github.com/PyCQA/astroid/tarball/master#egg=astroid - coverage<5.0 - mccabe - pytest - pytest-xdist - pygal - pytest-benchmark + -r {toxinidir}/requirements_test.txt + pygal commands = ; Run the only the benchmark tests, grouping output and forcing .json output so we ; can compare benchmark runs - python -Wi -m pytest --exitfirst \ - --failed-first \ - --benchmark-only \ - --benchmark-save=batch_files \ - --benchmark-save-data \ - --benchmark-autosave \ - {toxinidir}/tests \ - --benchmark-group-by="group" \ - {posargs:} + pytest --exitfirst \ + --failed-first \ + --benchmark-only \ + --benchmark-save=batch_files \ + --benchmark-save-data \ + --benchmark-autosave {toxinidir}/tests \ + --benchmark-group-by="group" \ + {posargs:} [testenv:profile_against_external] +setenv = + PYTEST_PROFILE_EXTERNAL = 1 deps = - https://github.com/PyCQA/astroid/tarball/master#egg=astroid + -r {toxinidir}/requirements_test.txt gprof2dot - mccabe - pytest - pytest-profiling - pytest-xdist -setenv = - PYTEST_PROFILE_EXTERNAL = 1 commands = - python -Wi -m pytest --exitfirst \ - --profile-svg \ - {toxinidir}/tests/profile/test_profile_against_externals.py -changedir = {toxworkdir} + pytest --exitfirst \ + --profile-svg {toxinidir}/tests/profile/test_profile_against_externals.py