Skip to content

Commit

Permalink
Some skel updates. Added precommit.
Browse files Browse the repository at this point in the history
  • Loading branch information
ionelmc committed Aug 2, 2020
1 parent 5ffc230 commit c4b0722
Show file tree
Hide file tree
Showing 17 changed files with 213 additions and 62 deletions.
78 changes: 78 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
version: '{branch}-{build}'
build: off
environment:
matrix:
- TOXENV: check
TOXPYTHON: C:\Python36\python.exe
PYTHON_HOME: C:\Python36
PYTHON_VERSION: '3.6'
PYTHON_ARCH: '32'
- TOXENV: py27
TOXPYTHON: C:\Python27\python.exe
PYTHON_HOME: C:\Python27
PYTHON_VERSION: '2.7'
PYTHON_ARCH: '32'
- TOXENV: py27
TOXPYTHON: C:\Python27-x64\python.exe
PYTHON_HOME: C:\Python27-x64
PYTHON_VERSION: '2.7'
PYTHON_ARCH: '64'
WINDOWS_SDK_VERSION: v7.0
- TOXENV: py35
TOXPYTHON: C:\Python35\python.exe
PYTHON_HOME: C:\Python35
PYTHON_VERSION: '3.5'
PYTHON_ARCH: '32'
- TOXENV: py35
TOXPYTHON: C:\Python35-x64\python.exe
PYTHON_HOME: C:\Python35-x64
PYTHON_VERSION: '3.5'
PYTHON_ARCH: '64'
- TOXENV: py36
TOXPYTHON: C:\Python36\python.exe
PYTHON_HOME: C:\Python36
PYTHON_VERSION: '3.6'
PYTHON_ARCH: '32'
- TOXENV: py36
TOXPYTHON: C:\Python36-x64\python.exe
PYTHON_HOME: C:\Python36-x64
PYTHON_VERSION: '3.6'
PYTHON_ARCH: '64'
- TOXENV: py37
TOXPYTHON: C:\Python37\python.exe
PYTHON_HOME: C:\Python37
PYTHON_VERSION: '3.7'
PYTHON_ARCH: '32'
- TOXENV: py37
TOXPYTHON: C:\Python37-x64\python.exe
PYTHON_HOME: C:\Python37-x64
PYTHON_VERSION: '3.7'
PYTHON_ARCH: '64'
- TOXENV: py38
TOXPYTHON: C:\Python38\python.exe
PYTHON_HOME: C:\Python38
PYTHON_VERSION: '3.8'
PYTHON_ARCH: '32'
- TOXENV: py38
TOXPYTHON: C:\Python38-x64\python.exe
PYTHON_HOME: C:\Python38-x64
PYTHON_VERSION: '3.8'
PYTHON_ARCH: '64'
init:
- ps: echo $env:TOXENV
- ps: ls C:\Python*
install:
- '%PYTHON_HOME%\python -mpip install --progress-bar=off tox -rci/requirements.txt'
- '%PYTHON_HOME%\Scripts\virtualenv --version'
- '%PYTHON_HOME%\Scripts\easy_install --version'
- '%PYTHON_HOME%\Scripts\pip --version'
- '%PYTHON_HOME%\Scripts\tox --version'
test_script:
- cmd /E:ON /V:ON /C .\ci\appveyor-with-compiler.cmd %PYTHON_HOME%\Scripts\tox
on_failure:
- ps: dir "env:"
- ps: get-content .tox\*\log\*

### To enable remote debugging uncomment this (also, see: http://www.appveyor.com/docs/how-to/rdp-to-build-worker):
# on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
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
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: '^(.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: .
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
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: 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
2 changes: 1 addition & 1 deletion ci/templates/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,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
Loading

0 comments on commit c4b0722

Please sign in to comment.