-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from vkurup/package-clean-up
Clean up package
- Loading branch information
Showing
17 changed files
with
211 additions
and
68 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,6 @@ | ||
[run] | ||
branch = true | ||
source = tcxparser | ||
|
||
[report] | ||
show_missing = true |
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
sudo: false | ||
language: python | ||
python: | ||
- "2.7" | ||
install: python setup.py install | ||
script: python setup.py test | ||
- "3.5" | ||
install: pip install tox-travis | ||
script: tox |
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,15 @@ | ||
Primary author: | ||
--------------- | ||
|
||
* Vinod Kurup (@vkurup) | ||
|
||
|
||
Other contributions from: | ||
------------------------- | ||
|
||
* Iztok Fister Jr (@firefly-cpp) | ||
* Jason M. (@DaddyTheRunner) | ||
* Adam Neumann (@noizwaves) | ||
* Stephen Doyle (@stevedoyle) | ||
|
||
Thank you! |
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,47 @@ | ||
CHANGES | ||
======= | ||
|
||
v0.8.0, 2018-04-27 | ||
------------------ | ||
|
||
* Add coverage, flake8 | ||
* Support Python 3 | ||
* Move code into its own package | ||
* Add some cycling support (#16) | ||
* Run tests on CI using tox-travis | ||
|
||
|
||
v0.7.2, 2017-03-02 | ||
------------------ | ||
|
||
* Don't fail if lat/lon not present. | ||
|
||
|
||
v0.7.1, 2016-08-14 | ||
------------------ | ||
|
||
* Fix for tracks with only 1 trackpoint. | ||
|
||
|
||
v0.7.0, 2016-01-01 | ||
------------------ | ||
|
||
* Added average altitude support. Thanks @firefly-cpp | ||
|
||
|
||
v0.6.0, 2014-11-18 | ||
------------------ | ||
|
||
* Added heart rate data & pace support. Thanks @stevedoyle | ||
|
||
|
||
v0.3.0, 2013-01-09 | ||
------------------ | ||
|
||
* Changed methods to properties | ||
|
||
|
||
v0.1.0, 2013-01-07 | ||
------------------ | ||
|
||
* Initial release. |
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 |
---|---|---|
@@ -1,6 +1,17 @@ | ||
# python-tcxparser | ||
python-tcxparser | ||
================ | ||
|
||
[ ![Codeship Status for vkurup/python-tcxparser](https://codeship.com/projects/eb924480-4493-0134-5e03-3a611b6d72e6/status?branch=master)](https://codeship.com/projects/168475) | ||
.. image:: https://img.shields.io/pypi/v/python-tcxparser.svg | ||
:target: https://pypi.python.org/pypi/python-tcxparser | ||
:alt: Latest PyPI version | ||
|
||
.. image:: https://travis-ci.org/vkurup/python-tcxparser.svg?branch=master | ||
:target: https://travis-ci.org/vkurup/python-tcxparser | ||
:alt: Latest Travis CI build status | ||
|
||
.. image:: https://pyup.io/repos/github/vkurup/python-tcxparser/shield.svg | ||
:target: https://pyup.io/repos/github/vkurup/python-tcxparser/ | ||
:alt: Updates | ||
|
||
python-tcxparser is a minimal parser for Garmin's TCX file format. It | ||
is not in any way exhaustive. It extracts just enough data to allow me | ||
|
@@ -21,11 +32,17 @@ Data extracted: | |
- max and min altitude | ||
- time stamp of each data point (in ISO UTC) | ||
|
||
## Installation | ||
Installation | ||
------------ | ||
|
||
Install it from PyPI:: | ||
|
||
pip install python-tcxparser | ||
pip install python-tcxparser | ||
|
||
## Usage | ||
Usage | ||
----- | ||
|
||
Basic usage example:: | ||
|
||
>>> import tcxparser | ||
>>> tcx = tcxparser.TCXParser('/home/vinod/Downloads/20121226-212953.tcx') | ||
|
@@ -51,5 +68,17 @@ Data extracted: | |
... tcx.calories | ||
379 | ||
|
||
## Contact | ||
Compatibility | ||
------------- | ||
|
||
* Python 2.7 or 3.5+ | ||
|
||
License | ||
------- | ||
|
||
BSD | ||
|
||
Contact | ||
------- | ||
|
||
Please contact me with any questions: Vinod Kurup ([email protected]) |
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 |
---|---|---|
@@ -1,2 +1,5 @@ | ||
[metadata] | ||
description-file = README.md | ||
description-file = README.rst | ||
|
||
[flake8] | ||
max-line-length = 120 |
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 |
---|---|---|
@@ -1,27 +1,34 @@ | ||
from setuptools import setup | ||
from setuptools import setup, find_packages | ||
|
||
__version__ = '0.7.2' | ||
__version__ = '0.8.0' | ||
|
||
setup( | ||
name='python-tcxparser', | ||
version=__version__, | ||
description='Simple parser for Garmin TCX files', | ||
long_description=open('README.rst').read(), | ||
author='Vinod Kurup', | ||
author_email='[email protected]', | ||
py_modules=['tcxparser', 'test_tcxparser'], | ||
url='https://github.com/vkurup/python-tcxparser/', | ||
packages=find_packages(include=['tcxparser']), | ||
include_package_data=True, | ||
license='BSD', | ||
description='Simple parser for Garmin TCX files', | ||
zip_safe=False, | ||
keywords='tcx', | ||
classifiers=[ | ||
'Development Status :: 4 - Beta', | ||
'Intended Audience :: Developers', | ||
'License :: OSI Approved :: BSD License', | ||
'Operating System :: OS Independent', | ||
'Programming Language :: Python', | ||
'Programming Language :: Python :: 2', | ||
'Programming Language :: Python :: 2.7', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.5', | ||
'Topic :: Software Development :: Libraries :: Python Modules', | ||
], | ||
long_description=open('README.md').read(), | ||
install_requires=[ | ||
"lxml", | ||
], | ||
test_suite="test_tcxparser", | ||
test_suite="tests", | ||
) |
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 @@ | ||
from .tcxparser import TCXParser # noqa |
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
Empty file.
File renamed without changes.
File renamed without changes.
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,18 @@ | ||
import os | ||
from unittest import TestCase | ||
|
||
from tcxparser import TCXParser | ||
|
||
|
||
class TestParseCyclingTCX(TestCase): | ||
|
||
def setUp(self): | ||
tcx_file = 'test2.tcx' | ||
path = os.path.join(os.path.dirname(__file__), 'files', tcx_file) | ||
self.tcx = TCXParser(path) | ||
|
||
def test_cadence_max_is_correct(self): | ||
self.assertEqual(self.tcx.cadence_max, 115) | ||
|
||
def test_cadence_avg_is_correct(self): | ||
self.assertEqual(self.tcx.cadence_avg, 82) |
Oops, something went wrong.