Skip to content

Commit 6fe402c

Browse files
authored
chore: prep the repo for automated releasing (#862)
* chore: prep the repo for automated releasing * chore: drop support for python v3.4
1 parent 2c500f4 commit 6fe402c

File tree

9 files changed

+58
-54
lines changed

9 files changed

+58
-54
lines changed

.travis.yml

+24-44
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ language: python
22
sudo: false
33
cache: pip
44
python:
5-
- '2.7'
6-
- '3.4'
7-
- '3.5'
8-
- '3.6'
5+
- '2.7'
6+
- '3.5'
7+
- '3.6'
98
# Enable 3.7 without globally enabling sudo and dist: xenial for other build jobs
109
matrix:
1110
include:
@@ -14,47 +13,28 @@ matrix:
1413
sudo: true
1514
env:
1615
global:
17-
- CC_TEST_REPORTER_ID=$TRAVIS_CODE_CLIMATE_TOKEN
16+
- CC_TEST_REPORTER_ID=$TRAVIS_CODE_CLIMATE_TOKEN SENDGRID_API_KEY=SGAPIKEY
1817
install:
19-
- python setup.py install
20-
- pip install pyyaml
21-
- pip install flask
22-
- pip install six
23-
- pip install coverage
24-
- pip install codecov
25-
# - sudo apt-get install -y pandoc
26-
addons:
27-
apt_packages:
28-
- pandoc
18+
- python setup.py install
19+
- pip install pyyaml flask six coverage codecov
2920
before_script:
30-
- "./test/prism.sh &"
31-
- sleep 20
32-
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
33-
- chmod +x ./cc-test-reporter
34-
- ./cc-test-reporter before-build
21+
- "./test/prism.sh &"
22+
- sleep 20
23+
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
24+
- chmod +x ./cc-test-reporter
25+
- ./cc-test-reporter before-build
3526
script:
36-
- coverage run -m unittest discover
27+
- coverage run -m unittest discover
3728
after_script:
38-
- codecov
39-
- ./cc-test-reporter after-build --exit-code $?
40-
# deploy:
41-
# provider: pypi
42-
# user: thinkingserious
43-
# password:
44-
# secure: DoM21KiMKkt/7AS6zOqTs7j3fgInrpswRTPG3cqBNRSzyfkXeXmKecCPruooxvYKLM7fPNDOuIH2phgCjdx/XBtJwghNh34n+TzhNFEiI/6pV0iS4a9gW0+QU+GMYvQmfNlA9DKQ5N20FMy4XeK8QQFarJXQwW1/a5wWftbUYvQ=
45-
# skip_cleanup: true
46-
# distributions: sdist bdist_wheel
47-
# on:
48-
# tags: true
49-
# python: '3.6'
50-
notifications:
51-
hipchat:
52-
rooms:
53-
secure: Lo3L/YNWpn9ulGX4D2HlWrBOyxMPlLkFcwxbYViG69Ta6BV+c6YE+Pct43tExlL6sZ+nj5p8X4KRTeOM4sqASrebWA25nyUrNTm+vZYFbi5XfmGvvi8TEsgg0MYRQRWWn/R2z0kZW/fqOY6sqJuoIafMBmC3tayTJRiH1Ct2Cw0=
54-
template:
55-
- '<a href="https://travis-ci.org/%{repository}/builds/%{build_id}">%{repository}
56-
Build %{build_number}</a> on branch <i>%{branch}</i> by %{author}: <strong>%{message}</strong>
57-
<a href="https://github.com/%{repository}/commits/%{commit}">View on
58-
GitHub</a>'
59-
format: html
60-
notify: false
29+
- codecov
30+
- ./cc-test-reporter after-build --exit-code $?
31+
deploy:
32+
provider: pypi
33+
user: __token__
34+
password:
35+
secure: $PYPI_TOKEN
36+
skip_cleanup: true
37+
distributions: sdist bdist_wheel
38+
on:
39+
tags: true
40+
python: '3.6'

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
33

4-
## [6.1.0] - 2019-09-12 ##
4+
[2019-09-12] Version 6.1.0
5+
---------------------------
56

67
### Added
78
- Bumped dependency on python-http-client to [v3.2.1](https://github.com/sendgrid/python-http-client/releases/tag/v3.2.0)

LICENSE.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
Copyright (c) 2012-2019 Twilio SendGrid, Inc.
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2012-2020 Twilio SendGrid, Inc.
24

35
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
46
documentation files (the "Software"), to deal in the Software without restriction, including without limitation

Makefile

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.PHONY: venv install test-install test clean nopyc
2+
3+
venv:
4+
@python --version || (echo "Python is not installed, please install Python 2 or Python 3"; exit 1);
5+
virtualenv --python=python venv
6+
7+
install: venv
8+
. venv/bin/activate; python setup.py install
9+
. venv/bin/activate; pip install -r requirements.txt
10+
11+
test:
12+
. venv/bin/activate; python -m unittest discover -v
13+
14+
clean: nopyc
15+
rm -rf venv
16+
17+
nopyc:
18+
find . -name \*.pyc -delete

README.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. image:: https://github.com/sendgrid/sendgrid-python/raw/master/twilio_sendgrid_logo.png
22
:target: https://www.sendgrid.com
3-
3+
44

55

66
|Travis Badge| |codecov| |Python Versions| |PyPI Version| |Docker Badge| |Email Notifications Badge| |MIT licensed| |Twitter Follow| |GitHub contributors| |Open Source Helpers|
@@ -46,7 +46,7 @@ Installation
4646
Prerequisites
4747
-------------
4848

49-
- Python version 2.7 and 3.4+
49+
- Python version 2.7 and 3.5+
5050
- For email, you will need a Twilio SendGrid account, starting at the `free level`_
5151
- For SMS messages, you will need a free `Twilio account`_
5252

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Flask==1.0.2
22
PyYAML>=4.2b1
3-
python-http-client==3.1.0
3+
python-http-client>=3.2.1
44
six==1.11.0
55
pytest==3.8.2

sendgrid/version.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
version_info = (6, 1, 0)
2-
__version__ = '.'.join(str(v) for v in version_info)
1+
__version__ = '6.1.0'

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def getRequires():
2828
description='Twilio SendGrid library for Python',
2929
long_description=readme,
3030
install_requires=getRequires(),
31-
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
31+
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
3232
classifiers=[
3333
'Programming Language :: Python :: 2.7',
3434
'Programming Language :: Python :: 3',

test/test_sendgrid.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,7 @@ def test_ips_get(self):
863863
data = response.body
864864
unused = unassigned(data)
865865
self.assertEqual(type(unused), list)
866-
self.assertEqual(response.status_code, 200)
866+
self.assertEqual(response.status_code, 200)
867867

868868
def test_ips_assigned_get(self):
869869
headers = {'X-Mock': 200}
@@ -2305,8 +2305,12 @@ def test_whitelabel_links__link_id__subuser_post(self):
23052305

23062306
def test_license_year(self):
23072307
LICENSE_FILE = 'LICENSE.txt'
2308+
copyright_line=''
23082309
with open(LICENSE_FILE, 'r') as f:
2309-
copyright_line = f.readline().rstrip()
2310+
for line in f:
2311+
if line.startswith('Copyright'):
2312+
copyright_line = line.strip()
2313+
break
23102314
self.assertEqual(
23112315
'Copyright (c) 2012-%s Twilio SendGrid, Inc.' % datetime.datetime.now().year,
23122316
copyright_line)

0 commit comments

Comments
 (0)