Skip to content

Commit 79d0087

Browse files
committed
merge develop: version fixup
2 parents 096151f + 3f9e2cc commit 79d0087

12 files changed

+38
-25
lines changed

Jupyter/activities.ipynb

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,17 @@
8080
" if activity:\n",
8181
" if activity.is_steps_activity():\n",
8282
" steps_activity = StepsActivities.get(garmin_act_db, activity.activity_id)\n",
83-
" return [activity.activity_id, activity.name, activity.type, activity.sport, format_number(activity.distance, 1), activity.elapsed_time, format_number(activity.avg_speed, 1), steps_activity.avg_pace, format_number(activity.calories)]\n",
84-
" return [activity.activity_id, activity.name, activity.type, activity.sport, format_number(activity.distance, 1), activity.elapsed_time, format_number(activity.avg_speed, 1), '', format_number(activity.calories)]\n",
83+
" return [activity.activity_id, activity.name, activity.type, activity.sport, format_number(activity.distance, 1), activity.elapsed_time, format_number(activity.avg_speed, 1),\n",
84+
" steps_activity.avg_pace, format_number(activity.calories), format_number(activity.training_load, 1), activity.self_eval_feel, activity.self_eval_effort]\n",
85+
" return [activity.activity_id, activity.name, activity.type, activity.sport, format_number(activity.distance, 1), activity.elapsed_time, format_number(activity.avg_speed, 1), '',\n",
86+
" format_number(activity.calories), format_number(activity.training_load, 1), activity.self_eval_feel, activity.self_eval_effort]\n",
8587
" return ['', '', '', '', '', '', '', '', '']\n",
8688
"\n",
8789
"activities = Activities.get_latest(garmin_act_db, 10)\n",
8890
"rows = [__format_activity(activity) for activity in activities]\n",
8991
"doc.add_heading(\"Last Ten Activities\", 3)\n",
90-
"doc.add_table(['Id', 'Name', 'Type', 'Sport', f'Distance ({distance_units})', 'Elapsed Time', f'Speed ({unit_strings[fitfile.units.UnitTypes.speed]})', f'Pace ({unit_strings[fitfile.units.UnitTypes.pace]})', 'Calories'], rows)\n",
92+
"doc.add_table(['Id', 'Name', 'Type', 'Sport', f'Distance ({distance_units})', 'Elapsed Time', f'Speed ({unit_strings[fitfile.units.UnitTypes.speed]})',\n",
93+
" f'Pace ({unit_strings[fitfile.units.UnitTypes.pace]})', 'Calories', 'Training Load', 'Feel', 'Effort'], rows)\n",
9194
"\n",
9295
"rows = []\n",
9396
"for display_activity in gc_config.display_activities():\n",
@@ -98,7 +101,8 @@
98101
" rows.append([f'Longest {name}'] + __format_activity(Activities.get_longest_by_sport(garmin_act_db, display_activity)))\n",
99102
"\n",
100103
"doc.add_heading(\"Interesting Activities\", 3)\n",
101-
"doc.add_table(['What', 'Id', 'Name', 'Type', 'Sport', f'Distance ({distance_units})', 'Elapsed Time', f'Speed ({unit_strings[fitfile.units.UnitTypes.speed]})', f'Pace ({unit_strings[fitfile.units.UnitTypes.pace]})', 'Calories'], rows)\n",
104+
"doc.add_table(['What', 'Id', 'Name', 'Type', 'Sport', f'Distance ({distance_units})', 'Elapsed Time', f'Speed ({unit_strings[fitfile.units.UnitTypes.speed]})',\n",
105+
" f'Pace ({unit_strings[fitfile.units.UnitTypes.pace]})', 'Calories', 'Training Load', 'Feel', 'Effort'], rows)\n",
102106
"\n",
103107
"doc.add_heading(\"Courses\", 3)\n",
104108
"courses = Activities.get_col_distinct(garmin_act_db, Activities.course_id)\n",
@@ -126,7 +130,7 @@
126130
"name": "python",
127131
"nbconvert_exporter": "python",
128132
"pygments_lexer": "ipython3",
129-
"version": "3.11.4"
133+
"version": "3.11.7"
130134
},
131135
"orig_nbformat": 4
132136
},

Jupyter/activity.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@
5050
"doc.add_table(\n",
5151
" [\n",
5252
" 'Start', 'Id', 'Sport', 'Type', f'Distance ({distance_units})', \"Ellapsed Time\", \"Moving Time\", 'Avg HR', 'Max HR', 'Avg RR', 'Max RR', f'Gained ({altitude_units})', f'Lost ({altitude_units})',\n",
53-
" \"Calories\", f\"Avg Temp (deg {temp_units})\", 'Start Location', 'End Location'\n",
53+
" \"Calories\", 'Training Load', f\"Avg Temp (deg {temp_units})\", 'Start Location', 'End Location', \"Feel\", \"Effort\"\n",
5454
" ],\n",
5555
" [\n",
5656
" [\n",
5757
" activity.start_time, activity_id, activity.sport, activity.type, format_distance(activity.distance), activity.elapsed_time, activity.moving_time, activity.avg_hr, activity.max_hr,\n",
58-
" format_number(activity.avg_rr), format_number(activity.max_rr), format_number(activity.ascent), format_number(activity.descent),\n",
59-
" activity.calories, format_temp(activity.avg_temperature), linked_location(start_loc), linked_location(end_loc)\n",
58+
" format_number(activity.avg_rr), format_number(activity.max_rr), format_number(activity.ascent), format_number(activity.descent), activity.calories,\n",
59+
" format_number(activity.training_load, 1), format_temp(activity.avg_temperature), linked_location(start_loc), linked_location(end_loc), activity.self_eval_feel, activity.self_eval_effort\n",
6060
" ]\n",
6161
" ]\n",
6262
")\n",
@@ -141,7 +141,7 @@
141141
"name": "python",
142142
"nbconvert_exporter": "python",
143143
"pygments_lexer": "ipython3",
144-
"version": "3.11.4"
144+
"version": "3.11.7"
145145
},
146146
"orig_nbformat": 4
147147
},

Jupyter/jupyter_funcs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ def format_weight(distance, digits=1):
3939

4040
def linked_location(location):
4141
"""Return a location as markdown formatted linked text."""
42-
return snakemd.Inline(location.display(), location.to_google_maps_url())
42+
return snakemd.Inline(location.display(), link=location.to_google_maps_url())

Jupyter/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
garmindb>=3.2.8
2-
snakemd==2.1.0
2+
snakemd==2.2.0
33
ipykernel==6.25.1
44
ipywidgets==7.7.2
55
ipyleaflet==0.17.3

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ all: update_dbs
1919
# install all needed code
2020
setup_repo: $(CONF_DIR)/GarminConnectConfig.json $(PROJECT_BASE)/.venv submodules_update
2121

22-
setup_install: deps devdeps install_all
22+
setup_install: version_check deps devdeps install_all
2323

2424
setup: setup_repo setup_install
2525

@@ -68,6 +68,9 @@ $(PROJECT_BASE)/.venv:
6868
clean_venv:
6969
rm -rf $(PROJECT_BASE)/.venv
7070

71+
version_check:
72+
python -c 'import sys; import garmindb.version; garmindb.version.python_dev_version_check(sys.argv[0])'
73+
7174
update: submodules_update
7275
git pull
7376

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ Jupyter notebooks for analzing data from the database can be found in the 'Jupyt
5656

5757
Plugins allow the user to expand the types of data that are processed and stored in the database. GarminDb already has a number of plugins for handling data from third-party Connect IQ apps and data fields. Read more about plugins [here](https://github.com/tcgoetz/GarminDbPlugins).
5858

59+
# Support This Project
60+
61+
Do you find this project useful? <a href="https://www.buymeacoffee.com/tcgoetz" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174"></a>
62+
5963
# Success Stories
6064

6165
Find out who's using GarminDb on what platforms, OSes, and python versions [here](https://github.com/tcgoetz/GarminDB/wiki/Success-Stories). If you're using GarminDB and your scenario isn't listed send me a message or file an issue with your success case.

dev-requirements.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
flake8==6.1.0
2-
build==0.10.0
3-
wheel==0.41.1
4-
twine==4.0.2
1+
flake8==7.0.0
2+
build==1.0.3
3+
wheel==0.42.0
4+
twine==5.0.0

garmindb/garmin_json_data.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,6 @@ def get_self_eval_feel(cls, value):
293293
"""Return the Garmin Connect self evaluation 'How did you feel' label for the activity."""
294294
levels = [(100, "Very Strong"), (75, "Strong"), (50, "Normal"), (25, "Weak"), (0, "Very Weak")]
295295
for threshold, label in levels:
296-
print(f"Threshold {threshold} label {label}")
297296
if value >= threshold:
298297
return label
299298

@@ -303,7 +302,6 @@ def get_self_eval_effort(cls, value):
303302
levels = [(100, "Maximum"), (90, "Extremely Hard"), (70, "Very Hard"), (50, "Hard"),
304303
(40, "Somewhat Hard"), (30, "Moderate"), (20, "Light"), (10, "Very Light"), (0, "None")]
305304
for threshold, label in levels:
306-
print(f"Threshold {threshold} label {label}")
307305
if value >= threshold:
308306
return label
309307

garmindb/version.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import idbutils.version as uv
88

9-
from .version_info import python_required, python_tested, version_info, prerelease
9+
from .version_info import dev_python_required, python_required, python_tested, version_info, prerelease
1010

1111

1212
version_string = uv.to_string(version_info, prerelease)
@@ -23,5 +23,10 @@ def log_version(program):
2323

2424

2525
def python_version_check(program):
26-
"""Validate the Python version requirements."""
26+
"""Validate the Python version requirements for a pip installed package."""
2727
uv.python_version_check(program, python_required, python_tested)
28+
29+
30+
def python_dev_version_check(program):
31+
"""Validate the Python version requirements for development."""
32+
uv.python_version_check(program, dev_python_required, python_tested, verbose=True)

garmindb/version_info.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77

88
python_required = (3, 0, 0)
9+
dev_python_required = (3, 9, 0)
910
python_tested = (3, 11, 4)
1011
version_info = (3, 5, 3)
1112
prerelease = False

requirements.in

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
sqlalchemy~=2.0.25
2-
requests
1+
sqlalchemy~=2.0.27
32
python-dateutil
43
cached-property
54
tqdm

requirements.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
SQLAlchemy==2.0.25
2-
requests==2.31.0
1+
SQLAlchemy==2.0.27
32
python-dateutil==2.8.2
43
cached-property==1.5.2
5-
tqdm==4.65.1
4+
tqdm==4.66.2
65
garth>=0.4.44
76
fitfile>=1.1.7
87
tcxfile>=1.0.4

0 commit comments

Comments
 (0)