diff --git a/.codeclimate.yml b/.codeclimate.yml
deleted file mode 100644
index 3d89c6a..0000000
--- a/.codeclimate.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-engines:
- duplication:
- enabled: true
- config:
- languages:
- - python
- fixme:
- enabled: true
- markdownlint:
- enabled: true
- pep8:
- enabled: true
- radon:
- enabled: true
-ratings:
- paths:
- - "**.inc"
- - "**.module"
- - "**.py"
\ No newline at end of file
diff --git a/.github/workflows/pr-lint.yml b/.github/workflows/pr-lint.yml
new file mode 100644
index 0000000..2f5232b
--- /dev/null
+++ b/.github/workflows/pr-lint.yml
@@ -0,0 +1,15 @@
+name: Lint PR
+on:
+ pull_request_target:
+ types: [ opened, edited, synchronize, reopened ]
+
+jobs:
+ validate:
+ name: Validate title
+ runs-on: ubuntu-latest
+ steps:
+ - uses: amannn/action-semantic-pull-request@v4
+ with:
+ types: chore docs fix feat test misc
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/test-and-deploy.yml b/.github/workflows/test-and-deploy.yml
new file mode 100644
index 0000000..9638a03
--- /dev/null
+++ b/.github/workflows/test-and-deploy.yml
@@ -0,0 +1,88 @@
+name: Test and Deploy
+on:
+ push:
+ branches: [ '*' ]
+ tags: [ '*' ]
+ pull_request:
+ branches: [ main ]
+ schedule:
+ # Run automatically at 8AM PST Monday-Friday
+ - cron: '0 15 * * 1-5'
+ workflow_dispatch:
+
+jobs:
+ test:
+ name: Test
+ runs-on: ubuntu-latest
+ timeout-minutes: 20
+ strategy:
+ matrix:
+ python-version: [ '2.7', '3.5', '3.6', '3.7', '3.8', '3.9', '3.10' ]
+ steps:
+ - name: Checkout sendgrid-python-smtpapi
+ uses: actions/checkout@v2
+
+ - name: Set up Python
+ uses: actions/setup-python@v2
+ with:
+ python-version: ${{ matrix.python-version }}
+
+ - name: Build & Test
+ run: make install test-install test
+
+ deploy:
+ name: Deploy
+ if: success() && github.ref_type == 'tag'
+ needs: [ test ]
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout sendgrid-python-smtpapi
+ uses: actions/checkout@v2
+
+ - name: Set up Python
+ uses: actions/setup-python@v2
+ with:
+ python-version: '3.10'
+
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install build
+ pip install wheel
+ python setup.py sdist bdist_wheel
+
+ - name: Create GitHub Release
+ uses: sendgrid/dx-automator/actions/release@main
+ with:
+ footer: '**[pypi](https://pypi.org/project/smtpapi/${version})**'
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Publish package to PyPI
+ uses: pypa/gh-action-pypi-publish@release/v1
+ with:
+ user: __token__
+ password: ${{ secrets.PYPI_TOKEN }}
+
+ - name: Submit metric to Datadog
+ uses: sendgrid/dx-automator/actions/datadog-release-metric@main
+ env:
+ DD_API_KEY: ${{ secrets.DATADOG_API_KEY }}
+
+ notify-on-failure:
+ name: Slack notify on failure
+ if: failure() && github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || github.ref_type == 'tag')
+ needs: [ test, deploy ]
+ runs-on: ubuntu-latest
+ steps:
+ - uses: rtCamp/action-slack-notify@v2
+ env:
+ SLACK_COLOR: failure
+ SLACK_ICON_EMOJI: ':github:'
+ SLACK_MESSAGE: ${{ format('Test *{0}*, Deploy *{1}*, {2}/{3}/actions/runs/{4}', needs.test.result, needs.deploy.result, github.server_url, github.repository, github.run_id) }}
+ SLACK_TITLE: Action Failure - ${{ github.repository }}
+ SLACK_USERNAME: GitHub Actions
+ SLACK_MSG_AUTHOR: twilio-dx
+ SLACK_FOOTER: Posted automatically using GitHub Actions
+ SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
+ MSG_MINIMAL: true
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 7f2cc66..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-dist: xenial # required for Python >= 3.7
-language: python
-python:
- - '2.7'
- - '3.4'
- - '3.5'
- - '3.6'
- - '3.7'
- - '3.8'
-install:
- - make install
- - make test-install
- - pip install codecov
-script:
- - make test
- - . venv/bin/activate; coverage run test/__init__.py
- - . venv/bin/activate; flake8 --statistics --count
-after_success:
- - codecov
-deploy:
- provider: pypi
- user: "__token__"
- password: $PYPI_TOKEN
- skip_cleanup: true
- distributions: sdist bdist_wheel
- on:
- branch: main
- condition: "$TRAVIS_TEST_RESULT = 0"
- tags: true
- python: '3.6'
-
-notifications:
- slack:
- if: branch = main
- on_pull_requests: false
- on_success: never
- on_failure: change
- rooms:
- - secure: GBYjICnJwGDgb3CM8STuWXESuR2hUZHkl1oCQC8Vd9WmId281AeMflMw3GIo9Ay+uY0+TXUIUihxS61SuX9T/LP4lV7b47dH9BzQ7IbVVfCaOtgq7KmkD4dCeaA8X5zvTktrpMcS1b2WNKKaExCkuetj80dJRSX5vw1s+zl3o5U=
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bc79638..6d884e4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,44 @@
# Change Log
All the notable changes to this project will be documented in this file.
+[2022-03-09] Version 0.4.12
+---------------------------
+**Library - Chore**
+- [PR #112](https://github.com/sendgrid/smtpapi-python/pull/112): push Datadog Release Metric upon deploy success. Thanks to [@eshanholtz](https://github.com/eshanholtz)!
+
+
+[2022-02-09] Version 0.4.11
+---------------------------
+**Library - Chore**
+- [PR #111](https://github.com/sendgrid/smtpapi-python/pull/111): upgrade supported language versions. Thanks to [@childish-sambino](https://github.com/childish-sambino)!
+- [PR #110](https://github.com/sendgrid/smtpapi-python/pull/110): add gh release to workflow. Thanks to [@shwetha-manvinkurke](https://github.com/shwetha-manvinkurke)!
+- [PR #109](https://github.com/sendgrid/smtpapi-python/pull/109): merge test and deploy gh action workflows. Thanks to [@Hunga1](https://github.com/Hunga1)!
+
+
+[2022-01-12] Version 0.4.10
+---------------------------
+**Library - Chore**
+- [PR #108](https://github.com/sendgrid/smtpapi-python/pull/108): update license year. Thanks to [@JenniferMah](https://github.com/JenniferMah)!
+
+
+[2021-12-01] Version 0.4.9
+--------------------------
+**Library - Chore**
+- [PR #107](https://github.com/sendgrid/smtpapi-python/pull/107): migrate to GitHub Actions. Thanks to [@JenniferMah](https://github.com/JenniferMah)!
+
+
+[2021-09-22] Version 0.4.8
+--------------------------
+**Library - Chore**
+- [PR #106](https://github.com/sendgrid/smtpapi-python/pull/106): test against python v3.9. Thanks to [@shwetha-manvinkurke](https://github.com/shwetha-manvinkurke)!
+
+
+[2020-12-02] Version 0.4.7
+--------------------------
+**Library - Chore**
+- [PR #63](https://github.com/sendgrid/smtpapi-python/pull/63): Add .codeclimate.yml and update test/__init__.py. Thanks to [@geomars](https://github.com/geomars)!
+
+
[2020-09-28] Version 0.4.6
--------------------------
**Library - Docs**
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 64bbd95..53bcd2a 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,7 +1,5 @@
Hello! Thank you for choosing to help contribute to one of the Twilio SendGrid open source projects. There are many ways you can contribute and help is always welcome. We simply ask that you follow the following contribution policies.
-- [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)
@@ -9,33 +7,6 @@ Hello! Thank you for choosing to help contribute to one of the Twilio SendGrid o
- [Creating a Pull Request](#creating-a-pull-request)
- [Code Reviews](#code-reviews)
-
-## Feature Request
-
-If you'd like to make a feature request, please read this section.
-
-The GitHub issue tracker is the preferred channel for library feature requests, but please respect the following restrictions:
-
-- Please **search for existing issues** to ensure we don't have duplicate bugs/feature requests.
-- Please be respectful and considerate of others when commenting on issues.
-
-
-## Submit a Bug Report
-
-Note: DO NOT include your credentials in ANY code examples, descriptions, or media you make public.
-
-A software bug is a demonstrable issue in the code base. For us to diagnose the issue and respond as quickly as possible, please add as much detail as possible into your bug report.
-
-Before you decide to create a new issue, please try the following:
-
-1. Check the Github issues tab if the identified issue has already been reported, if so, please add a +1 to the existing post.
-2. Update to the latest version of this code and check if the issue has already been fixed.
-3. Copy and fill in the Bug Report Template we have provided below.
-
-### Please use our Bug Report Template
-
-In order to make the process easier, we've included a [sample bug report template](ISSUE_TEMPLATE.md).
-
## Improvements to the Codebase
diff --git a/FIRST_TIMERS.md b/FIRST_TIMERS.md
index 174f5d0..ade7912 100644
--- a/FIRST_TIMERS.md
+++ b/FIRST_TIMERS.md
@@ -51,29 +51,3 @@ git push origin
## Important notice
Before creating a pull request, make sure that you respect the repository's constraints regarding contributions. You can find them in the [CONTRIBUTING.md](CONTRIBUTING.md) file.
-
-## Repositories with Open, Easy, Help Wanted, Issue Filters
-
-* [Python SDK](https://github.com/sendgrid/sendgrid-python/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
-* [PHP SDK](https://github.com/sendgrid/sendgrid-php/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
-* [C# SDK](https://github.com/sendgrid/sendgrid-csharp/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
-* [Ruby SDK](https://github.com/sendgrid/sendgrid-ruby/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
-* [Node.js SDK](https://github.com/sendgrid/sendgrid-nodejs/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
-* [Java SDK](https://github.com/sendgrid/sendgrid-java/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
-* [Go SDK](https://github.com/sendgrid/sendgrid-go/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
-* [Python STMPAPI Client](https://github.com/sendgrid/smtpapi-python/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
-* [PHP STMPAPI Client](https://github.com/sendgrid/smtpapi-php/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
-* [C# STMPAPI Client](https://github.com/sendgrid/smtpapi-csharp/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
-* [Ruby STMPAPI Client](https://github.com/sendgrid/smtpapi-ruby/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
-* [Node.js STMPAPI Client](https://github.com/sendgrid/smtpapi-nodejs/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
-* [Java STMPAPI Client](https://github.com/sendgrid/smtpapi-java/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
-* [Go STMPAPI Client](https://github.com/sendgrid/smtpapi-go/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
-* [Python HTTP Client](https://github.com/sendgrid/python-http-client/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
-* [PHP HTTP Client](https://github.com/sendgrid/php-http-client/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
-* [C# HTTP Client](https://github.com/sendgrid/csharp-http-client/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
-* [Java HTTP Client](https://github.com/sendgrid/java-http-client/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
-* [Ruby HTTP Client](https://github.com/sendgrid/ruby-http-client/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
-* [Go HTTP Client](https://github.com/sendgrid/rest/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
-* [Open API Definition](https://github.com/sendgrid/sendgrid-oai/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
-* [DX Automator](https://github.com/sendgrid/dx-automator/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
-* [Documentation](https://github.com/sendgrid/docs/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md
deleted file mode 100644
index 8c043fd..0000000
--- a/ISSUE_TEMPLATE.md
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-### 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, or code examples.
-
-### Steps to Reproduce
-1. This is the first step
-2. This is the second step
-3. Further steps, etc.
-
-### Code Snippet
-```python
-# paste code here
-```
-
-### Exception/Log
-```
-# paste exception/log here
-```
-
-### Technical details:
-* smtpapi-python version:
-* python version:
-
diff --git a/LICENSE.md b/LICENSE
similarity index 94%
rename from LICENSE.md
rename to LICENSE
index 29aba59..3154774 100644
--- a/LICENSE.md
+++ b/LICENSE
@@ -1,6 +1,6 @@
MIT License
-Copyright (C) 2020, Twilio SendGrid, Inc.
+Copyright (C) 2023, Twilio 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
diff --git a/MANIFEST.in b/MANIFEST.in
index 9feef94..20d9d81 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,3 +1,3 @@
-include README.rst LICENSE.md VERSION.txt
+include README.rst LICENSE VERSION.txt
recursive-include smtpapi *.py *.txt
prune test
diff --git a/Makefile b/Makefile
index 7cff157..3e3bb1a 100644
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,7 @@
venv:
@python --version || (echo "Python is not installed, please install Python 2 or Python 3"; exit 1);
+ pip install virtualenv
virtualenv --python=python venv
install: venv
@@ -13,6 +14,8 @@ test-install:
test:
. venv/bin/activate; python -m unittest discover -v
. venv/bin/activate; python test/__init__.py
+ . venv/bin/activate; flake8 --statistics --count
+ . venv/bin/activate; coverage run test/__init__.py
clean: nopyc
rm -rf venv
diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md
index a868180..8a966bb 100644
--- a/PULL_REQUEST_TEMPLATE.md
+++ b/PULL_REQUEST_TEMPLATE.md
@@ -3,7 +3,7 @@ We appreciate the effort for this pull request but before that please make sure
Please format the PR title appropriately based on the type of change:
[!]:
-Where is one of: docs, chore, feat, fix, test.
+Where is one of: docs, chore, feat, fix, test, misc.
Add a '!' after the type for breaking changes (e.g. feat!: new breaking feature).
**All third-party contributors acknowledge that any contributions they provide will be made under the same open-source license that the open-source project is provided under.**
@@ -19,13 +19,13 @@ Closes #2
A short description of what this PR does.
### Checklist
-- [ ] I acknowledge that all my contributions will be made under the project's license
+- [x] I acknowledge that all my contributions will be made under the project's license
- [ ] I have made a material change to the repo (functionality, testing, spelling, grammar)
-- [ ] I have read the [Contribution Guidelines](CONTRIBUTING.md) and my PR follows them
+- [ ] I have read the [Contribution Guidelines](https://github.com/sendgrid/smtpapi-python/blob/main/CONTRIBUTING.md) and my PR follows them
- [ ] I have titled the PR appropriately
- [ ] I have updated my branch with the main branch
- [ ] I have added tests that prove my fix is effective or that my feature works
-- [ ] I have added necessary documentation about the functionality in the appropriate .md file
+- [ ] I have added the necessary documentation about the functionality in the appropriate .md file
- [ ] I have added inline documentation to the code I modified
-If you have questions, please file a [support ticket](https://twilio.com/help/contact), or create a GitHub Issue in this repository.
+If you have questions, please file a [support ticket](https://support.sendgrid.com).
diff --git a/README.rst b/README.rst
index 515f954..4b6041f 100644
--- a/README.rst
+++ b/README.rst
@@ -2,7 +2,7 @@
:target: https://www.sendgrid.com
:alt: SendGrid Logo
-|Travis Badge| |Email Notifications Badge| |Twitter Follow| |Codecov branch| |Python Versions| |PyPI Version| |GitHub contributors| |MIT Licensed|
+|Test and Deploy Badge| |Twitter Follow| |Codecov branch| |Python Versions| |PyPI Version| |GitHub contributors| |MIT Licensed|
**This module helps build SendGrid's SMTP API headers.**
@@ -10,8 +10,6 @@ Learn more about the SMTP API at `SendGrid documentation`_.
Announcements
=============
-**The default branch name for this repository has been changed to `main` as of 07/27/2020.**
-
All the updates to this module are documented in our `CHANGELOG`_.
Table of Contents
@@ -82,8 +80,6 @@ We encourage contribution to our projects, please see our `CONTRIBUTING`_ guide
Quick links:
-- `Feature Request`_
-- `Bug Reports`_
- `Improvements to the Codebase`_
- `Review Pull Requests`_
@@ -115,16 +111,12 @@ License
.. _SENDGRID_API_KEY: https://app.sendgrid.com/settings/api_keys
.. _Example Code: https://github.com/sendgrid/smtpapi-python/tree/HEAD/examples
.. _CONTRIBUTING: https://github.com/sendgrid/smtpapi-python/blob/HEAD/CONTRIBUTING.md
-.. _Feature Request: https://github.com/sendgrid/smtpapi-python/blob/HEAD/CONTRIBUTING.md#feature-request
-.. _Bug Reports: https://github.com/sendgrid/smtpapi-python/blob/HEAD/CONTRIBUTING.md#submit-a-bug-report
.. _Improvements to the Codebase: https://github.com/sendgrid/smtpapi-python/blob/HEAD/CONTRIBUTING.md#improvements-to-the-codebase
.. _Review Pull Requests: https://github.com/sendgrid/smtpapi-python/blob/HEAD/CONTRIBUTING.md#code-reviews)
-.. _The MIT License (MIT): https://github.com/sendgrid/smtpapi-python/blob/HEAD/LICENSE.md
+.. _The MIT License (MIT): https://github.com/sendgrid/smtpapi-python/blob/HEAD/LICENSE
-.. |Travis Badge| image:: https://travis-ci.org/sendgrid/smtpapi-python.svg?branch=main
- :target: https://travis-ci.org/sendgrid/smtpapi-python
-.. |Email Notifications Badge| image:: https://dx.sendgrid.com/badge/python
- :target: https://dx.sendgrid.com/newsletter/python
+.. |Test and Deploy Badge| image:: https://github.com/sendgrid/smtpapi-python/actions/workflows/test-and-deploy.yml/badge.svg
+ :target: https://github.com/sendgrid/smtpapi-python/actions/workflows/test-and-deploy.yml
.. |Twitter Follow| image:: https://img.shields.io/twitter/follow/sendgrid.svg?style=social&label=Follow
:target: https://twitter.com/sendgrid
.. |Codecov branch| image:: https://img.shields.io/codecov/c/github/sendgrid/smtpapi-python/main.svg?style=flat-square&label=Codecov+Coverage
@@ -136,4 +128,4 @@ License
.. |GitHub contributors| image:: https://img.shields.io/github/contributors/sendgrid/smtpapi-python.svg
:target: https://github.com/sendgrid/smtpapi-python/graphs/contributors
.. |MIT Licensed| image:: https://img.shields.io/badge/license-MIT-blue.svg
- :target: https://github.com/sendgrid/smtpapi-python/blob/HEAD/LICENSE.md
+ :target: https://github.com/sendgrid/smtpapi-python/blob/HEAD/LICENSE
diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md
index af15ede..717dcfa 100644
--- a/TROUBLESHOOTING.md
+++ b/TROUBLESHOOTING.md
@@ -1,7 +1,5 @@
If you have a non-library SendGrid issue, please contact our [support team](https://support.sendgrid.com).
-If you can't find a solution below, please open an [issue](https://github.com/sendgrid/smtpapi-python/issues).
-
## Table of Contents
* [Viewing the Request Body](#request-body)
diff --git a/VERSION.txt b/VERSION.txt
index ef52a64..75274d8 100644
--- a/VERSION.txt
+++ b/VERSION.txt
@@ -1 +1 @@
-0.4.6
+0.4.12
diff --git a/setup.py b/setup.py
index 50b5a32..1777899 100644
--- a/setup.py
+++ b/setup.py
@@ -31,5 +31,7 @@
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
+ 'Programming Language :: Python :: 3.9',
+ 'Programming Language :: Python :: 3.10',
],
)
diff --git a/test/__init__.py b/test/__init__.py
index 149d225..417fadc 100644
--- a/test/__init__.py
+++ b/test/__init__.py
@@ -1,11 +1,15 @@
import decimal
import json
import os
-import unittest
import datetime
from smtpapi import SMTPAPIHeader
+try:
+ import unittest2 as unittest
+except ImportError:
+ import unittest
+
class TestSMTPAPI(unittest.TestCase):
@@ -82,7 +86,7 @@ def test_drop_empty(self):
self.assertEqual(self.dropsHeader, json.loads(header.json_string()))
def test_license_year(self):
- LICENSE_FILE = 'LICENSE.md'
+ LICENSE_FILE = 'LICENSE'
copyright_line = ''
with open(LICENSE_FILE, 'r') as f:
for line in f:
@@ -101,18 +105,14 @@ class TestRepository(unittest.TestCase):
def setUp(self):
self.required_files = [
- ['./Dockerfile', './docker/Dockerfile'],
- ['./docker-compose.yml', './docker/docker-compose.yml'],
- './.codeclimate.yml',
+ './Dockerfile',
'./.env_sample',
- './ISSUE_TEMPLATE.md',
'./PULL_REQUEST_TEMPLATE.md',
'./.gitignore',
- './.travis.yml',
'./CHANGELOG.md',
'./CODE_OF_CONDUCT.md',
'./CONTRIBUTING.md',
- ['./LICENSE.md', './LICENSE.txt'],
+ './LICENSE',
'./README.rst',
'./TROUBLESHOOTING.md',
'./USAGE.md',
diff --git a/test/test_project.py b/test/test_project.py
index fdd3684..888cc41 100644
--- a/test/test_project.py
+++ b/test/test_project.py
@@ -26,14 +26,6 @@ def test_env(self):
def test_gitignore(self):
self.assertTrue(os.path.isfile('./.gitignore'))
- # ./.travis.yml
- def test_travis(self):
- self.assertTrue(os.path.isfile('./.travis.yml'))
-
- # ./.codeclimate.yml
- def test_codeclimate(self):
- self.assertTrue(os.path.isfile('./.codeclimate.yml'))
-
# ./CHANGELOG.md
def test_changelog(self):
self.assertTrue(os.path.isfile('./CHANGELOG.md'))
@@ -46,15 +38,9 @@ def test_code_of_conduct(self):
def test_contributing(self):
self.assertTrue(os.path.isfile('./CONTRIBUTING.md'))
- # ./ISSUE_TEMPLATE.md
- def test_issue_template(self):
- self.assertTrue(os.path.isfile('./ISSUE_TEMPLATE.md'))
-
- # ./LICENSE.md
+ # ./LICENSE
def test_license(self):
- self.assertTrue(
- os.path.isfile('./LICENSE.md') or os.path.isfile('./LICENSE.txt')
- )
+ self.assertTrue(os.path.isfile('./LICENSE'))
# ./PULL_REQUEST_TEMPLATE.md
def test_pr_template(self):