Repository navigation
fix: allow google-workspace skill scripts to run directly - #5624
Merged
teknium1 merged 2 commits intoApr 6, 2026
Merged
Conversation
- fall back to adding the repo root to sys.path when hermes_constants is not importable - fixes direct execution of setup.py and google_api.py from the repo checkout - keeps the upstream PR scoped to the google-workspace compatibility fix
- avoid hard-coded ~/.hermes paths in the setup and API shorthands - prefer HERMES_HOME with a sane default to /Users/peteradams/.hermes - keep the examples aligned with profile-aware Hermes installs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hermes_constantsis not importable, prepend the repo root tosys.pathHERMES_HOMEinstead of hard-coded~/.hermespathssetup.pyandgoogle_api.pyrun directly from a repo checkout and keeps the docs profile-awareWhy
The current scripts assume
hermes_constantsis already importable. In a normal repo checkout, running:python3 skills/productivity/google-workspace/scripts/setup.py --checkpython3 skills/productivity/google-workspace/scripts/google_api.py --helpcan fail with
ModuleNotFoundError: No module named "hermes_constants".The current skill examples also hard-code
~/.hermes, which is awkward for profile-aware setups that already standardize onHERMES_HOME.This change keeps the runtime behavior the same when imports already work, and only adds a minimal fallback for direct script execution while making the docs match Hermes conventions.
Test Plan
venv/bin/python -m pytest tests/skills/test_google_oauth_setup.py -qvenv/bin/python skills/productivity/google-workspace/scripts/setup.py --checkvenv/bin/python skills/productivity/google-workspace/scripts/google_api.py --help