-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removes travis and replaced with github actions. Ran black to format the code. Updated the README.md file to include the new changes.
- Loading branch information
Showing
16 changed files
with
204 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Deploy Workflow | ||
on: | ||
push: | ||
tags: | ||
- "*" | ||
jobs: | ||
build: | ||
name: Build | ||
strategy: | ||
matrix: | ||
python-version: [2.7] | ||
runs-on: ubuntu-latest | ||
container: python:${{ matrix.python-version }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: python --version | ||
- run: pip install -r requirements.txt | ||
- run: | | ||
pip install black | ||
black . --check | ||
if: matrix.python-version == '3.12' | ||
- run: python setup.py test | ||
- run: pip install twine wheel | ||
- run: python setup.py sdist bdist_wheel | ||
- run: python -m twine upload -u ${PYPI_USERNAME} -p ${PYPI_PASSWORD} dist/* | ||
env: | ||
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Main Workflow | ||
on: [push] | ||
jobs: | ||
build: | ||
name: Build | ||
strategy: | ||
matrix: | ||
python-version: [ | ||
2.7, | ||
3.5, | ||
3.6, | ||
3.7, | ||
3.8, | ||
3.9, | ||
"3.10", | ||
"3.11", | ||
"3.12", | ||
latest, | ||
rc | ||
] | ||
runs-on: ubuntu-latest | ||
container: python:${{ matrix.python-version }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: python --version | ||
- run: pip install -r requirements.txt | ||
- run: | | ||
pip install black | ||
black . --check | ||
if: matrix.python-version == '3.12' | ||
- run: | | ||
pip install pytest | ||
pytest | ||
- run: python setup.py test | ||
if: matrix.python-version != '3.12' && matrix.python-version != 'latest' | ||
build-pypy: | ||
name: Build PyPy | ||
strategy: | ||
matrix: | ||
python-version: [2.7, 3.6, 3.9, "3.10"] | ||
runs-on: ubuntu-latest | ||
container: pypy:${{ matrix.python-version }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: pypy --version | ||
- run: pip install -r requirements.txt | ||
- run: | | ||
pip install black | ||
black . --check | ||
if: matrix.python-version == '3.12' | ||
- run: | | ||
pip install pytest | ||
pytest | ||
- run: pypy setup.py test | ||
if: matrix.python-version != '3.12' && matrix.python-version != 'latest' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,8 @@ | |
|
||
session.shelve* | ||
|
||
/.venv | ||
|
||
/dist | ||
/build | ||
/src/nexmo_api.egg-info |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[pytest] | ||
python_files = *.py | ||
testpaths = src/nexmo/test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
# -*- coding: utf-8 -*- | ||
|
||
# Hive Nexmo API | ||
# Copyright (c) 2008-2020 Hive Solutions Lda. | ||
# Copyright (c) 2008-2024 Hive Solutions Lda. | ||
# | ||
# This file is part of Hive Nexmo API. | ||
# | ||
|
@@ -22,16 +22,7 @@ | |
__author__ = "João Magalhães <[email protected]>" | ||
""" The author(s) of the module """ | ||
|
||
__version__ = "1.0.0" | ||
""" The version of the module """ | ||
|
||
__revision__ = "$LastChangedRevision$" | ||
""" The revision number of the module """ | ||
|
||
__date__ = "$LastChangedDate$" | ||
""" The last change date of the module """ | ||
|
||
__copyright__ = "Copyright (c) 2008-2020 Hive Solutions Lda." | ||
__copyright__ = "Copyright (c) 2008-2024 Hive Solutions Lda." | ||
""" The copyright for the module """ | ||
|
||
__license__ = "Apache License, Version 2.0" | ||
|
@@ -41,25 +32,19 @@ | |
import setuptools | ||
|
||
setuptools.setup( | ||
name = "nexmo-api", | ||
version = "0.1.2", | ||
author = "Hive Solutions Lda.", | ||
author_email = "[email protected]", | ||
description = "Nexmo API Client", | ||
license = "Apache License, Version 2.0", | ||
keywords = "nexmo api", | ||
url = "http://nexmo-api.hive.pt", | ||
zip_safe = False, | ||
packages = [ | ||
"nexmo" | ||
], | ||
package_dir = { | ||
"" : os.path.normpath("src") | ||
}, | ||
install_requires = [ | ||
"appier" | ||
], | ||
classifiers = [ | ||
name="nexmo-api", | ||
version="0.1.2", | ||
author="Hive Solutions Lda.", | ||
author_email="[email protected]", | ||
description="Nexmo API Client", | ||
license="Apache License, Version 2.0", | ||
keywords="nexmo api", | ||
url="http://nexmo-api.hive.pt", | ||
zip_safe=False, | ||
packages=["nexmo"], | ||
package_dir={"": os.path.normpath("src")}, | ||
install_requires=["appier"], | ||
classifiers=[ | ||
"Development Status :: 3 - Alpha", | ||
"Topic :: Utilities", | ||
"License :: OSI Approved :: Apache Software License", | ||
|
@@ -74,8 +59,10 @@ | |
"Programming Language :: Python :: 3.4", | ||
"Programming Language :: Python :: 3.5", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7" | ||
"Programming Language :: Python :: 3.7", | ||
], | ||
long_description = open(os.path.join(os.path.dirname(__file__), "README.md"), "rb").read().decode("utf-8"), | ||
long_description_content_type = "text/markdown" | ||
long_description=open(os.path.join(os.path.dirname(__file__), "README.md"), "rb") | ||
.read() | ||
.decode("utf-8"), | ||
long_description_content_type="text/markdown", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
# -*- coding: utf-8 -*- | ||
|
||
# Hive Nexmo API | ||
# Copyright (c) 2008-2020 Hive Solutions Lda. | ||
# Copyright (c) 2008-2024 Hive Solutions Lda. | ||
# | ||
# This file is part of Hive Nexmo API. | ||
# | ||
|
@@ -22,16 +22,7 @@ | |
__author__ = "João Magalhães <[email protected]>" | ||
""" The author(s) of the module """ | ||
|
||
__version__ = "1.0.0" | ||
""" The version of the module """ | ||
|
||
__revision__ = "$LastChangedRevision$" | ||
""" The revision number of the module """ | ||
|
||
__date__ = "$LastChangedDate$" | ||
""" The last change date of the module """ | ||
|
||
__copyright__ = "Copyright (c) 2008-2020 Hive Solutions Lda." | ||
__copyright__ = "Copyright (c) 2008-2024 Hive Solutions Lda." | ||
""" The copyright for the module """ | ||
|
||
__license__ = "Apache License, Version 2.0" | ||
|
@@ -41,14 +32,11 @@ | |
|
||
from . import base | ||
|
||
|
||
class NexmoApp(appier.WebApp): | ||
|
||
def __init__(self, *args, **kwargs): | ||
appier.WebApp.__init__( | ||
self, | ||
name = "nexmo", | ||
*args, **kwargs | ||
) | ||
appier.WebApp.__init__(self, name="nexmo", *args, **kwargs) | ||
|
||
@appier.route("/", "GET") | ||
def index(self): | ||
|
@@ -72,6 +60,7 @@ def sms(self): | |
def get_api(self): | ||
return base.get_api() | ||
|
||
|
||
if __name__ == "__main__": | ||
app = NexmoApp() | ||
app.serve() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
# -*- coding: utf-8 -*- | ||
|
||
# Hive Nexmo API | ||
# Copyright (c) 2008-2020 Hive Solutions Lda. | ||
# Copyright (c) 2008-2024 Hive Solutions Lda. | ||
# | ||
# This file is part of Hive Nexmo API. | ||
# | ||
|
@@ -22,16 +22,7 @@ | |
__author__ = "João Magalhães <[email protected]>" | ||
""" The author(s) of the module """ | ||
|
||
__version__ = "1.0.0" | ||
""" The version of the module """ | ||
|
||
__revision__ = "$LastChangedRevision$" | ||
""" The revision number of the module """ | ||
|
||
__date__ = "$LastChangedDate$" | ||
""" The last change date of the module """ | ||
|
||
__copyright__ = "Copyright (c) 2008-2020 Hive Solutions Lda." | ||
__copyright__ = "Copyright (c) 2008-2024 Hive Solutions Lda." | ||
""" The copyright for the module """ | ||
|
||
__license__ = "Apache License, Version 2.0" | ||
|
@@ -41,8 +32,8 @@ | |
|
||
import nexmo | ||
|
||
|
||
def get_api(): | ||
return nexmo.API( | ||
api_key = appier.conf("NEXMO_API_KEY"), | ||
api_secret = appier.conf("NEXMO_API_SECRET") | ||
api_key=appier.conf("NEXMO_API_KEY"), api_secret=appier.conf("NEXMO_API_SECRET") | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
# -*- coding: utf-8 -*- | ||
|
||
# Hive Nexmo API | ||
# Copyright (c) 2008-2020 Hive Solutions Lda. | ||
# Copyright (c) 2008-2024 Hive Solutions Lda. | ||
# | ||
# This file is part of Hive Nexmo API. | ||
# | ||
|
@@ -22,21 +22,13 @@ | |
__author__ = "João Magalhães <[email protected]>" | ||
""" The author(s) of the module """ | ||
|
||
__version__ = "1.0.0" | ||
""" The version of the module """ | ||
|
||
__revision__ = "$LastChangedRevision$" | ||
""" The revision number of the module """ | ||
|
||
__date__ = "$LastChangedDate$" | ||
""" The last change date of the module """ | ||
|
||
__copyright__ = "Copyright (c) 2008-2020 Hive Solutions Lda." | ||
__copyright__ = "Copyright (c) 2008-2024 Hive Solutions Lda." | ||
""" The copyright for the module """ | ||
|
||
__license__ = "Apache License, Version 2.0" | ||
""" The license for the module """ | ||
|
||
|
||
class AccountAPI(object): | ||
|
||
def balance_account(self): | ||
|
Oops, something went wrong.