Skip to content

Commit

Permalink
Merge branch 'release/v3.6.15'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sander Roosendaal committed Nov 26, 2024
2 parents 4d0486c + b745e44 commit 13d5373
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions build/lib/rowingdata/rowingdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from six.moves import range
from six.moves import input

__version__ = "3.6.12"
__version__ = "3.6.14"

from collections import Counter

Expand Down Expand Up @@ -1997,7 +1997,7 @@ def __init__(self, *args, **kwargs):
# 'limpw_ut1','limpw_ut2',
'pw_an','pw_at','pw_max','pw_tr','pw_ut1','pw_ut2',
# 'lim_max','hr_max',
' latitude',' longitude']
' latitude',' longitude','check_factor']

# check for missing column names
mandatorynames = [
Expand Down
4 changes: 2 additions & 2 deletions rowingdata/rowingdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from six.moves import range
from six.moves import input

__version__ = "3.6.14"
__version__ = "3.6.15"

from collections import Counter

Expand Down Expand Up @@ -2269,7 +2269,7 @@ def __init__(self, *args, **kwargs):
'limpw_an','limpw_at','limpw_tr',
'limpw_ut1','limpw_ut2',
'pw_an','pw_at','pw_max','pw_tr','pw_ut1','pw_ut2',
'lim_max','hr_max',
'lim_max','hr_max','check_factor',
' latitude',' longitude']

# check for missing column names
Expand Down
9 changes: 8 additions & 1 deletion rowingdata/tcxtools.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,13 @@ def tcxtodf3(path):
speed_node = trackpoint.find(".//{http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2}Speed")
speed = float(clean_string(speed_node.text)) if speed_node is not None else 0

check_factor = trackpoint.find(".//{http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2}Check")
try:
check_factor = float(clean_string(check_factor.text)) if check_factor is not None else 0
except ValueError:
check_factor = 0


cadence_node = trackpoint.find(".//{http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2}Cadence")
try:
cadence = int(clean_string(cadence_node.text)) if cadence_node is not None else 0
Expand Down Expand Up @@ -412,12 +419,12 @@ def tcxtodf3(path):
'Watts': watts,
'lapid': lap_id,
'Speed': speed,
'check_factor': check_factor,
' WorkoutState': workoutstate
})

# Create a Pandas DataFrame from the activity data
df = pd.DataFrame(activity_data)
return df
except ET.ParseError as e:
print(e)
return pd.DataFrame()

0 comments on commit 13d5373

Please sign in to comment.