Skip to content

Commit b0a2aa2

Browse files
Merge branch 'master' into client_cleanup
2 parents 840a034 + 9ab6672 commit b0a2aa2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1401
-1380
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@ coverage.xml
2121
htmlcov
2222
temp*.py
2323
sendgrid.env
24+
.vscode
2425

.travis.yml

+10-3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ python:
77
- '3.4'
88
- '3.5'
99
- '3.6'
10+
env:
11+
global:
12+
- CC_TEST_REPORTER_ID=$TRAVIS_CODE_CLIMATE_TOKEN
1013
install:
1114
- if [[ $TRAVIS_PYTHON_VERSION == 2.6* ]]; then pip install unittest2; fi
1215
- python setup.py install
@@ -21,12 +24,16 @@ addons:
2124
apt_packages:
2225
- pandoc
2326
before_script:
24-
- . ./test/prism.sh
25-
- prism version
27+
- "./test/prism.sh &"
28+
- sleep 20
29+
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
30+
- chmod +x ./cc-test-reporter
31+
- ./cc-test-reporter before-build
2632
script:
2733
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then coverage run -m unittest2 discover; else coverage run -m unittest discover; fi
2834
after_script:
2935
- codecov
36+
- ./cc-test-reporter after-build --exit-code $?
3037
before_deploy:
3138
- python ./register.py
3239
deploy:
@@ -46,7 +53,7 @@ notifications:
4653
template:
4754
- '<a href="https://travis-ci.org/%{repository}/builds/%{build_id}">%{repository}
4855
Build %{build_number}</a> on branch <i>%{branch}</i> by %{author}: <strong>%{message}</strong>
49-
<a href="https://github.com/sendgrid/%{repository}/commits/%{commit}">View on
56+
<a href="https://github.com/%{repository}/commits/%{commit}">View on
5057
GitHub</a>'
5158
format: html
5259
notify: false

CONTRIBUTING.md

+16-9
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Hello! Thank you for choosing to help contribute to one of the SendGrid open sou
1212
- [Code Reviews](#code-reviews)
1313

1414
<a name="roadmap"></a>
15-
We use [Milestones](https://github.com/sendgrid/sendgrid-python/milestones) to help define current roadmaps, please feel free to grab an issue from the current milestone. Please indicate that you have begun work on it to avoid collisions. Once a PR is made, community review, comments, suggestions and additional PRs are welcomed and encouraged.
15+
We use [Milestones](https://github.com/sendgrid/sendgrid-python/milestones) to help define current roadmaps, please feel free to grab an issue from the current milestone. Please indicate that you have begun work on it to avoid collisions. Once a PR is made, community reviews, comments, suggestions and additional PRs are welcomed and encouraged.
1616

1717
<a name="cla"></a>
1818
## CLAs and CCLAs
@@ -60,11 +60,13 @@ In order to make the process easier, we've included a [sample bug report templat
6060
We welcome direct contributions to the sendgrid-python code base. Thank you!
6161

6262
### Development Environment ###
63-
64-
#### Using Docker ####
63+
#### There are two ways to get set up: ####
64+
#### 1. Using Docker ####
65+
This is usually the easiest and fastest way to get set up.
6566
You can use our Docker image to avoid setting up the development environment yourself. See [USAGE.md](https://github.com/sendgrid/sendgrid-python/blob/master/docker/USAGE.md).
6667

67-
#### Install and Run Locally ####
68+
#### - OR - ####
69+
#### 2. Install and Run Locally ####
6870

6971
##### Prerequisites #####
7072

@@ -78,7 +80,7 @@ git clone https://github.com/sendgrid/sendgrid-python.git
7880
cd sendgrid-python
7981
```
8082

81-
## Environment Variables
83+
### Environment Variables
8284

8385
First, get your free SendGrid account [here](https://sendgrid.com/free?source=sendgrid-python).
8486

@@ -114,7 +116,7 @@ The Web API v3 client is `sendgrid.py`, the other files are legacy code for our
114116
<a name="testing"></a>
115117
## Testing
116118

117-
All PRs require passing tests before the PR will be reviewed.
119+
The PR must pass all the tests before it is reviewed.
118120

119121
All test files are in the [`test`](https://github.com/sendgrid/sendgrid-python/test) directory.
120122

@@ -130,7 +132,7 @@ For Python 2.7.* and up:
130132

131133
### Testing Multiple Versions of Python
132134

133-
All PRs require passing tests before the PR will be reviewed.
135+
The PR must pass all the tests before it is reviewed.
134136

135137
#### Prerequisites: ####
136138

@@ -140,7 +142,7 @@ The above local "Initial setup" is complete
140142
* [tox](https://pypi.python.org/pypi/tox)
141143
* [prism](https://github.com/stoplightio/prism) v0.6 - It should be available in your PATH, but unittest script
142144
will try to install it locally if not found. Apart from PATH env variable it will check in `~/bin` and `/usr/local/bin`.
143-
You can install by yourself it in user dir by calling `source test/prism.sh`.
145+
You can install it by yourself in user dir by calling `source test/prism.sh`.
144146

145147
#### Initial setup: ####
146148

@@ -151,8 +153,13 @@ pyenv install 2.6.9
151153
pyenv install 2.7.11
152154
pyenv install 3.4.3
153155
pyenv install 3.5.0
156+
```
157+
Make sure to change the current working directory to your local version of the repo before running the following command:
158+
```
154159
python setup.py install
155-
pyenv local 3.5.0 3.4.3 2.7.8 2.6.9
160+
```
161+
```
162+
pyenv local 3.5.0 3.4.3 2.7.11 2.6.9
156163
pyenv rehash
157164
```
158165

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
[![Twitter Follow](https://img.shields.io/twitter/follow/sendgrid.svg?style=social&label=Follow)](https://twitter.com/sendgrid)
99
[![GitHub contributors](https://img.shields.io/github/contributors/sendgrid/sendgrid-python.svg)](https://github.com/sendgrid/sendgrid-python/graphs/contributors)
1010

11-
**NEW:**
11+
**NEW:**
1212

1313
* Subscribe to email [notifications](https://dx.sendgrid.com/newsletter/python) for releases and breaking changes.
1414
* Quickly get started with [Docker](https://github.com/sendgrid/sendgrid-python/tree/master/docker).
@@ -55,7 +55,7 @@ echo "sendgrid.env" >> .gitignore
5555
source ./sendgrid.env
5656
```
5757

58-
Sendgrid also supports local enviroment file `.env`. Copy or rename `.env_sample` into `.env` and update [SENDGRID_API_KEY](https://app.sendgrid.com/settings/api_keys) with your key.
58+
Sendgrid also supports local environment file `.env`. Copy or rename `.env_sample` into `.env` and update [SENDGRID_API_KEY](https://app.sendgrid.com/settings/api_keys) with your key.
5959

6060
## Install Package
6161

@@ -175,7 +175,7 @@ Please see [our helper](https://github.com/sendgrid/sendgrid-python/tree/master/
175175
<a name="use-cases"></a>
176176
# Use Cases
177177

178-
[Examples of common API use cases](https://github.com/sendgrid/sendgrid-python/blob/master/USE_CASES.md), such as how to send an email with a transactional template.
178+
[Examples of common API use cases](https://github.com/sendgrid/sendgrid-python/blob/master/use_cases/README.md), such as how to send an email with a transactional template.
179179

180180
<a name="announcements"></a>
181181
# Announcements

TROUBLESHOOTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,4 @@ print mail.get()
111111
<a name="error-handling"></a>
112112
# Error Handling
113113

114-
Please review [our use_cases](https://github.com/sendgrid/sendgrid-python/USE_CASES.md) for examples of error handling.
114+
Please review [our use_cases](https://github.com/sendgrid/sendgrid-python/use_cases/README.md) for examples of error handling.

USAGE.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ print response.headers
434434

435435
**This endpoint allows you to create a new suppression group.**
436436

437-
Suppression groups, or unsubscribe groups, are specific types or categories of email that you would like your recipients to be able to unsubscribe from. For example: Daily Newsletters, Invoices, System Alerts.
437+
Suppression groups, or unsubscribe groups, are specific types or categories of emails that you would like your recipients to be able to unsubscribe from. For example: Daily Newsletters, Invoices, System Alerts.
438438

439439
The **name** and **description** of the unsubscribe group will be visible by recipients when they are managing their subscriptions.
440440

@@ -478,7 +478,7 @@ print response.headers
478478

479479
**This endpoint allows you to update or change a suppression group.**
480480

481-
Suppression groups, or unsubscribe groups, are specific types or categories of email that you would like your recipients to be able to unsubscribe from. For example: Daily Newsletters, Invoices, System Alerts.
481+
Suppression groups, or unsubscribe groups, are specific types or categories of emails that you would like your recipients to be able to unsubscribe from. For example: Daily Newsletters, Invoices, System Alerts.
482482

483483
The **name** and **description** of the unsubscribe group will be visible by recipients when they are managing their subscriptions.
484484

@@ -503,7 +503,7 @@ print response.headers
503503

504504
**This endpoint allows you to retrieve a single suppression group.**
505505

506-
Suppression groups, or unsubscribe groups, are specific types or categories of email that you would like your recipients to be able to unsubscribe from. For example: Daily Newsletters, Invoices, System Alerts.
506+
Suppression groups, or unsubscribe groups, are specific types or categories of emails that you would like your recipients to be able to unsubscribe from. For example: Daily Newsletters, Invoices, System Alerts.
507507

508508
The **name** and **description** of the unsubscribe group will be visible by recipients when they are managing their subscriptions.
509509

@@ -525,7 +525,7 @@ print response.headers
525525

526526
You can only delete groups that have not been attached to sent mail in the last 60 days. If a recipient uses the "one-click unsubscribe" option on an email associated with a deleted group, that recipient will be added to the global suppression list.
527527

528-
Suppression groups, or unsubscribe groups, are specific types or categories of email that you would like your recipients to be able to unsubscribe from. For example: Daily Newsletters, Invoices, System Alerts.
528+
Suppression groups, or unsubscribe groups, are specific types or categories of emails that you would like your recipients to be able to unsubscribe from. For example: Daily Newsletters, Invoices, System Alerts.
529529

530530
The **name** and **description** of the unsubscribe group will be visible by recipients when they are managing their subscriptions.
531531

0 commit comments

Comments
 (0)