This is a modern rewrite of my old Strava Äpp. Currently, only read-only statistics features are implemented. For bulk modify of activities and Excel import, please use the old Äpp.
- Code: The source-code is open source.
- Data: The app does not use a database. Your Strava data is only temporarily cached.
- Access: A temporary access token to your Strava profile is used and revoked at logout.
- Cookies: Only a single technical cookie is used for session identification and deleted at end of session. No user tracking.
As my webserver is running Python 3.11, I need to use it locally too. See below.
see install.sh
see run.sh
pre-commit run --all-files
scripts/copy_test_data.sh
pytest --cov --cov-report=html:coverage_reportsee .streamlit/config.toml see .streamlit/secrets.toml
If you want unit test coverage reports in SonarQube, you need to run the sonar check in the GitHub Action pipeline:
- disable the "Automatic Analysis" at https://sonarcloud.io/project/analysis_method?id=entorb_strava-streamlit
- setup SonarSource/sonarqube-scan-action@v5 in check.yml
- rename .sonarcloud.properties to sonar-project.properties
- generate a token at https://sonarcloud.io/account/security
- add this token as secret SONAR_TOKEN in GitHub
- some text to explain features
- activity caching: all or selected years only
- activity geo calculations
- gear download
- activity table
- activity statistics
- activity year summary
- activity active days per year
- known locations edit and list unknown frequent locations
- choose km vs. miles
- calendar export
- why is supervisorctl log empty
supervisorctl tail -f strava-streamlit - reconnect after token expired
- unit tests for act stats
- Strava login
- Strava logout/deauthorize
- Strava token refresh
- Strava logos and buttons
- API response caching for local dev environment
- unit tests using dummy activity data
As my webserver is running Python 3.11, I need to use it locally too.
Variant 1: use venv
.pyenv/versions/3.11.9/bin/python -m venv .venv --prompt $(basename $(pwd))
source .venv/bin/activateVariant 2: use global pyenv
pyenv global 3.11.9
eval "$(pyenv init -)".vscode/settings.json
{
"python.defaultInterpreterPath": ".pyenv/versions/3.11.9/bin/python"
}see https://entorb.net/wickie/Uberspace#Streamlit
mkdir ~/strava-streamlit
# run scripts/deploy.sh
pip3.11 install --user streamlit -r strava-streamlit/requirements.txt
# start it manually (stop by ctrl+c)
streamlit run main.py
# add web backend
uberspace web backend set /strava-streamlit --http --port 8501verify it is working via browser https://entorb.net/strava-streamlit
stop streamlit via ctrl+c
create service vim ~/etc/services.d/strava-streamlit.ini
[program:strava-streamlit]
directory=%(ENV_HOME)s/strava-streamlit
command=python3.11 -O -m streamlit run src/main.py
loglevel=infostart service
supervisorctl reread
supervisorctl update
supervisorctl status
supervisorctl restart strava-streamlit supervisorctl tail -f strava-streamlit
tail -f ~/logs/supervisord.logTODO: why is the output first command not showing the logs?
see deploy.sh