Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ var/
*.egg-info/
.installed.cfg
*.egg
.vscode/
.pylintrc

# PyInstaller
# Usually these files are written by a python script from a template
Expand Down
5 changes: 3 additions & 2 deletions anthemav/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import argparse
import asyncio
import logging
import settings

import anthemav

Expand All @@ -22,8 +23,8 @@ def console(loop, log):
Show debug logging.
"""
parser = argparse.ArgumentParser(description=console.__doc__)
parser.add_argument('--host', default='127.0.0.1', help='IP or FQDN of AVR')
parser.add_argument('--port', default='14999', help='Port of AVR')
parser.add_argument('--host', default=settings.IPADDRESS, help='IP or FQDN of AVR')
parser.add_argument('--port', default=settings.PORT, help='Port of AVR')
parser.add_argument('--verbose', '-v', action='count')

args = parser.parse_args()
Expand Down
5 changes: 3 additions & 2 deletions example.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
import asyncio
import anthemav
import logging
import settings

log = logging.getLogger(__name__)

@asyncio.coroutine
def test():
parser = argparse.ArgumentParser(description=test.__doc__)
parser.add_argument('--host', default='127.0.0.1', help='IP or FQDN of AVR')
parser.add_argument('--port', default='14999', help='Port of AVR')
parser.add_argument('--host', default=settings.IPADDRESS, help='IP or FQDN of AVR')
parser.add_argument('--port', default=settings.PORT, help='Port of AVR')
parser.add_argument('--verbose', '-v', action='count')

args = parser.parse_args()
Expand Down
2 changes: 2 additions & 0 deletions settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
IPADDRESS = '192.168.3.54'
PORT = '14999'
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

setup(
name='anthemav',
version='1.1.8',
version='1.1.9',
author='David McNett',
author_email='[email protected]',
url='https://github.com/nugget/python-anthemav',
Expand Down
11 changes: 8 additions & 3 deletions tests/fulltests.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
#!/usr/bin/env python3

# to run this test you need to add the parent folder path to your PYTHONPATH. See the following example
# Use this command if your terminal is in the parent folder: PYTHONPATH=/path/to/parent/folder python tests/fulltests.py
# Use this command if your terminal is in the tests folder: PYTHONPATH=/path/to/parent/folder python fulltests.py

import asyncio
import unittest
import logging
import settings

import anthemav

Expand All @@ -13,10 +18,10 @@ def test():
def log_callback(message):
log.info('Callback invoked: %s' % message)

host = '127.0.0.1'
port = 14999
host = settings.IPADDRESS
port = settings.PORT

log.info('Connecting to Anthem AVR at %s:%i' % (host, port))
log.info('Connecting to Anthem AVR at %s:%s' % (host, port))

# conn = yield from anthemav.Connection.create(host=host,port=port,loop=loop,update_callback=log_callback,auto_reconnect=False)

Expand Down