Skip to content

fix: allow google-workspace skill scripts to run directly - #5624

Merged
teknium1 merged 2 commits into
NousResearch:mainfrom
xinbenlv:fix/google-workspace-script-imports
Apr 6, 2026
Merged

teknium1 merged 2 commits into
NousResearch:mainfrom
xinbenlv:fix/google-workspace-script-imports

Conversation

@xinbenlv

@xinbenlv xinbenlv commented Apr 6, 2026 •

Copy link
Copy Markdown

Summary

  • add a small import fallback in the google-workspace skill scripts
  • when hermes_constants is not importable, prepend the repo root to sys.path
  • update the skill examples to use HERMES_HOME instead of hard-coded ~/.hermes paths
  • this lets setup.py and google_api.py run directly from a repo checkout and keeps the docs profile-aware

Why

The current scripts assume hermes_constants is already importable. In a normal repo checkout, running:

  • python3 skills/productivity/google-workspace/scripts/setup.py --check
  • python3 skills/productivity/google-workspace/scripts/google_api.py --help

can 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 on HERMES_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 -q
  • venv/bin/python skills/productivity/google-workspace/scripts/setup.py --check
  • venv/bin/python skills/productivity/google-workspace/scripts/google_api.py --help

xinbenlv added 2 commits April 6, 2026 13:01
- 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
@teknium1
teknium1 merged commit 190471f into NousResearch:main Apr 6, 2026
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.

2 participants