Skip to content
This repository was archived by the owner on Dec 7, 2023. It is now read-only.

Commit 6c20611

Browse files
authored
Merge pull request #19 from dipcode-software/feat/ci
Added support to python 3 and configured ci to run tests with all pyt…
2 parents 55dad01 + aa5206f commit 6c20611

File tree

11 files changed

+76
-47
lines changed

11 files changed

+76
-47
lines changed

.travis.yml

+42-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,46 @@
1+
sudo: false
12
language: python
3+
24
python:
3-
- 2.7
4-
sudo: false
5+
- "2.7"
6+
- "3.4"
7+
- "3.5"
8+
- "3.6"
9+
10+
env:
11+
matrix:
12+
- django19
13+
- django110
14+
- django111
15+
- djangomaster
16+
17+
matrix:
18+
fast_finish: true
19+
include:
20+
- python: "3.4"
21+
env: flake8
22+
exclude:
23+
- python: "2.7"
24+
env: djangomaster
25+
- python: "3.6"
26+
env: django19
27+
- python: "3.6"
28+
env: django111
29+
allow_failures:
30+
- env: djangomaster
31+
32+
cache:
33+
directories:
34+
- $HOME/.cache/pip
35+
- $TRAVIS_BUILD_DIR/.tox
36+
537
install:
6-
- pip install tox
38+
- pip install --upgrade pip wheel setuptools
39+
- pip install coveralls codacy-coverage tox-travis
40+
741
script:
8-
- tox -e flake8
9-
- tox -e travis
42+
- tox
43+
44+
after_success:
45+
- coveralls
46+
- python-codacy-coverage -r coverage.xml

AUTHORS.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
We'd like to thank the following people for their contributions.
44

5-
- Paulo Truta <[email protected]>
5+
- Paulo Truta
66
- Rui Freitas <[email protected]>
77
- Sandro Rodrigues <[email protected]>
88
- Tiago Brito <[email protected]>

CHANGELOG.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,9 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7-
## 0.1.0 - 2017-09-13
7+
## [0.1.1] - 2017-09-15
8+
### Added
9+
- Support to python 3.4, 3.5 and 3.6 and django 1.9, 1.10 and 1.11.
10+
11+
## [0.1.0] - 2017-09-13
812
- First release on PyPi

MANIFEST.in

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
include AUTHORS.md
2+
include CHANGELOG.md
3+
include CODE_OF_CONDUCT.md
14
include LICENSE
25
include MANIFEST.in
3-
include README.md
6+
include README.rst
47
recursive-include cbmail/templates *

README.rst

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Django CBMail
22
================
33

4-
|Build Status| |Codacy Badge| |Coverage Status| |BCH compliance|
4+
|Pypi| |Build Status| |Codacy Badge| |Coverage Status| |BCH compliance|
55

66
Django module to easily send templated emails in a DRY way using
77
classes, just like Class Based Views.
@@ -84,6 +84,8 @@ projects and commercial products.
8484
.. _Settings reference: #settings-reference
8585
.. _License: #license
8686

87+
.. |Pypi| image:: https://img.shields.io/pypi/v/django-cbmail.svg?style=flat-square
88+
:target: https://pypi.python.org/pypi/django-cbmail
8789
.. |Build Status| image:: https://travis-ci.org/dipcode-software/django-cbmail.svg?branch=master
8890
:target: https://travis-ci.org/dipcode-software/django-cbmail
8991
.. |Codacy Badge| image:: https://api.codacy.com/project/badge/Grade/d01ebbe43c684d478cacc530e44633ad

cbmail/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
default_app_config = 'cbmail.apps.CBMAilConfig'
22

3-
__version__ = '0.1.0'
3+
__version__ = '0.1.1'

cbmail/tests/test_base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class TestBaseObject(BaseMail):
1717

1818
def get_attachments(self):
1919
f = NamedTemporaryFile()
20-
f.write('unit test')
20+
f.write(b'unit test')
2121
f.seek(0)
2222
attachment = open(f.name, 'rb')
2323
att = Attachment(

requirements/tests.txt

-3
This file was deleted.

setup.cfg

-3
This file was deleted.

setup.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# Package meta-data.
1313
VERSION = __import__("cbmail").__version__
1414
NAME = 'django-cbmail'
15-
DESCRIPTION = 'Django module to easily send templated emails. '
15+
DESCRIPTION = 'Django module to easily send templated emails in a DRY way'
1616
URL = 'https://github.com/dipcode-software/django-cbmail/'
1717
1818
AUTHOR = 'Dipcode'
@@ -83,12 +83,16 @@ class DevelopmentPublishCommand(PublishCommand):
8383
classifiers=[
8484
'Environment :: Web Environment',
8585
'Framework :: Django',
86+
'Framework :: Django :: 1.10',
8687
'Framework :: Django :: 1.11',
8788
'Intended Audience :: Developers',
8889
'License :: OSI Approved :: MIT License',
8990
'Operating System :: OS Independent',
9091
'Programming Language :: Python',
9192
'Programming Language :: Python :: 2.7',
93+
'Programming Language :: Python :: 3.4',
94+
'Programming Language :: Python :: 3.5',
95+
'Programming Language :: Python :: 3.6',
9296
],
9397
cmdclass={
9498
'publish_dev': DevelopmentPublishCommand,

tox.ini

+14-29
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,23 @@
11
[tox]
22
skipsdist = True
3-
envlist = py27,flake8
3+
envlist =
4+
py{27,34,35}-django{19,110,111},
5+
py{35,36}-django{111,master},
6+
flake8
47

58
[testenv]
6-
deps = -r{toxinidir}/requirements/tests.txt
7-
commands = {envpython} runtests.py
8-
9-
[testenv:flake8]
10-
deps = flake8
11-
commands = flake8 {toxinidir}/cbmail --exclude=*/migrations/*,*settings*
12-
13-
[testenv:coverage]
14-
basepython=python2.7
15-
deps=
16-
-r{toxinidir}/requirements/tests.txt
17-
coverage
18-
setenv=
19-
PYTHONWARNINGS=ignore
20-
commands=
21-
coverage run runtests.py {posargs:}
22-
coverage report
23-
coverage erase
24-
25-
[testenv:travis]
26-
passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH
279
deps =
28-
-r{toxinidir}/requirements/tests.txt
2910
coverage
30-
coveralls
31-
codacy-coverage
32-
setenv =
33-
PYTHONWARNINGS=ignore
34-
commands =
11+
mock >= 2.0.0
12+
django19: Django>=1.9,<1.10
13+
django110: Django>=1.10,<1.11
14+
django111: Django>=1.11,<2.0
15+
djangomaster: https://github.com/django/django/archive/master.tar.gz
16+
commands=
3517
coverage run runtests.py {posargs:}
3618
coverage report
3719
coverage xml
38-
coveralls
20+
21+
[testenv:flake8]
22+
deps = flake8
23+
commands = flake8 {toxinidir}/cbmail

0 commit comments

Comments
 (0)