Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python3 and Python2 support #26

Closed
wants to merge 14 commits into from
Closed

Conversation

telemaxx
Copy link
Contributor

@telemaxx telemaxx commented Mar 3, 2020

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

from os.path import sep
can only do a handfull test until garmin blocks me for some time
some work with: def write_to_file(filename, content, mode, file_time=None):
@jedie
Copy link
Contributor

jedie commented Mar 5, 2020

i would suggest to skip python v2 support ;)

@pe-st
Copy link
Owner

pe-st commented Mar 6, 2020

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

@telemaxx
Copy link
Contributor Author

telemaxx commented Mar 6, 2020

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...

telemaxx added 3 commits March 6, 2020 18:19
otherwise gpx are not handled correctly
... when using gpx
gpx content are not always str hmmm
@jedie
Copy link
Contributor

jedie commented Mar 7, 2020

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

@pe-st
Copy link
Owner

pe-st commented Mar 18, 2020

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

by more inteligent imports.
@telemaxx
Copy link
Contributor Author

telemaxx commented Mar 19, 2020

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

yes automated tests would be great.

@telemaxx
Copy link
Contributor Author

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

This reverts commit 7f5ff09.
@telemaxx telemaxx closed this Mar 20, 2020
@telemaxx
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants