kopia lustrzana https://github.com/inmcm/micropyGPS
Restructure to allow pip install from git
update readme with install instructionspull/10/head
rodzic
1a111f6359
commit
6cb713196e
|
@ -0,0 +1,28 @@
|
|||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
env/
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
wheels/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
|
||||
test.txt
|
|
@ -0,0 +1 @@
|
|||
include micropyGPS.py
|
23
README.md
23
README.md
|
@ -14,6 +14,27 @@ Features:
|
|||
- Parser written with a serial UART data source in mind; works on a single character at a time with
|
||||
robust error handling for noisy embedded environments
|
||||
- Modeled after the great [TinyGPS] Arduino library
|
||||
|
||||
## Install / uninstall
|
||||
|
||||
Install by cloning from git and running install via setuptools.
|
||||
|
||||
```sh
|
||||
git clone https://github.com/bsdz/micropyGPS.git
|
||||
python setup.py install
|
||||
```
|
||||
|
||||
Or install directly from github using pip.
|
||||
|
||||
```sh
|
||||
pip install git+https://github.com/bsdz/micropyGPS.git
|
||||
```
|
||||
|
||||
To uninstall use the following pip command.
|
||||
|
||||
```sh
|
||||
pip uninstall micropyGPS
|
||||
```
|
||||
|
||||
|
||||
## Basic Usage
|
||||
|
@ -208,4 +229,4 @@ Beyond the pyBoard, micropyGPS should run on other embedded platforms that have
|
|||
[TinyGPS]:http://arduiniana.org/libraries/tinygps/
|
||||
[pyboard]:http://docs.micropython.org/en/latest/pyboard/pyboard/quickref.html
|
||||
[MTK_command]:https://github.com/inmcm/MTK_commands
|
||||
[Ultimate GPS Breakout]:http://www.adafruit.com/product/746
|
||||
[Ultimate GPS Breakout]:http://www.adafruit.com/product/746
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
__author__ = 'inmcm'
|
|
@ -0,0 +1,13 @@
|
|||
from setuptools import setup, find_packages
|
||||
|
||||
setup(name='micropyGPS',
|
||||
version='1.0',
|
||||
description='GPS NMEA sentence parser',
|
||||
author='Calvin McCoy',
|
||||
author_email='calvin.mccoy@gmail.com',
|
||||
url='https://github.com/inmcm/micropyGPS',
|
||||
py_modules = ['micropyGPS'],
|
||||
include_package_data=True,
|
||||
test_suite="tests.py",
|
||||
|
||||
)
|
18
tests.py
18
tests.py
|
@ -7,8 +7,7 @@ Tests for micropyGPS module
|
|||
|
||||
from micropyGPS import MicropyGPS
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
def run_tests():
|
||||
sentence_count = 0
|
||||
|
||||
test_RMC = ['$GPRMC,081836,A,3751.65,S,14507.36,E,000.0,360.0,130998,011.3,E*62\n',
|
||||
|
@ -148,4 +147,17 @@ if __name__ == "__main__":
|
|||
print('Sentences Attempted:', sentence_count)
|
||||
print('Sentences Found:', my_gps.clean_sentences)
|
||||
print('Sentences Parsed:', my_gps.parsed_sentences)
|
||||
print('CRC_Fails:', my_gps.crc_fails)
|
||||
print('CRC_Fails:', my_gps.crc_fails)
|
||||
|
||||
import unittest
|
||||
|
||||
class TestMicroPyGPS(unittest.TestCase):
|
||||
|
||||
def test_smoke(self):
|
||||
try:
|
||||
run_tests()
|
||||
except:
|
||||
self.fail("smoke test raised exception")
|
||||
|
||||
if __name__ == "__main__":
|
||||
run_tests()
|
||||
|
|
Ładowanie…
Reference in New Issue