Skip to content

Commit

Permalink
Complete project structure.
Browse files Browse the repository at this point in the history
  • Loading branch information
ionelmc committed Jul 4, 2015
1 parent ebc6a99 commit ecdf3bf
Show file tree
Hide file tree
Showing 31 changed files with 1,013 additions and 45 deletions.
12 changes: 12 additions & 0 deletions .coveragerc
@@ -0,0 +1,12 @@
[paths]
source = src

[run]
branch = True
source = src
parallel = true

[report]
show_missing = true
precision = 2
omit = *migrations*
58 changes: 55 additions & 3 deletions .gitignore
@@ -1,5 +1,57 @@
.tox/
*.egg-info/
*.py[cod]

# C extensions
*.so

# Packages
*.egg
*.egg-info
dist
build
eggs
parts
bin
var
sdist
develop-eggs
.installed.cfg
lib
lib64
venv*/
pyvenv*/

# Installer logs
pip-log.txt

# Unit test / coverage reports
.coverage
.tox
.coverage.*
*.pyc
nosetests.xml
htmlcov

# Translations
*.mo

# Mr Developer
.mr.developer.cfg
.project
.pydevproject
.idea
*.iml
*.komodoproject

# Complexity
output/*.html
output/*/index.html

# Sphinx
docs/_build

.DS_Store
*~
.*.sw[po]
.build
.ve
.bootstrap
*.bak
60 changes: 24 additions & 36 deletions .travis.yml
@@ -1,45 +1,33 @@
language: python

python: 2.7

env:
- CWD=. TOX_ENV=flake8

- CWD=pytest-cov TOX_ENV=pypy COV_CORE_DEP=../cov-core
- CWD=pytest-cov TOX_ENV=pypy3 COV_CORE_DEP=../cov-core
- CWD=pytest-cov TOX_ENV=py26 COV_CORE_DEP=../cov-core
- CWD=pytest-cov TOX_ENV=py27 COV_CORE_DEP=../cov-core
- CWD=pytest-cov TOX_ENV=py32 COV_CORE_DEP=../cov-core
- CWD=pytest-cov TOX_ENV=py33 COV_CORE_DEP=../cov-core
- CWD=pytest-cov TOX_ENV=py34 COV_CORE_DEP=../cov-core

- CWD=pytest-cov TOX_ENV=pypy COV_CORE_DEP=cov-core
- CWD=pytest-cov TOX_ENV=pypy3 COV_CORE_DEP=cov-core
- CWD=pytest-cov TOX_ENV=py26 COV_CORE_DEP=cov-core
- CWD=pytest-cov TOX_ENV=py27 COV_CORE_DEP=cov-core
- CWD=pytest-cov TOX_ENV=py32 COV_CORE_DEP=cov-core
- CWD=pytest-cov TOX_ENV=py33 COV_CORE_DEP=cov-core
- CWD=pytest-cov TOX_ENV=py34 COV_CORE_DEP=cov-core

matrix:
allow_failures:
- env: CWD=pytest-cov TOX_ENV=pypy COV_CORE_DEP=cov-core
- env: CWD=pytest-cov TOX_ENV=pypy3 COV_CORE_DEP=cov-core
- env: CWD=pytest-cov TOX_ENV=py26 COV_CORE_DEP=cov-core
- env: CWD=pytest-cov TOX_ENV=py27 COV_CORE_DEP=cov-core
- env: CWD=pytest-cov TOX_ENV=py32 COV_CORE_DEP=cov-core
- env: CWD=pytest-cov TOX_ENV=py33 COV_CORE_DEP=cov-core
- env: CWD=pytest-cov TOX_ENV=py34 COV_CORE_DEP=cov-core

sudo: false

env:
global:
LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so
matrix:
- TOXENV=check
- TOXENV=2.6,coveralls
- TOXENV=2.6-nocover
- TOXENV=2.7,coveralls
- TOXENV=2.7-nocover
- TOXENV=3.3,coveralls
- TOXENV=3.3-nocover
- TOXENV=3.4,coveralls
- TOXENV=3.4-nocover
- TOXENV=pypy,coveralls
- TOXENV=pypy-nocover
before_install:
- python --version
- virtualenv --version
- pip --version
- uname -a
- lsb_release -a
install:
- pip install tox

script:
- cd $CWD && tox -e $TOX_ENV

- tox -v
notifications:
email:
on_success: never
on_failure: change
on_failure: always

5 changes: 5 additions & 0 deletions AUTHORS.rst
@@ -0,0 +1,5 @@

Authors
=======

* Ionel Cristian Mărieș - http://blog.ionelmc.ro
8 changes: 8 additions & 0 deletions CHANGELOG.rst
@@ -0,0 +1,8 @@

Changelog
=========

0.1.0 (2015-06-05)
-----------------------------------------

* First release on PyPI.
89 changes: 89 additions & 0 deletions CONTRIBUTING.rst
@@ -0,0 +1,89 @@
============
Contributing
============

Contributions are welcome, and they are greatly appreciated! Every
little bit helps, and credit will always be given.

Bug reports
===========

When `reporting a bug <https://github.com/ionelmc/pytest-cover/issues>`_ please include:

* Your operating system name and version.
* Any details about your local setup that might be helpful in troubleshooting.
* Detailed steps to reproduce the bug.

Documentation improvements
==========================

pytest-cover could always use more documentation, whether as part of the
official pytest-cover docs, in docstrings, or even on the web in blog posts,
articles, and such.

Feature requests and feedback
=============================

The best way to send feedback is to file an issue at https://github.com/ionelmc/pytest-cover/issues.

If you are proposing a feature:

* Explain in detail how it would work.
* Keep the scope as narrow as possible, to make it easier to implement.
* Remember that this is a volunteer-driven project, and that contributions are welcome :)

Development
===========

To set up `pytest-cover` for local development:

1. `Fork pytest-cover on GitHub <https://github.com/ionelmc/pytest-cover/fork>`_.
2. Clone your fork locally::

git clone git@github.com:your_name_here/pytest-cover.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.org/en/latest/install.html>`_ one command::

tox

5. Commit your changes and push your branch to GitHub::

git add .
git commit -m "Your detailed description of your changes."
git push origin name-of-your-bugfix-or-feature

6. Submit a pull request through the GitHub website.

Pull Request Guidelines
-----------------------

If you need some code review or feedback while you're developing the code just make the pull request.

For merging, you should:

1. Include passing tests (run ``tox``) [1]_.
2. Update documentation when there's new API, functionality etc.
3. Add a note to ``CHANGELOG.rst`` about the changes.
4. Add yourself to ``AUTHORS.rst``.

.. [1] If you don't have all the necessary python versions available locally you can rely on Travis - it will
`run the tests <https://travis-ci.org/ionelmc/pytest-cover/pull_requests>`_ for each change you add in the pull request.
It will be slower though ...
Tips
----

To run a subset of tests::

tox -e envname -- py.test -k test_myfeature

To run all the test environments in *parallel* (you need to ``pip install detox``)::

detox
19 changes: 19 additions & 0 deletions LICENSE
@@ -0,0 +1,19 @@
Copyright (c) 2015, Ionel Cristian Mărieș
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following
disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21 changes: 21 additions & 0 deletions MANIFEST.in
@@ -0,0 +1,21 @@
graft docs
graft examples
graft src
graft ci
graft tests

include *.komodoproject
include .bumpversion.cfg
include .coveragerc
include .isort.cfg
include .pylintrc

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

include tox.ini .travis.yml appveyor.yml

global-exclude *.py[cod] __pycache__ *.so
File renamed without changes.
96 changes: 96 additions & 0 deletions appveyor.yml
@@ -0,0 +1,96 @@
version: '{branch}-{build}'
build: off
environment:
global:
WITH_COMPILER: "cmd /E:ON /V:ON /C .\\ci\\appveyor-with-compiler.cmd"
matrix:
- TOXENV: check
PYTHON_HOME: "C:\\Python27"
PYTHON_VERSION: "2.7"
PYTHON_ARCH: "32"
- TOXENV: "2.7"
TOXPYTHON: "C:\\Python27\\python.exe"
WINDOWS_SDK_VERSION: "v7.0"
PYTHON_HOME: "C:\\Python27"
PYTHON_VERSION: "2.7"
PYTHON_ARCH: "32"
- TOXENV: "2.7"
TOXPYTHON: "C:\\Python27-x64\\python.exe"
WINDOWS_SDK_VERSION: "v7.0"
PYTHON_HOME: "C:\\Python27-x64"
PYTHON_VERSION: "2.7"
PYTHON_ARCH: "64"
- TOXENV: "2.7-nocover"
TOXPYTHON: "C:\\Python27\\python.exe"
WINDOWS_SDK_VERSION: "v7.0"
PYTHON_HOME: "C:\\Python27"
PYTHON_VERSION: "2.7"
PYTHON_ARCH: "32"
- TOXENV: "2.7-nocover"
TOXPYTHON: "C:\\Python27-x64\\python.exe"
WINDOWS_SDK_VERSION: "v7.0"
PYTHON_HOME: "C:\\Python27-x64"
PYTHON_VERSION: "2.7"
PYTHON_ARCH: "64"
- TOXENV: "3.3"
TOXPYTHON: "C:\\Python33\\python.exe"
WINDOWS_SDK_VERSION: "v7.1"
PYTHON_HOME: "C:\\Python33"
PYTHON_VERSION: "3.3"
PYTHON_ARCH: "32"
- TOXENV: "3.3"
TOXPYTHON: "C:\\Python33-x64\\python.exe"
WINDOWS_SDK_VERSION: "v7.1"
PYTHON_HOME: "C:\\Python33-x64"
PYTHON_VERSION: "3.3"
PYTHON_ARCH: "64"
- TOXENV: "3.3-nocover"
TOXPYTHON: "C:\\Python33\\python.exe"
WINDOWS_SDK_VERSION: "v7.1"
PYTHON_HOME: "C:\\Python33"
PYTHON_VERSION: "3.3"
PYTHON_ARCH: "32"
- TOXENV: "3.3-nocover"
TOXPYTHON: "C:\\Python33-x64\\python.exe"
WINDOWS_SDK_VERSION: "v7.1"
PYTHON_HOME: "C:\\Python33-x64"
PYTHON_VERSION: "3.3"
PYTHON_ARCH: "64"
- TOXENV: "3.4"
TOXPYTHON: "C:\\Python34\\python.exe"
WINDOWS_SDK_VERSION: "v7.1"
PYTHON_HOME: "C:\\Python34"
PYTHON_VERSION: "3.4"
PYTHON_ARCH: "32"
- TOXENV: "3.4"
TOXPYTHON: "C:\\Python34-x64\\python.exe"
WINDOWS_SDK_VERSION: "v7.1"
PYTHON_HOME: "C:\\Python34-x64"
PYTHON_VERSION: "3.4"
PYTHON_ARCH: "64"
- TOXENV: "3.4-nocover"
TOXPYTHON: "C:\\Python34\\python.exe"
WINDOWS_SDK_VERSION: "v7.1"
PYTHON_HOME: "C:\\Python34"
PYTHON_VERSION: "3.4"
PYTHON_ARCH: "32"
- TOXENV: "3.4-nocover"
TOXPYTHON: "C:\\Python34-x64\\python.exe"
WINDOWS_SDK_VERSION: "v7.1"
PYTHON_HOME: "C:\\Python34-x64"
PYTHON_VERSION: "3.4"
PYTHON_ARCH: "64"
init:
- "ECHO %TOXENV%"
- ps: "ls C:\\Python*"
install:
- "powershell ci\\appveyor-bootstrap.ps1"
test_script:
- "%PYTHON_HOME%\\Scripts\\tox --version"
- "%PYTHON_HOME%\\Scripts\\virtualenv --version"
- "%PYTHON_HOME%\\Scripts\\pip --version"
- "%WITH_COMPILER% %PYTHON_HOME%\\Scripts\\tox"
after_test:
- "IF \"%TOXENV:~-8,8%\" == \"-nocover\" %WITH_COMPILER% %TOXPYTHON% setup.py bdist_wheel"
artifacts:
- path: dist\*

0 comments on commit ecdf3bf

Please sign in to comment.