Skip to content

Adding more friendly user documentation#18

Open
MarcChen wants to merge 13 commits intoJayQueue:mainfrom
MarcChen:docs
Open

Adding more friendly user documentation#18
MarcChen wants to merge 13 commits intoJayQueue:mainfrom
MarcChen:docs

Conversation

@MarcChen
Copy link
Copy Markdown

This pull request introduces significant improvements to the MyWhoosh2Garmin project, focusing on automation, developer experience, and documentation. It adds a fully automated GitHub Actions workflow for syncing MyWhoosh (via Strava) activities to Garmin Connect, modernizes environment and dependency management, and completely rewrites the documentation for clarity and ease of setup. Additionally, it removes obsolete local automation scripts and configuration files.

Automation & Workflow Integration:

  • Added a GitHub Actions workflow (.github/workflows/self-hosted-runner.yml) to automate the full Strava-to-Garmin sync process, including environment setup, dependency installation with uv, and secure usage of secrets for authentication.

Developer Experience & Tooling:

  • Introduced a .env-template file to standardize required environment variables for local development and clarify secret usage.
  • Added a .pre-commit-config.yaml with hooks for code quality (trailing whitespace, JSON/TOML checks, and Python linting/formatting via ruff).
  • Removed the obsolete Pipfile in favor of pyproject.toml and the uv package manager, simplifying dependency management.

Documentation Overhaul:

  • Completely rewrote README.md to provide a clear, step-by-step overview of the project, its purpose, architecture, setup, environment variables, workflow, and security best practices.
  • Added a new SETUP.md with detailed instructions for authentication, secret configuration, workflow usage, troubleshooting, and webhook integration for instant sync.

Cleanup of Legacy Scripts:

  • Removed the legacy MyWhooshMonitor.ps1 PowerShell automation script, as the process is now handled via GitHub Actions.

Comment thread strava/client.py Outdated
data_dir = Path(__file__).parent.parent / "data" / "raw"
data_dir.mkdir(parents=True, exist_ok=True)

json_filename = data_dir / f"{activity_name}.json"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please handle special characters in activity_name like for example: "z6 30/15' x12". This activity_name will fail with this line.
btw. awsome job with this PR :)

Comment thread myWhoosh2Garmin.py
for activity in new_activities:
client.downloader.download_activity(activity.id)
file_name = f"{activity.name}.json"
input_path = RAW_FIT_FILE_PATH / file_name
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same issue as in the other comment, file_name with special characters will fail as a path wthout any sanitizing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants