Skip to content

Commit

Permalink
Version Bump v3.0.0: full v3 Web API support
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkingserious committed Jun 14, 2016
2 parents 1af90f4 + 339144b commit 9f5ac66
Show file tree
Hide file tree
Showing 51 changed files with 3,945 additions and 3,228 deletions.
1 change: 0 additions & 1 deletion .env_sample

This file was deleted.

4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ venv/
.python-version
.tox/
profile*
*_example.py
register.py
README.txt
README.txt
temp.py
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,3 @@ notifications:
GitHub</a>'
format: html
notify: false
env:
matrix:
secure: CYhmQGIhXrefDruEOBzMo1jZ+NPyFjDqPeqsnLHoGcYhkbp3GW+fCPHEypRMG72K/f1+Vc2/6ka76dvu6/NpflO8ooyYKzXEhds/oemGUuvcsZdVOFeGeIu3h9lpdHgeOjB3N3l7rwJU0nFTk7Bmb0bY7AVH5qfFqLJ6syEfjVU=
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# Change Log
All notable changes to this project will be documented in this file.

## [2.2.1] - 2016-03-02 ##
## [3.0.0] - 2016-06-13 ##
### Added
- Breaking change to support the v3 Web API
- New HTTP client
- v3 Mail Send helper

## [2.1.1] - 2016-03-02 ##

### Added ###

Expand Down
110 changes: 55 additions & 55 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,28 @@
Hello! Thank you for choosing to help contribute to the sendgrid-python library. There are many ways you can contribute and help is always welcome.

Hello! Thank you for choosing to help contribute to one of the SendGrid open source libraries. There are many ways you can contribute and help is always welcome. We simply ask that you follow the following contribution policies.

- [CLAs and CCLAs](#cla)
- [Roadmap & Milestones](#roadmap)
- [Feature Request](#feature_request)
- [Submit a Bug Report](#submit_a_bug_report)
- [Improvements to the Codebase](#improvements_to_the_codebase)
- [Understanding the Code Base](#understanding_the_codebase)
- [Testing](#testing)
- [Style Guidelines & Naming Conventions](#style_guidelines_and_naming_conventions)
- [Creating a Pull Request](#creating_a_pull_request)

<a name="roadmap"></a>
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.

* [Feature Request](#feature_request)
* [Submit a Bug Report](#submit_a_bug_report)
* [Improvements to the Codebase](#improvements_to_the_codebase)
* [Understanding the Code Base](#understanding_the_codebase)
* [Testing](#testing)
* [Testing Multiple Versions of Python](#testing_multiple_versoins_of_python)
* [Style Guidelines & Naming Conventions](#style_guidelines_and_naming_conventions)
* [Creating a Pull Request](#creating_a_pull_request)
<a name="cla"></a>
## CLAs and CCLAs

Before you get started, SendGrid requires that a SendGrid Contributor License Agreement (CLA) or a SendGrid Company Contributor Licensing Agreement (CCLA) be filled out by every contributor to a SendGrid open source project.

Our goal with the CLA and CCLA is to clarify the rights of our contributors and reduce other risks arising from inappropriate contributions. The CLA also clarifies the rights SendGrid holds in each contribution and helps to avoid misunderstandings over what rights each contributor is required to grant to SendGrid when making a contribution. In this way the CLA and CCLA encourage broad participation by our open source community and help us build strong open source projects, free from any individual contributor withholding or revoking rights to any contribution.

SendGrid does not merge a pull request made against a SendGrid open source project until that pull request is associated with a signed CLA (or CCLA). Copies of the CLA and CCLA are available [here](https://drive.google.com/a/sendgrid.com/file/d/0B0PlcM9qA91LN2VEUTJWU2RIVXc/view).

You may submit your completed [CLA or CCLA](https://drive.google.com/a/sendgrid.com/file/d/0B0PlcM9qA91LN2VEUTJWU2RIVXc/view) to SendGrid at [dx@sendgrid.com](mailto:dx@sendgrid.com). SendGrid will then confirm you are ready to begin making contributions.

There are a few ways to contribute, which we'll enumerate below:

Expand Down Expand Up @@ -38,29 +51,7 @@ Before you decide to create a new issue, please try the following:

### Please use our Bug Report Template

In order to make the process easier, we've included a sample bug report template (borrowed from [Ghost](https://github.com/TryGhost/Ghost/)). The template uses [GitHub flavored markdown](https://help.github.com/articles/github-flavored-markdown/) for formatting.

```
Short and descriptive example bug report title
#### Issue Summary
A summary of the issue and the environment in which it occurs. If suitable, include the steps required to reproduce the bug. Please feel free to include screenshots, screencasts, code examples.
#### Steps to Reproduce
1. This is the first step
2. This is the second step
3. Further steps, etc.
Any other information you want to share that is relevant to the issue being reported. Especially, why do you consider this to be a bug? What do you expect to happen instead?
#### Technical details:
* sendgrid-python Version: master (latest commit: 2cb34372ef0f31352f7c90015a45e1200cb849da)
* Python Version: 2.7
```
In order to make the process easier, we've included a [sample bug report template]((https://github.com/sendgrid/sendgrid-python/.github/ISSUE_TEMPLATE)) (borrowed from [Ghost](https://github.com/TryGhost/Ghost/)). The template uses [GitHub flavored markdown](https://help.github.com/articles/github-flavored-markdown/) for formatting.

<a name="improvements_to_the_codebase"></a>
## Improvements to the Codebase
Expand All @@ -69,27 +60,38 @@ We welcome direct contributions to the sendgrid-python code base. Thank you!

### Development Environment ###

#### Install and run locally ####
#### Install and Run Locally ####

##### Prerequisites #####

* Python 2.6 through 3.5
* smtpapi-python
* python_http_client
- Python 2.6 through 3.5
- [python_http_client](https://github.com/sendgrid/python-http-client)

##### Initial setup: #####

```
```bash
git clone https://github.com/sendgrid/sendgrid-python.git
cd sendgrid-python
```

Update your settings in `.env`
## Environment Variables

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

Next, update your environment with your [SENDGRID_API_KEY](https://app.sendgrid.com/settings/api_keys).

```bash
echo "export SENDGRID_API_KEY='YOUR_API_KEY'" > sendgrid.env
echo "sendgrid.env" >> .gitignore
source ./sendgrid.env
```

##### Execute: #####

See the [examples folder](https://github.com/sendgrid/sendgrid-python/tree/master/examples) to get started quickly.

If testing from the root directory of this repo, create a new file (e.g. test.py) and replace `import sendgrid` with `from sendgrid import *`

<a name="understanding_the_codebase"></a>
## Understanding the Code Base

Expand All @@ -99,20 +101,20 @@ Working examples that demonstrate usage.

**/tests**

Tests for the mail send and Web API v3 endpoints.
Currently we have unit and profiling tests.

**/sendgrid**

The Web API v3 client is `client.py`, the other files are legacy code for our mail send v2 endpoint.
The Web API v3 client is `sendgrid.py`, the other files are legacy code for our mail send v2 endpoint.

<a name="testing"></a>
## Testing

All PRs require passing tests before the PR will be reviewed.

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

For the purposes of contributing to this repo, please update the [`test_v3_endpoints.py`](https://github.com/sendgrid/sendgrid-python/blob/master/test/test_v3_endpoints.py) file with unit tests as you modify the code.
For the purposes of contributing to this repo, please update the [`test_sendgrid.py`](https://github.com/sendgrid/sendgrid-python/tree/master/test/test_sendgrid.py) file with unit tests as you modify the code.

For Python 2.6.*:

Expand All @@ -122,19 +124,18 @@ For Python 2.7.* and up:

`python -m unittest discover -v`

<a name="testing_multiple_versoins_of_python"></a>
## Testing Multiple Versions of Python
### Testing Multiple Versions of Python

All PRs require passing tests before the PR will be reviewed.

### Prequisites: ###
#### Prequisites: ####

The above local "Initial setup" is complete

* [pyenv](https://github.com/yyuu/pyenv)
* [tox](https://pypi.python.org/pypi/tox)

### Initial setup: ###
#### Initial setup: ####

Add ```eval "$(pyenv init -)"``` to your shell environment (.profile, .bashrc, etc) after installing tox, you only need to do this once.

Expand All @@ -148,9 +149,9 @@ pyenv install 3.5.0
python setup.py install
pyenv local 3.5.0 3.4.3 3.3.6 3.2.6 2.7.8 2.6.9
pyenv rehash
````
```

### Execute: ###
#### Execute: ####

```
source venv/bin/activate
Expand All @@ -162,14 +163,13 @@ tox

Generally, we follow the style guidelines as suggested by the official language. However, we ask that you conform to the styles that already exist in the library. If you wish to deviate, please explain your reasoning.

* [PEP8](https://www.python.org/dev/peps/pep-0008/)

Please run your code through [pyflakes](https://pypi.python.org/pypi/pyflakes), [pylint](https://www.pylint.org/) and [pep8](https://pypi.python.org/pypi/pep8)
- [PEP8](https://www.python.org/dev/peps/pep-0008/)

### Directory Structure
Please run your code through:

* `examples` for example calls
* `test`, for all tests
- [pyflakes](https://pypi.python.org/pypi/pyflakes)
- [pylint](https://www.pylint.org/)
- [pep8](https://pypi.python.org/pypi/pep8)

## Creating a Pull Request<a name="creating_a_pull_request"></a>

Expand Down
18 changes: 9 additions & 9 deletions MIT.LICENSE → LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Copyright (c) 2016 SendGrid
Copyright (c) 2012-2016 SendGrid, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of
The above copyright notice and this permission notice shall be included in all copies or substantial portions of
the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
include README.rst
include MIT.LICENSE
include LICENSE.txt
recursive-exclude test *
Loading

0 comments on commit 9f5ac66

Please sign in to comment.