Skip to content
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
15 changes: 10 additions & 5 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
[run]
source = dotenv/
omit =
tests/*
venv/*
*conftest*
source = dotenv

[paths]
source =
src/dotenv
.tox/*/lib/python*/site-packages/dotenv
.tox/pypy*/site-packages/dotenv

[report]
show_missing = True
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ htmlcov/
.cache/
.idea
.pytest_cache/
.tox/
49 changes: 34 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,45 @@
language: python
cache: pip
sudo: false
python:
- '2.7'
- '3.4'
- '3.5'
- '3.6'
- pypy
# Enable 3.7 without globally enabling sudo and dist: xenial for other build jobs
dist: xenial

matrix:
include:
- python: 3.7
dist: xenial
sudo: true
- python: "3.6"
env: TOXENV=lint
- python: "3.6"
env: TOXENV=manifest

- python: "2.7"
env: TOXENV=py27
- python: "3.4"
env: TOXENV=py34
- python: "3.5"
env: TOXENV=py35
- python: "3.6"
env: TOXENV=py36
- python: "3.7"
env: TOXENV=py37
- python: "pypy"
env: TOXENV=pypy
dist: trusty
- python: "pypy3"
env: TOXENV=pypy3
dist: trusty

install:
- pip install python-coveralls
- pip install -q -r requirements.txt
- pip install --editable .
- pip install tox

script:
- flake8 .
- pytest -v --tb=native --cov
- tox

before_install:
- pip install python-coveralls

after_success:
- tox -e coverage-report
- coveralls

deploy:
provider: pypi
user: theskumar
Expand Down
11 changes: 9 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
include LICENSE
include README.rst
include LICENSE *.md *.yml

include tox.ini
recursive-include tests *.py

include .bumpversion.cfg
include .coveragerc
include .editorconfig
include Makefile
include requirements.txt
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,15 @@ people](https://github.com/theskumar/python-dotenv/graphs/contributors).

Executing the tests:

$ pip install -r requirements.txt
$ pip install -e .
$ flake8
$ pytest

or with [tox](https://pypi.org/project/tox/) installed:

$ tox

Changelog
=========

Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ pypandoc
pytest-cov
pytest>=3.9
sh>=1.09
tox
wheel
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ exclude = .tox,.git,docs,venv,.venv
description-file = README.rst

[tool:pytest]
norecursedirs = .svn _build tmp* dist venv .git .venv venv
flake8-max-line-length = 120
testpaths = tests
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
long_description = f.read()

meta = {}
with open('./dotenv/version.py') as f:
with open('./src/dotenv/version.py') as f:
exec(f.read(), meta)

setup(
Expand All @@ -28,6 +28,7 @@
keywords=['environment variables', 'deployments', 'settings', 'env', 'dotenv',
'configurations', 'python'],
packages=['dotenv'],
package_dir={'': 'src'},
extras_require={
'cli': ['click>=5.0', ],
},
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
37 changes: 37 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[tox]
envlist = lint,py{27,34,35,36,37},pypy,pypy3,manifest,coverage-report

[testenv]
deps =
pytest
coverage
sh
click
py{27,py}: ipython<6.0.0
py34: ipython<7.0.0
py{35,36,37,py3}: ipython
commands = coverage run --parallel -m pytest {posargs}

[testenv:lint]
skip_install = true
deps =
flake8
commands =
flake8 src tests

[testenv:manifest]
deps = check-manifest
skip_install = true
commands = check-manifest

[testenv:coverage-clean]
deps = coverage
skip_install = true
commands = coverage erase

[testenv:coverage-report]
deps = coverage
skip_install = true
commands =
coverage combine
coverage report