Skip to content

Commit

Permalink
Merge branch 'upstream'
Browse files Browse the repository at this point in the history
* upstream: (21 commits)
  feat:support for download Garmin fit file (yihong0618#446)
  fix: yihong0618#443
  doc: info only run
  fix: strava same logic as garmin
  Fix ci (yihong0618#444)
  refactor(privacy): for-loop to list-comprehension and typo fix
  style: black format
  fix(privacy): using strava way to hidding polyline
  fix: catch ValueError for non-number RANGES
  docs: adding eindex workouts page
  feat(privacy): ignore start, end and choose points
  chore: remove unnecessary <div> tags to reduce dom node nesting
  chore: use <></> instead of the root node of the components to improve rendering performance
  style:add default value for use_fake_garmin_device
  feat:add garmin device in strava_to_garmin_sync script
  fix: drop useless log
  refactor: use event delegation to handle all <rect> & <polyline> in the "Total" view.
  申请加入
  Update utils.js
  城市分割问题修改
  ...

# Conflicts:
#	.github/workflows/run_data_sync.yml
#	README-CN.md
#	README.md
#	requirements.txt
#	scripts/garmin_sync.py
#	scripts/generator/__init__.py
#	src/components/LocationStat/index.jsx
#	src/components/RunMap/RunMapButtons.jsx
#	src/components/RunTable/RunRow.jsx
#	src/components/SVGStat/index.jsx
#	src/components/YearStat/index.jsx
#	src/pages/index.jsx
  • Loading branch information
ben-29 committed Jul 8, 2023
2 parents 0cf090a + a9a3f78 commit b8abd80
Show file tree
Hide file tree
Showing 30 changed files with 1,829 additions and 312 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,18 @@ jobs:
strategy:
max-parallel: 4
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: ['3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
# from pdm
- name: Set Variables
- name: Set Variables and install dep
id: set_variables
run: |
sudo apt-get install libxml2-dev libxslt-dev python3-dev
echo "PY=$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')" >> $GITHUB_OUTPUT
echo "PIP_CACHE=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: Cache PIP
Expand Down
24 changes: 17 additions & 7 deletions .github/workflows/run_data_sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Run Data Sync
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
- cron: '0 0 * * *'
push:
branches:
- master
Expand All @@ -26,25 +26,32 @@ env:
TITLE: Workouts
MIN_GRID_DISTANCE: 10 # change min distance here
TITLE_GRID: Over 10km Workouts # also here
GITHUB_NAME: ben_29
GITHUB_EMAIL: ben_29@live.com
GITHUB_NAME: ben_29 # change to yours
GITHUB_EMAIL: ben_29@live.com # change to yours

# IGNORE_BEFORE_SAVING: True # if you want to ignore some data before saving, set this to True
IGNORE_START_END_RANGE: 0 # Unit meter
# Dont making this huge, just picking points you needing. https://developers.google.com/maps/documentation/utilities/polylineutility using this tool to making your polyline
IGNORE_POLYLINE: ""
IGNORE_RANGE: 0 # Unit meter

jobs:
sync:
name: Sync
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3.8

# from pdm
# from pdm and install dep
- name: Set Variables
id: set_variables
run: |
sudo apt-get install libxml2-dev libxslt-dev python3-dev
echo "PY=$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')" >> $GITHUB_OUTPUT
echo "PIP_CACHE=$(pip cache dir)" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -78,6 +85,7 @@ jobs:
if: env.RUN_TYPE == 'strava'
run: |
python scripts/strava_sync.py ${{ secrets.STRAVA_CLIENT_ID }} ${{ secrets.STRAVA_CLIENT_SECRET }} ${{ secrets.STRAVA_CLIENT_REFRESH_TOKEN }}
# python scripts/garmin_sync.py ${{ secrets.GARMIN_EMAIL }} ${{ secrets.GARMIN_PASSWORD }} --only-run --is-cn

- name: Run sync Codoon script
if: env.RUN_TYPE == 'codoon'
Expand All @@ -96,6 +104,8 @@ jobs:
if: env.RUN_TYPE == 'garmin_cn'
run: |
python scripts/garmin_sync.py ${{ secrets.GARMIN_CN_EMAIL }} ${{ secrets.GARMIN_CN_PASSWORD }} --is-cn
# If you only want to sync `type running` add args --only-run, default script is to sync all data (rides and runs).
# python scripts/garmin_sync.py ${{ secrets.GARMIN_EMAIL }} ${{ secrets.GARMIN_PASSWORD }} --only-run --is-cn

- name: Run sync Only GPX script
if: env.RUN_TYPE == 'only_gpx'
Expand Down
Empty file added FIT_OUT/.gitkeep
Empty file.
Loading

0 comments on commit b8abd80

Please sign in to comment.