Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Precommit and some dep updates #420

Merged
merged 5 commits into from
Aug 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions appveyor.yml → .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# NOTE: this file is auto-generated via ci/bootstrap.py (ci/templates/appveyor.yml).
# NOTE: this file is auto-generated via ci/bootstrap.py (ci/templates/.appveyor.yml).
version: '{branch}-{build}'
build: off
environment:
matrix:
- TOXENV: check
- TOXENV: 'py27-pytest46-xdist27-coverage45,py27-pytest46-xdist27-coverage52'
- TOXENV: 'py35-pytest46-xdist27-coverage45,py35-pytest46-xdist27-coverage52'
- TOXENV: 'py36-pytest46-xdist27-coverage45,py36-pytest46-xdist27-coverage52,py36-pytest46-xdist33-coverage45,py36-pytest46-xdist33-coverage52,py36-pytest54-xdist33-coverage45,py36-pytest54-xdist33-coverage52,py36-pytest60-xdist33-coverage52'
- TOXENV: 'py37-pytest46-xdist27-coverage45,py37-pytest46-xdist27-coverage52,py37-pytest46-xdist33-coverage45,py37-pytest46-xdist33-coverage52,py37-pytest54-xdist33-coverage45,py37-pytest54-xdist33-coverage52,py37-pytest60-xdist33-coverage52'
- TOXENV: 'py36-pytest46-xdist27-coverage45,py36-pytest46-xdist27-coverage52,py36-pytest46-xdist33-coverage45,py36-pytest46-xdist33-coverage52,py36-pytest54-xdist33-coverage45,py36-pytest54-xdist33-coverage52,py36-pytest60-xdistd34-coverage52'
- TOXENV: 'py37-pytest46-xdist27-coverage45,py37-pytest46-xdist27-coverage52,py37-pytest46-xdist33-coverage45,py37-pytest46-xdist33-coverage52,py37-pytest54-xdist33-coverage45,py37-pytest54-xdist33-coverage52,py37-pytest60-xdistd34-coverage52'
- TOXENV: 'pypy-pytest46-xdist27-coverage45,pypy-pytest46-xdist27-coverage52'

init:
Expand All @@ -17,11 +17,10 @@ install:
- IF "%TOXENV:~0,5%" == "pypy-" choco install --no-progress python.pypy
- IF "%TOXENV:~0,6%" == "pypy3-" choco install --no-progress pypy3
- SET PATH=C:\tools\pypy\pypy;%PATH%
- C:\Python37\python -m pip install -U "virtualenv>=16.5.0"
- C:\Python37\python -m pip install tox
- C:\Python37\python -m pip install --progress-bar=off tox -rci/requirements.txt

test_script:
- C:\Python37\python -m tox
- cmd /E:ON /V:ON /C .\ci\appveyor-with-compiler.cmd C:\Python37\python -m tox

on_failure:
- ps: dir "env:"
Expand Down
9 changes: 8 additions & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@ commit = True
tag = True

[bumpversion:file:setup.py]
search = version='{current_version}'
replace = version='{new_version}'

[bumpversion:file:README.rst]
search = v{current_version}.
replace = v{new_version}.

[bumpversion:file:docs/conf.py]
search = version = release = '{current_version}'
replace = version = release = '{new_version}'

[bumpversion:file:src/pytest_cov/__init__.py]

search = __version__ = '{current_version}'
replace = __version__ = '{new_version}'
68 changes: 44 additions & 24 deletions .cookiecutterrc
Original file line number Diff line number Diff line change
@@ -1,36 +1,56 @@
# Generated by cookiepatcher, a small shim around cookiecutter (pip install cookiepatcher)

cookiecutter:
appveyor: 'yes'
c_extension_cython: 'no'
c_extension_optional: 'no'
c_extension_support: 'no'
codacy: 'yes'
codeclimate: 'yes'
codecov: 'no'
command_line_interface: 'no'
command_line_interface_bin_name: pytest-cov
coveralls: 'no'
_extensions:
- jinja2_time.TimeExtension
_template: /home/ionel/open-source/cookiecutter-pylibrary
allow_tests_inside_package: no
appveyor: yes
c_extension_function: '-'
c_extension_module: '-'
c_extension_optional: no
c_extension_support: no
c_extension_test_pypi: no
c_extension_test_pypi_username: '-'
codacy: no
codacy_projectid: '[Get ID from https://app.codacy.com/app/ionelmc/pytest-cov/settings]'
codeclimate: no
codecov: no
command_line_interface: no
command_line_interface_bin_name: '-'
coveralls: no
coveralls_token: '[Required for Appveyor, take it from https://coveralls.io/github/ionelmc/pytest-cov]'
distribution_name: pytest-cov
email: contact@ionelmc.ro
full_name: Ionel Cristian Mărieș
github_username: pytest-dev
landscape: 'yes'
landscape: no
license: MIT license
linter: flake8
package_name: pytest_cov
pre_commit: yes
project_name: pytest-cov
project_short_description: This plugin produces coverage reports. It supports
centralised testing and distributed testing in both load and each modes. It
also supports coverage of subprocesses.
release_date: '2016-10-10'
project_short_description: This plugin produces coverage reports. It supports centralised testing and distributed testing in both load and each modes. It also supports coverage of subprocesses.
pypi_badge: yes
pypi_disable_upload: no
release_date: '2020-06-12'
repo_hosting: github.com
repo_hosting_domain: github.com
repo_name: pytest-cov
requiresio: 'yes'
scrutinizer: 'yes'
sphinx_doctest: 'no'
repo_username: pytest-dev
requiresio: yes
scrutinizer: no
setup_py_uses_setuptools_scm: no
setup_py_uses_test_runner: no
sphinx_docs: yes
sphinx_docs_hosting: https://pytest-cov.readthedocs.io/
sphinx_doctest: no
sphinx_theme: sphinx-py3doc-enhanced-theme
test_matrix_configurator: 'no'
test_matrix_separate_coverage: 'no'
test_matrix_configurator: no
test_matrix_separate_coverage: no
test_runner: pytest
travis: 'yes'
version: 2.4.0
travis: yes
travis_osx: no
version: 2.10.0
website: http://blog.ionelmc.ro
year: now
year_from: '2010'
year_to: '2020'
12 changes: 0 additions & 12 deletions .coveragerc

This file was deleted.

5 changes: 4 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# see http://editorconfig.org
# see https://editorconfig.org/
root = true

[*]
Expand All @@ -11,3 +11,6 @@ charset = utf-8

[*.{bat,cmd,ps1}]
end_of_line = crlf

[*.{yml,yaml}]
indent_size = 2
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,3 @@ If you paste raw code make sure you quote it, eg:
def foobar():
pass
```

7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.py[cod]
__pycache__

# C extensions
*.so
Expand All @@ -21,6 +22,7 @@ lib
lib64
venv*/
pyvenv*/
pip-wheel-metadata/

# Installer logs
pip-log.txt
Expand All @@ -29,6 +31,7 @@ pip-log.txt
.coverage
.tox
.coverage.*
.pytest_cache/
nosetests.xml
coverage.xml
htmlcov
Expand Down Expand Up @@ -59,6 +62,10 @@ docs/_build
.env
.cache
.pytest
.benchmarks
.bootstrap
.appveyor.token
*.bak

# Mypy Cache
.mypy_cache/
20 changes: 20 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# To install the git pre-commit hook run:
# pre-commit install
# To update the pre-commit hooks run:
# pre-commit install-hooks
exclude: '^(src/.*\.pth|\.tox|ci/templates|\.bumpversion\.cfg)(/|$)'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: master
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: debug-statements
- repo: https://github.com/timothycrosley/isort
rev: master
hooks:
- id: isort
- repo: https://gitlab.com/pycqa/flake8
rev: master
hooks:
- id: flake8
2 changes: 2 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ python:
version: 3
install:
- requirements: docs/requirements.txt
- method: pip
path: .
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ jobs:
python: 'pypy3'
- env: TOXENV=pypy3-pytest54-xdist33-coverage52
python: 'pypy3'
- env: TOXENV=py36-pytest60-xdist33-coverage52
- env: TOXENV=py36-pytest60-xdistd34-coverage52
python: '3.6'
- env: TOXENV=py37-pytest60-xdist33-coverage52
- env: TOXENV=py37-pytest60-xdistd34-coverage52
python: '3.7'
- env: TOXENV=py38-pytest60-xdist33-coverage52
- env: TOXENV=py38-pytest60-xdistd34-coverage52
python: '3.8'
- env: TOXENV=pypy3-pytest60-xdist33-coverage52
- env: TOXENV=pypy3-pytest60-xdistd34-coverage52
python: 'pypy3'

- stage: examples
Expand All @@ -99,7 +99,7 @@ before_install:
- uname -a
- lsb_release -a
install:
- pip install tox
- python -mpip install --progress-bar=off tox -rci/requirements.txt
- virtualenv --version
- easy_install --version
- pip --version
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ To set up `pytest-cov` for local development:
(look for the "Fork" button).
2. Clone your fork locally::

git clone git@github.com:your_name_here/pytest-cov.git
git clone git@github.com:YOURGITHUBNAME/pytest-cov.git

3. Create a branch for local development::

git checkout -b name-of-your-bugfix-or-feature

Now you can make your changes locally.

4. When you're done making changes, run all the checks, doc builder and spell checker with `tox <http://tox.readthedocs.io/en/latest/install.html>`_ one command::
4. When you're done making changes run all the checks and docs builder with `tox <https://tox.readthedocs.io/en/latest/install.html>`_ one command::

tox

Expand Down
7 changes: 2 additions & 5 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,13 @@ include .bumpversion.cfg
include .coveragerc
include .cookiecutterrc
include .editorconfig
include .isort.cfg
include .pylintrc
include .readthedocs.yml

include AUTHORS.rst
include CHANGELOG.rst
include CONTRIBUTING.rst
include LICENSE
include README.rst

include tox.ini .travis.yml appveyor.yml
include tox.ini .travis.yml .appveyor.yml .readthedocs.yml .pre-commit-config.yaml

global-exclude *.py[cod] __pycache__ *.so .coverage
global-exclude *.py[cod] __pycache__/* *.so *.dylib .coverage .coverage.*
10 changes: 5 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Overview
:target: https://readthedocs.org/projects/pytest-cov
:alt: Documentation Status

.. |travis| image:: https://travis-ci.org/pytest-dev/pytest-cov.svg?branch=master
.. |travis| image:: https://api.travis-ci.org/pytest-dev/pytest-cov.svg?branch=master
:alt: Travis-CI Build Status
:target: https://travis-ci.org/pytest-dev/pytest-cov

Expand All @@ -33,7 +33,7 @@ Overview

.. |version| image:: https://img.shields.io/pypi/v/pytest-cov.svg
:alt: PyPI Package latest release
:target: https://pypi.python.org/pypi/pytest-cov
:target: https://pypi.org/project/pytest-cov

.. |conda-forge| image:: https://img.shields.io/conda/vn/conda-forge/pytest-cov.svg
:target: https://anaconda.org/conda-forge/pytest-cov
Expand All @@ -44,15 +44,15 @@ Overview

.. |wheel| image:: https://img.shields.io/pypi/wheel/pytest-cov.svg
:alt: PyPI Wheel
:target: https://pypi.python.org/pypi/pytest-cov
:target: https://pypi.org/project/pytest-cov

.. |supported-versions| image:: https://img.shields.io/pypi/pyversions/pytest-cov.svg
:alt: Supported versions
:target: https://pypi.python.org/pypi/pytest-cov
:target: https://pypi.org/project/pytest-cov

.. |supported-implementations| image:: https://img.shields.io/pypi/implementation/pytest-cov.svg
:alt: Supported implementations
:target: https://pypi.python.org/pypi/pytest-cov
:target: https://pypi.org/project/pytest-cov

.. end-badges

Expand Down
23 changes: 23 additions & 0 deletions ci/appveyor-with-compiler.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
:: Very simple setup:
:: - if WINDOWS_SDK_VERSION is set then activate the SDK.
:: - disable the WDK if it's around.

SET COMMAND_TO_RUN=%*
SET WIN_SDK_ROOT=C:\Program Files\Microsoft SDKs\Windows
SET WIN_WDK="c:\Program Files (x86)\Windows Kits\10\Include\wdf"
ECHO SDK: %WINDOWS_SDK_VERSION% ARCH: %PYTHON_ARCH%

IF EXIST %WIN_WDK% (
REM See: https://connect.microsoft.com/VisualStudio/feedback/details/1610302/
REN %WIN_WDK% 0wdf
)
IF "%WINDOWS_SDK_VERSION%"=="" GOTO main

SET DISTUTILS_USE_SDK=1
SET MSSdk=1
"%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WINDOWS_SDK_VERSION%
CALL "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release

:main
ECHO Executing: %COMMAND_TO_RUN%
CALL %COMMAND_TO_RUN% || EXIT 1
4 changes: 3 additions & 1 deletion ci/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def check_call(args):
print("+", *args)
subprocess.check_call(args)


def exec_in_env():
env_path = join(base_path, ".tox", "bootstrap")
if sys.platform == "win32":
Expand Down Expand Up @@ -47,6 +48,7 @@ def exec_in_env():
print("+ exec", python_executable, __file__, "--no-env")
os.execv(python_executable, [python_executable, __file__, "--no-env"])


def main():
import jinja2

Expand Down Expand Up @@ -79,6 +81,7 @@ def main():
print("Wrote {}".format(name))
print("DONE.")


if __name__ == "__main__":
args = sys.argv[1:]
if args == ["--no-env"]:
Expand All @@ -88,4 +91,3 @@ def main():
else:
print("Unexpected arguments {0}".format(args), file=sys.stderr)
sys.exit(1)

4 changes: 4 additions & 0 deletions ci/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
virtualenv>=16.6.0
pip>=19.1.1
setuptools>=18.0.1
six>=1.14.0
5 changes: 2 additions & 3 deletions ci/templates/appveyor.yml → ci/templates/.appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ install:
- IF "%TOXENV:~0,5%" == "pypy-" choco install --no-progress python.pypy
- IF "%TOXENV:~0,6%" == "pypy3-" choco install --no-progress pypy3
- SET PATH=C:\tools\pypy\pypy;%PATH%
- C:\Python37\python -m pip install -U "virtualenv>=16.5.0"
- C:\Python37\python -m pip install tox
- C:\Python37\python -m pip install --progress-bar=off tox -rci/requirements.txt

test_script:
- C:\Python37\python -m tox
- cmd /E:ON /V:ON /C .\ci\appveyor-with-compiler.cmd C:\Python37\python -m tox

on_failure:
- ps: dir "env:"
Expand Down
Loading