Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
533 commits
Select commit Hold shift + click to select a range
df592b9
Fixing typo in display_json which meant the wrong input was displayed…
psdupvi May 15, 2024
f6ea76f
Bumped Garth for MFA changes
cyberjunky May 27, 2024
3d89366
Merge pull request #205 from psdupvi/master
cyberjunky Jun 8, 2024
5e790b5
Add access to Fitness Age data
fako1024 Jun 22, 2024
1df7b16
Add fitness age data retrieval to example.py
fako1024 Jun 22, 2024
0260f89
minor fixes
tboerstad Jun 23, 2024
b695040
Added methods to modify activity type and extended get activities by …
MareenCZE Jun 29, 2024
9f21da6
Merge pull request #211 from fako1024/master
cyberjunky Jul 6, 2024
34f2dbe
Merge pull request #212 from tboerstad/master
cyberjunky Jul 6, 2024
239dc00
Add access to Fitness Age data by @fako1024
cyberjunky Jul 6, 2024
cd28226
#214 Adding get_activity_typed_splits which contains more split info
psdupvi Jul 8, 2024
a2b2f31
#210 adding graphql endpoint and function. Still need example queries
psdupvi Jul 10, 2024
3f80328
Adding daily wellness event endpoint
psdupvi Jul 10, 2024
388ad31
Adding additional endpoint which includes body battery events, such a…
psdupvi Jul 10, 2024
afd6a1e
Adding to example.py and README
psdupvi Jul 10, 2024
b321177
Undoing formatting changes
psdupvi Jul 10, 2024
0907835
Add endpoint to list activities where certain gear is used. This is u…
Jul 22, 2024
94c9f0c
add intensity minutes method
shoaib42 Sep 9, 2024
dc57566
Merge pull request #215 from psdupvi/master
cyberjunky Sep 23, 2024
8e144b3
Merge pull request #217 from psdupvi/feature/daily-events
cyberjunky Sep 23, 2024
775fc41
Create example_tracking_gear.py
cyberjunky Sep 23, 2024
6ab1893
Merge pull request #218 from kindofblues/master
cyberjunky Sep 23, 2024
5fd1114
Merge branch 'cyberjunky:master' into master
MareenCZE Sep 30, 2024
02c344c
GraphQL Queries example
psdupvi Oct 4, 2024
e7bb9cd
get_activities parameter type hints
psdupvi Oct 4, 2024
4ae7ede
Merge branch 'cyberjunky:master' into add_intensity_minutes
shoaib42 Oct 4, 2024
98a03dc
reset puproject.toml
shoaib42 Oct 4, 2024
000b775
added method: add_weigh_in_with_timestamps()
linuxlurak Oct 5, 2024
b1b98f5
Modifies the switch function option 'p' to create unique activity nam…
mishadcf Oct 13, 2024
3648230
add delete_blood_pressure
bugficks Oct 31, 2024
11a674b
add get_userprofile_settings
bugficks Nov 5, 2024
a4ac319
Update __init__.py
bugficks Nov 6, 2024
b640e14
Merge pull request #224 from MareenCZE/master
cyberjunky Nov 10, 2024
8d3bc01
Merge pull request #225 from psdupvi/feature/#210-graphql-endpoints
cyberjunky Nov 10, 2024
d6c9f4c
Merge pull request #226 from psdupvi/updating_type_hinting
cyberjunky Nov 10, 2024
23d43f7
Merge pull request #227 from shoaib42/add_intensity_minutes
cyberjunky Nov 10, 2024
5072f5e
Merge pull request #229 from linuxlurak/master
cyberjunky Nov 10, 2024
7ee79a7
Merge pull request #230 from mishadcf/fix-activity-overwrite
cyberjunky Nov 10, 2024
e2971b5
Merge pull request #231 from bugficks/delete_blood_pressure
cyberjunky Nov 10, 2024
036fdca
Merge pull request #232 from bugficks/get_userprofile_settings
cyberjunky Nov 10, 2024
6e3a7f0
Corrected syntax of example.py renamed graphql file. Bumped version.
cyberjunky Nov 10, 2024
912f179
Fixed example weigh-in data
cyberjunky Nov 10, 2024
f18d334
Updated README.md
cyberjunky Nov 10, 2024
50c5848
Fixed syntax errors
cyberjunky Nov 10, 2024
8e93c3b
Increase connection pool size
wernerhp Nov 24, 2024
e7e03cc
Merge pull request #234 from wernerhp/patch-1
cyberjunky Nov 24, 2024
bf626a2
Merge branch 'master' of https://github.com/cyberjunky/python-garminc…
cyberjunky Nov 24, 2024
8a003bd
Increased connection pool size
cyberjunky Nov 24, 2024
5c04de9
Applied temp fix for Garmin's API change
cyberjunky Nov 27, 2024
f4f1a1f
Pin withings-sync version to 4.2.5
cyberjunky Nov 27, 2024
7424a02
Updated pdm requirements
cyberjunky Dec 14, 2024
49f3199
Create .coderabbit.yaml
cyberjunky Jan 22, 2025
17a3bf6
doc: fix README example formatting
bradleyjones Feb 8, 2025
f673435
Add project.optional-dependecies to allow install via pip and add exa…
gabmueller Mar 4, 2025
04975a7
Remove quotes from testing dependency group
gabmueller Mar 4, 2025
e5a3a72
Merge pull request #243 from bradleyjones/patch-1
cyberjunky Mar 10, 2025
2013674
Merge pull request #247 from gabmueller/add-project-optional-dependen…
cyberjunky Mar 10, 2025
2a9079c
Bumped garth version, refactored MFA handling
cyberjunky Apr 4, 2025
11a5113
Added missing develeopment requirement
cyberjunky Apr 4, 2025
88e6cdb
Added another missing development requirement
cyberjunky Apr 4, 2025
3aba57e
allow to filter activities by type
pedrorijo91 Apr 9, 2025
196f382
add optional limit of gear activities to fetch
pedrorijo91 Apr 9, 2025
2455375
Update garminconnect/__init__.py
pedrorijo91 Apr 11, 2025
0934086
fix docstring
pedrorijo91 Apr 12, 2025
5ccaf14
Merge pull request #252 from pedrorijo91/feature/filter_activities
cyberjunky Apr 16, 2025
92d2bfa
#253 - Updating Max Metrics URL
psdupvi May 6, 2025
ad63314
Fix Typo in logging message
arpanghosh8453 May 16, 2025
a0504de
fix: import problem found by ruff
yihong0618 May 19, 2025
0699e09
upgrade garth
matin Jun 3, 2025
77389fe
Create dependabot.yml
cyberjunky Jun 5, 2025
29d6e40
Bump garth from 0.5.3 to 0.5.13
dependabot[bot] Jun 5, 2025
5de8221
Merge pull request #261 from cyberjunky/dependabot/pip/garth-0.5.13
cyberjunky Jun 5, 2025
81eb1ad
Merge branch 'master' into update_garth
cyberjunky Jun 5, 2025
153f60c
Merge pull request #259 from matin/update_garth
cyberjunky Jun 5, 2025
6419be8
Merge pull request #258 from yihong0618/hy/fix_import_problem
cyberjunky Jun 5, 2025
8507d82
Merge pull request #257 from arpanghosh8453/patch-1
cyberjunky Jun 5, 2025
43eb7db
Merge pull request #254 from psdupvi/253-max-metrics-url
cyberjunky Jun 5, 2025
9171e76
Save example json repsonses to response.json file
cyberjunky Jun 5, 2025
f343be8
Updated development requirements
cyberjunky Jun 5, 2025
dd6c3da
Bump garth from 0.5.13 to 0.5.15
dependabot[bot] Jun 9, 2025
8abef29
Revert "#253 - Updating Max Metrics URL"
psdupvi Jun 9, 2025
605eead
Merge pull request #262 from cyberjunky/dependabot/pip/garth-0.5.15
cyberjunky Jun 9, 2025
4b6675d
Merge pull request #263 from psdupvi/master
cyberjunky Jun 9, 2025
c279ab3
Revert max metrix url change
cyberjunky Jun 9, 2025
06afcf2
Add available and in-progress badges methods, fix typos and method si…
dpfrakes Jun 17, 2025
127b4b8
PR feedback
dpfrakes Jun 19, 2025
8ed2c71
Bump garth from 0.5.15 to 0.5.17
dependabot[bot] Jun 23, 2025
ce2c1f6
#270 Add Lactate Threshold endpoint
psdupvi Jul 8, 2025
c65d67c
Merge branch 'cyberjunky:master' into master
psdupvi Jul 8, 2025
2192fe0
Adding lactate threshold example
psdupvi Jul 8, 2025
8e7aced
Merge branch 'master' of github.com:psdupvi/python-garminconnect
psdupvi Jul 8, 2025
c1c62b1
Implementing some of the suggestions from CodeRabbit
psdupvi Jul 8, 2025
a7231f5
Implementing some more of the suggestions from CodeRabbit
psdupvi Jul 8, 2025
677462a
Fixing one more typo
psdupvi Jul 8, 2025
3eba56b
Merge pull request #268 from cyberjunky/dependabot/pip/garth-0.5.17
cyberjunky Aug 9, 2025
5ab5624
Merge branch 'cyberjunky:master' into master
psdupvi Aug 12, 2025
d607756
Merge pull request #266 from dpfrakes/master
cyberjunky Aug 31, 2025
512ddb4
Merge pull request #271 from psdupvi/master
cyberjunky Aug 31, 2025
546afe3
Major fixes and enhancements
cyberjunky Aug 31, 2025
44d5b44
Updated README
cyberjunky Aug 31, 2025
e47fa37
Updated README
cyberjunky Aug 31, 2025
7fb0748
Updated README
cyberjunky Aug 31, 2025
facb24b
Updated README
cyberjunky Aug 31, 2025
d2a8395
Revert get_fitnessage call rename
cyberjunky Aug 31, 2025
454cb34
Merge branch 'master' into revamp
cyberjunky Aug 31, 2025
dcde501
Many coderabbit linting and input improvements
cyberjunky Aug 31, 2025
f8fe17f
Syntax fix
cyberjunky Aug 31, 2025
83d174f
Many coderabbit suggestions applied
cyberjunky Aug 31, 2025
0c76494
Fixed CI
cyberjunky Aug 31, 2025
6798dfe
Import fixes
cyberjunky Aug 31, 2025
9b6efb4
Added parameter and return type annotations
cyberjunky Aug 31, 2025
e951899
Implented pdm run codespell
cyberjunky Aug 31, 2025
5edd55c
Minimal python version is now >=3.11
cyberjunky Aug 31, 2025
c119ed5
Back to python >=3.10 support
cyberjunky Aug 31, 2025
7e73afa
Coderabbit enhancements
cyberjunky Aug 31, 2025
dd811d7
Dependabot daily
cyberjunky Aug 31, 2025
19ac302
Virtual env fixes
cyberjunky Aug 31, 2025
cbf4d2b
Remove JSON health report
cyberjunky Aug 31, 2025
2274d8f
Codespell fixes
cyberjunky Aug 31, 2025
67bfff9
Pre-commit install fixes
cyberjunky Aug 31, 2025
078ed4b
Minor fixes
cyberjunky Sep 1, 2025
05adbca
Login fixes
cyberjunky Sep 1, 2025
f03c84f
Recorded new VCR cassettes, some need fixing
cyberjunky Sep 1, 2025
9119f9f
Fixed VCR tests
cyberjunky Sep 1, 2025
866e8af
Fixed linting
cyberjunky Sep 1, 2025
c9f3fd8
Pinned vcr packages
cyberjunky Sep 1, 2025
c361235
CI changes
cyberjunky Sep 1, 2025
d9571b0
Lint fixes
cyberjunky Sep 1, 2025
9ad565c
VCR test fixes
cyberjunky Sep 1, 2025
822f8bf
CI fixes
cyberjunky Sep 1, 2025
dddc8bc
Disable pytests
cyberjunky Sep 1, 2025
c382600
Rabbitcode fixes
cyberjunky Sep 1, 2025
eb2bb08
Lint fixes
cyberjunky Sep 1, 2025
f547e2a
Many coderabbit suggestions applied
cyberjunky Sep 2, 2025
caa80c9
Fixes
cyberjunky Sep 2, 2025
2124c50
Coderabbit fixes
cyberjunky Sep 2, 2025
e53b665
Coderabbit fixes
cyberjunky Sep 3, 2025
ad39345
Coderabbit fixes datestamps etc
cyberjunky Sep 4, 2025
5216d1c
Codebase fixes
cyberjunky Sep 4, 2025
fc6e56b
Coderabbit fixes
cyberjunky Sep 4, 2025
c2a7d18
Coderabbit fixes
cyberjunky Sep 4, 2025
543908d
Coderabbit fixes
cyberjunky Sep 4, 2025
ae2f3fc
Coderabbit fixes
cyberjunky Sep 4, 2025
df262f6
Coderabbit fixes
cyberjunky Sep 4, 2025
f66beaa
Demo and example, bumped garth
cyberjunky Sep 6, 2025
5292381
Fixed issue with exception imports
cyberjunky Sep 6, 2025
6e51793
Small fixes
cyberjunky Sep 6, 2025
9451ce6
Merge pull request #277 from cyberjunky/revamp
cyberjunky Sep 6, 2025
0cddf16
Bump actions/checkout from 4 to 5
dependabot[bot] Sep 6, 2025
ec5eac0
Bump actions/setup-python from 5 to 6
dependabot[bot] Sep 6, 2025
cee7d99
Merge pull request #281 from cyberjunky/dependabot/github_actions/act…
cyberjunky Sep 6, 2025
24bd729
Merge pull request #280 from cyberjunky/dependabot/github_actions/act…
cyberjunky Sep 6, 2025
27e9816
Adding two functions that allow you to add and remove gear from activ…
psdupvi Sep 23, 2025
b92d4f0
Removing trailing slash from garmin_connect_gear_baseurl and updates …
psdupvi Sep 23, 2025
59f5e71
Formatting changes
psdupvi Sep 23, 2025
8458750
Implement training plan list, detail and adaptive detail endpoint
nickknissen Sep 23, 2025
e748add
Add examples of training plan to readme and demo script
nickknissen Sep 23, 2025
ba4abb2
fix: correct spelling of "Traning" to "Training" in readme
nickknissen Sep 24, 2025
80d497e
Adjustment based on CodeRabbit
nickknissen Sep 24, 2025
75c3d1f
Adding interactive demo for adding and removing gear
psdupvi Sep 26, 2025
f0a0be4
Adding demo after adding README
psdupvi Sep 26, 2025
0f4ed77
Adding to execute_api_call
psdupvi Sep 26, 2025
e95765b
Black check and PR feedback
psdupvi Sep 26, 2025
e090a27
Removed '@' check in username check
NoahMLoomis Oct 2, 2025
577bf8a
Only return json if response is not 204 for add_weight_in
NoahMLoomis Oct 2, 2025
6be74b8
Added activity file selector to demo, removed black
cyberjunky Oct 10, 2025
a009263
Code improvement
cyberjunky Oct 10, 2025
7408120
Removed duplicate call
cyberjunky Oct 10, 2025
2b868dc
Code improvement
cyberjunky Oct 10, 2025
db04dc1
CI and doc improvements
cyberjunky Oct 11, 2025
71609d6
Add method to retrieve scheduled workout by ID
federicopellegatta Oct 15, 2025
9016d4c
Add demo for get_scheduled_workout_by_id method
federicopellegatta Oct 15, 2025
e8600cc
Update README with scheduled workout functionality details
federicopellegatta Oct 15, 2025
c58523e
Add activities count endpoint and method to retrieve total activities
Tourniercy Oct 25, 2025
d17087d
Add activities count endpoint and method to retrieve total activities
Tourniercy Oct 25, 2025
68844e4
Fix activities count retrieval to handle missing or invalid data
Tourniercy Oct 26, 2025
e0e887f
Merge pull request #295 from cyberjunky/revamp
cyberjunky Nov 4, 2025
17b55f9
Bump actions/upload-artifact from 4 to 5
dependabot[bot] Nov 4, 2025
9841373
Merge pull request #299 from cyberjunky/dependabot/github_actions/act…
cyberjunky Nov 4, 2025
c00ce0d
Merge pull request #284 from psdupvi/282-assign-gear
cyberjunky Nov 4, 2025
af8af0f
Merge pull request #285 from nickknissen/feat-traning-plans
cyberjunky Nov 4, 2025
76dd194
Merge pull request #287 from NoahMLoomis/master
cyberjunky Nov 4, 2025
feac5a4
Merge pull request #289 from NoahMLoomis/bug/add_weight_in_fix
cyberjunky Nov 4, 2025
950f728
Merge pull request #296 from federicopellegatta/feat/workout-schedule
cyberjunky Nov 4, 2025
80e9ad1
Merge pull request #298 from Tourniercy/add_activities_count
cyberjunky Nov 4, 2025
882c07f
Added count activities to demo
cyberjunky Nov 4, 2025
f5dbc42
Bumped version
cyberjunky Nov 4, 2025
a97c8da
Linting fixes
cyberjunky Nov 4, 2025
42dac05
Add type guards to satify mypy
cyberjunky Nov 4, 2025
c663c10
Add badges to README for project visibility
cyberjunky Nov 9, 2025
25e1388
Added code to handle retired gear
cyberjunky Nov 9, 2025
16ab899
Better fix for retired gear
cyberjunky Nov 9, 2025
664e905
Fixed demo readkey for macOS
cyberjunky Nov 10, 2025
3a5c741
Implement daily lifestyle logging data
fulopm Nov 16, 2025
f2dca42
Bump actions/checkout from 5 to 6
dependabot[bot] Nov 20, 2025
39212a4
fix: correct API endpoint in get_training_plan_by_id
Nov 27, 2025
4e2fa6f
Merge pull request #306 from cyberjunky/dependabot/github_actions/act…
cyberjunky Nov 28, 2025
1a0aaa1
Merge pull request #304 from fulopm/master
cyberjunky Nov 28, 2025
bd0de96
Merge pull request #310 from federicopellegatta/fix/training-plan-by-…
cyberjunky Nov 28, 2025
5f61fc4
Fixed stats, alsways ask for trainingplan ID
cyberjunky Nov 28, 2025
81c0853
Bumped version
cyberjunky Nov 28, 2025
5536d80
Fixed nonetype issue in demo.py
cyberjunky Nov 28, 2025
8e623de
Fetch daily steps in chunks if needed
cyberjunky Nov 28, 2025
c1b3c11
Normalize paths before passing to Garth
cyberjunky Nov 28, 2025
89009d1
Added all workout methods, and demo menu options
cyberjunky Nov 29, 2025
e80c1c0
Update README.md
cyberjunky Nov 29, 2025
62069e3
Fix maxpoly arg to get_activity_details() to allow 0 value
puntonim Dec 12, 2025
69cdba2
Bump actions/upload-artifact from 5 to 6
dependabot[bot] Dec 12, 2025
2a7ca61
power in zones
SebastianBurmester Dec 22, 2025
32d4c64
get cycling ftp functionality
SebastianBurmester Dec 23, 2025
2e9ecdf
Fixed bug in resume_login
cyberjunky Jan 1, 2026
00f11a3
Merge pull request #314 from cyberjunky/dependabot/github_actions/act…
cyberjunky Jan 1, 2026
74fc644
Merge pull request #313 from puntonim/patch-1
cyberjunky Jan 1, 2026
d4a9ee0
Merge pull request #316 from SebastianBurmester/master
cyberjunky Jan 1, 2026
7597c7b
Added new api calls to demo
cyberjunky Jan 1, 2026
ed1b4e4
Cleanup
cyberjunky Jan 1, 2026
b598c9a
Multiple fixes, stricter linting added endpoints
cyberjunky Jan 4, 2026
184ea63
Minor lint fixes
cyberjunky Jan 4, 2026
55f1d1f
Lint fixes
cyberjunky Jan 4, 2026
3a3e4c4
Update garth requirement from <0.6.0,>=0.5.17 to >=0.5.17,<0.7.0
dependabot[bot] Jan 13, 2026
4b54963
fixed demo lint
KopyWasTaken Feb 6, 2026
1e391b3
linting in demo.py PLW0108
BernatNicolau Feb 25, 2026
e923812
Bump actions/upload-artifact from 6 to 7
dependabot[bot] Feb 26, 2026
bdb2ffc
Add schedule_workout method and add to demo
Skydler Mar 3, 2026
5e86633
Run lint and format
Skydler Mar 3, 2026
c77d920
Fix interface issues
Skydler Mar 3, 2026
d101b91
Merge pull request #319 from cyberjunky/dependabot/pip/garth-gte-0.5.…
cyberjunky Mar 16, 2026
aaad91b
Merge pull request #326 from cyberjunky/dependabot/github_actions/act…
cyberjunky Mar 16, 2026
7ee39cb
Merge pull request #325 from BernatNicolau/pr-linting
cyberjunky Mar 16, 2026
d216946
Merge pull request #327 from Skydler/feature/workout-scheduling
cyberjunky Mar 16, 2026
8acc6e9
Merge pull request #323 from KopyWasTaken/master
cyberjunky Mar 16, 2026
2ef1f66
Update README with workout PR changes: fix API counts, add typed work…
cyberjunky Mar 16, 2026
3f7fd8e
Bump version
cyberjunky Mar 16, 2026
1b36526
Add nutrition and golf endpoints to demo, API, and README
cyberjunky Mar 16, 2026
deae79f
Add import_activity method for uploads without Strava re-export (issu…
cyberjunky Mar 16, 2026
02a3b9a
Fix CI: add --target-version py310 to black check
cyberjunky Mar 16, 2026
4d4efd7
CI: switch from black to ruff format check (matches pre-commit)
cyberjunky Mar 16, 2026
fd95cb3
Add get_running_tolerance method (issue #328)
cyberjunky Mar 16, 2026
c1d02ca
Bump version to 0.2.40
cyberjunky Mar 16, 2026
e1cfd30
v0.2.41: Improve login error handling for OAuth 401, fix golf API end…
cyberjunky Mar 17, 2026
ad9a3ff
fix: guard against None display_name in API URLs and fix ValueError c…
cyberjunky Mar 17, 2026
41bf45e
fix: cleaner error messages for 410 Gone and other HTTP errors in dem…
cyberjunky Mar 17, 2026
45cdb2b
docs: use correct link for demo ipynb
ejyager00 Mar 18, 2026
a0f74da
Merge pull request #334 from ejyager00/docs/demo-ipynb-link
cyberjunky Mar 18, 2026
3bfc0f2
Bump garth minimum version to 0.7.1 (auth fixes)
cyberjunky Mar 18, 2026
1cedfc2
Fix workout target type IDs to match Garmin API values
cyberjunky Mar 18, 2026
35d2863
Fix CI: black formatting and update VCR cassettes for display_name sa…
cyberjunky Mar 18, 2026
bcf3032
Fix ruff format check
cyberjunky Mar 18, 2026
418cc3d
Fix 429/auth error display in demo.py and example.py - catch GarminCo…
cyberjunky Mar 19, 2026
e14bfeb
add description to workouts
miki134 Mar 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json # Schema for CodeRabbit configurations
language: "en-US"
early_access: true
reviews:
profile: "assertive"
request_changes_workflow: true
high_level_summary: true
poem: false
review_status: true
collapse_walkthrough: false
auto_review:
enabled: true
drafts: false

path_filters:
- "!tests/**/cassettes/**"
path_instructions:
- path: "tests/**"
instructions: |
- test functions shouldn't have a return type hint
- it's ok to use `assert` instead of `pytest.assume()`
- path: "garminconnect/**"
instructions: |
- prefer modern Python patterns (3.10+)
- use type hints consistently
- follow PEP 8 and modern Python conventions
- suggest performance improvements where applicable
chat:
auto_reply: true
28 changes: 28 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# EditorConfig configuration for code consistency
# https://editorconfig.org/

root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = 88

[*.py]
indent_size = 4

[*.{yml,yaml}]
indent_size = 2

[*.{js,json}]
indent_size = 2

[*.toml]
indent_size = 4

[*.md]
trim_trailing_whitespace = false
13 changes: 13 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# These are supported funding model platforms

github: [cyberjunky] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: daily
time: "20:00"
timezone: "Europe/Amsterdam"

- package-ecosystem: "pip"
directory: "/"
schedule:
interval: daily
time: "20:00"
timezone: "Europe/Amsterdam"
102 changes: 102 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: CI

"on":
push:
branches:
- main
- master
- revamp
pull_request:
branches:
- main
- master

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v6

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pdm
pdm install --group :all

- name: Lint with ruff
run: |
pdm run ruff check .

- name: Format check with ruff
run: |
pdm run ruff format --check .

- name: Type check with mypy
run: |
pdm run mypy garminconnect --ignore-missing-imports

# - name: Test with pytest
# env:
# GARMINTOKENS: ${{ secrets.GARMINTOKENS }}
# run: |
# # Use existing VCR cassettes for CI to avoid network calls
# pdm run pytest tests/ -v --tb=short --vcr-record=none
# continue-on-error: false

# - name: Upload coverage reports
# if: matrix.python-version == '3.11'
# env:
# GARMINTOKENS: ${{ secrets.GARMINTOKENS }}
# run: |
# pdm run coverage run -m pytest -v --tb=short --vcr-record=none
# pdm run coverage xml
# continue-on-error: true

- name: Check for coverage report
id: coverage_check
run: |
if [ -f coverage.xml ]; then
echo "coverage_generated=true" >> "$GITHUB_OUTPUT"
else
echo "coverage_generated=false" >> "$GITHUB_OUTPUT"
fi

- name: Upload coverage artifact
if: matrix.python-version == '3.11' && steps.coverage_check.outputs.coverage_generated == 'true'
uses: actions/upload-artifact@v7
with:
name: coverage-xml
path: coverage.xml

security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.11"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install bandit[toml] safety

- name: Security check with bandit
run: |
bandit -r garminconnect -f json -o bandit-report.json || true

- name: Safety check
run: |
safety check --json --output safety-report.json || true
continue-on-error: true
19 changes: 19 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# Custom
your_data/
pdm.lock
garth/

# Virtual environments
.venv/
.pdm-python

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down Expand Up @@ -33,6 +42,12 @@ MANIFEST
*.manifest
*.spec

# PyCharm idea folder
.idea/

# VS Code
.vscode/

# Installer logs
pip-log.txt
pip-delete-this-directory.txt
Expand Down Expand Up @@ -103,6 +118,7 @@ celerybeat.pid

# Environments
.env
.envrc
.venv
env/
venv/
Expand All @@ -127,3 +143,6 @@ dmypy.json

# Pyre type checker
.pyre/

# Ignore folder for local testing
ignore/
42 changes: 42 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
exclude: '.*\.ipynb$'

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-yaml
args: ['--unsafe']
- id: check-toml
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
hooks:
- id: codespell
additional_dependencies:
- tomli
exclude: 'cassettes/'

# Removed black - using ruff-format instead to avoid formatting conflicts
# - repo: https://github.com/psf/black
# rev: 24.8.0
# hooks:
# - id: black
# language_version: python3

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.11
hooks:
- id: ruff
args: [--fix, --unsafe-fixes]
- id: ruff-format

- repo: local
hooks:
- id: mypy
name: mypy type checking
entry: bash -c 'cd "$PWD" && .venv/bin/mypy garminconnect tests'
types: [python]
language: system
pass_filenames: false
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"python.testing.pytestArgs": [
"tests"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 Ron Klinkien
Copyright (c) 2020-2026 Ron Klinkien

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading