pe-st / garmin-connect-export

Download a copy of your Garmin Connect data, including stats and GPX tracks.
MIT License
376 stars 77 forks source link

Python3 and Python2 support #26

Closed telemaxx closed 4 years ago

telemaxx commented 4 years ago

should now run also with Python3

I have tested this commands:

P3: fitfiles with unzip c:\Python3\python.exe C:\Users\top\BTSync\SA5\qpython\scripts\Garmin-Connect-Export-pest\gcexport.py -c 10 -f original --username "myname" --password "mypasswd" --directory "C:\public\gps" --unzip

P3: tcx files c:\Python3\python.exe C:\Users\top\BTSync\SA5\qpython\scripts\Garmin-Connect-Export-pest\gcexport.py -c 5 -f tcx --username "myname" --password "mypasswd" --directory "C:\public\gps"

P3: gpx files c:\Python3\python.exe C:\Users\top\BTSync\SA5\qpython\scripts\Garmin-Connect-Export-pest\gcexport.py -c 5 -f gpx --username "myname" --password "mypasswd" --directory "C:\public\gps"

P3: tcx files in subfolder c:\Python3\python.exe C:\Users\top\BTSync\SA5\qpython\scripts\Garmin-Connect-Export-pest\gcexport.py -c 5 -f tcx --username "myname" --password "mypasswd" --directory "C:\public\gps" -s tcx

P3: gpx files in subfolder c:\Python3\python.exe C:\Users\top\BTSync\SA5\qpython\scripts\Garmin-Connect-Export-pest\gcexport.py -c 5 -f gpx --username "myname" --password "mypasswd" --directory "C:\public\gps" -s gpx

P2: fitfiles with unzip c:\Pypy2\pypy.exe C:\Users\top\BTSync\SA5\qpython\scripts\Garmin-Connect-Export-pest\gcexport.py -c 10 -f original --username "myname" --password "mypasswd" --directory "C:\public\gps" --unzip

P2: gpx files c:\Pypy2\pypy.exe C:\Users\top\BTSync\SA5\qpython\scripts\Garmin-Connect-Export-pest\gcexport.py -c 10 -f gpx --username "myname" --password "mypasswd" --directory "C:\public\gps" --unzip

P2: tcx files with some options c:\Pypy2\pypy.exe C:\Users\top\BTSync\SA5\qpython\scripts\Garmin-Connect-Export-pest\gcexport.py -c 10 -f tcx --username "myname" --password "mypasswd" --directory "C:\public\gps" --unzip --desc 12 -fp -sa 8 -s tcx

P3: this makes still problems (--fp and/or -desc) c:\Python3\Python.exe C:\Users\top\BTSync\SA5\qpython\scripts\Garmin-Connect-Export-pest\gcexport.py -c 12 -f tcx --username "myname" --password "mypasswd"--directory "C:\public\gps" --unzip --desc 12 -fp -sa 8 -s tcx

jedie commented 4 years ago

i would suggest to skip python v2 support ;)

pe-st commented 4 years ago

@telemaxx Great work, thanks! I'll try to have a closer look in the weekend...

telemaxx commented 4 years ago

i would suggest to skip python v2 support ;)

at the moment not all function are working with p3, so better having both possibilities. later we could easily remove the p2 parts. BTW: this project is hard to debug, i could only do half a dozen runs, than i will blocked for some hours from garmin...

jedie commented 4 years ago

Test fixtures and mocks are needed. So it can be automatic tests.

pe-st commented 4 years ago

I've started to integrate your commits in my feature/p3 branch, while at the same time migrating also the existing unit tests. Currently 8 of 10 pass with Python 3 and all of them still pass with Python 2

telemaxx commented 4 years ago

Test fixtures and mocks are needed. So it can be automatic tests.

yes automated tests would be great.

telemaxx commented 4 years ago

i reduced some code. that is giving some conflicts now. Peter, should i revert my changes and wait until the PR is closed?

telemaxx commented 4 years ago

i closed this PR, merged the changes of p3 into python3 and send a new PR without conflicts