From 40dfad3092de347a5a38fc38abc6b4342df2383f Mon Sep 17 00:00:00 2001 From: Rossen Georgiev Date: Tue, 30 Dec 2014 16:35:14 +0000 Subject: [PATCH] init code clean up + code comments --- .gitignore | 3 ++- Makefile | 2 +- aprslib/IS.py | 2 +- aprslib/__init__.py | 18 ++++++------------ aprslib/base91.py | 4 +++- aprslib/exceptions.py | 2 +- aprslib/parse.py | 4 ++-- aprslib/passcode.py | 2 +- 8 files changed, 17 insertions(+), 20 deletions(-) diff --git a/.gitignore b/.gitignore index 959a569..6b6abd0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ +.coverage *.swp *.pyc dist -aprs.egg-info +*.egg-info diff --git a/Makefile b/Makefile index 67fdbac..d106636 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ pylint: build: pylint test clean: - rm -rf dist aprs.egg-info + rm -rf dist aprs.egg-info aprslib/*.pyc dist: clean python setup.py sdist diff --git a/aprslib/IS.py b/aprslib/IS.py index 6ba2976..14d74c9 100644 --- a/aprslib/IS.py +++ b/aprslib/IS.py @@ -1,4 +1,4 @@ -# aprs - Python library for dealing with APRS +# aprslib - Python library for working with APRS # Copyright (C) 2013-2014 Rossen Georgiev # # This program is free software; you can redistribute it and/or modify diff --git a/aprslib/__init__.py b/aprslib/__init__.py index 50fd689..4ed8da6 100644 --- a/aprslib/__init__.py +++ b/aprslib/__init__.py @@ -1,4 +1,4 @@ -# aprs - Python library for dealing with APRS +# aprslib - Python library for working with APRS # Copyright (C) 2013-2014 Rossen Georgiev # # This program is free software; you can redistribute it and/or modify @@ -31,18 +31,12 @@ __version__ = "0.6.31" __author__ = "Rossen Georgiev" __all__ = ['IS', 'parse', 'passcode'] -from .parse import parse as refparse -parse = refparse -del refparse +from .exceptions import * +from .parse import parse +from .passcode import passcode -from .passcode import passcode as refpasscode -passcode = refpasscode -del refpasscode - -from .IS import IS as refIS +from .IS import IS -class IS(refIS): +class IS(IS): pass - -del refIS diff --git a/aprslib/base91.py b/aprslib/base91.py index 4efa213..b184170 100644 --- a/aprslib/base91.py +++ b/aprslib/base91.py @@ -1,4 +1,4 @@ -# aprs - Python library for dealing with APRS +# aprslib - Python library for working with APRS # Copyright (C) 2013-2014 Rossen Georgiev # # This program is free software; you can redistribute it and/or modify @@ -18,6 +18,8 @@ """ Provides facilities for covertion from/to base91 """ + +__all__ = ['to_decimal', 'from_decimal'] from math import log from re import findall diff --git a/aprslib/exceptions.py b/aprslib/exceptions.py index db8601c..e3dd3d9 100644 --- a/aprslib/exceptions.py +++ b/aprslib/exceptions.py @@ -1,4 +1,4 @@ -# aprs - Python library for dealing with APRS +# aprslib - Python library for working with APRS # Copyright (C) 2013-2014 Rossen Georgiev # # This program is free software; you can redistribute it and/or modify diff --git a/aprslib/parse.py b/aprslib/parse.py index 3dda42f..5fc6485 100644 --- a/aprslib/parse.py +++ b/aprslib/parse.py @@ -1,4 +1,4 @@ -# aprs - Python library for dealing with APRS +# aprslib - Python library for working with APRS # Copyright (C) 2013-2014 Rossen Georgiev # # This program is free software; you can redistribute it and/or modify @@ -59,7 +59,7 @@ def parse(raw_sentence): """ Parses an APRS packet and returns a dict with decoded data - - All attributes are in meteric units + - All attributes are in metric units Supports: * normal/compressed/mic-e position reports diff --git a/aprslib/passcode.py b/aprslib/passcode.py index c164bf6..7f53218 100644 --- a/aprslib/passcode.py +++ b/aprslib/passcode.py @@ -1,4 +1,4 @@ -# aprs - Python library for dealing with APRS +# aprslib - Python library for working with APRS # Copyright (C) 2013-2014 Rossen Georgiev # # This program is free software; you can redistribute it and/or modify