-
Notifications
You must be signed in to change notification settings - Fork 352
refactor(shell): Allow .venv activation in setup_python.sh, and other small fixes.
#161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Enforce 2-space indent and 80-character column limit. - Echo commands without the backslash flag and default value. - Fix `setup.sh` by creating parent folder recursively if file does not exists.
|
This change also brings back |
|
@RichardTang-Aden Apologies, I just found |
|
Let's use setup-python.sh. We will follow snake_case for all Python files. However, for config, scripts, shell files (such as JSON, TS, and SH) files—we should use hyphens (-). |
|
Potential Issues Found The pattern [.sh] only matches a file literally named .sh, not files with .sh extension. It should be [*.sh].
These are missing the escape character (\033 or \e). They should be: Currently, the scripts will print literal [92m text instead of colored output.
This condition can never be true at this point because lines 54-58 already exit if Python < 3.11. This is dead code.
|
…CMD in a literal string because Windows users may have whitespace in their path
Thanks for the review. I will be more diligent in checking my contribution in the next request. |
RichardTang-Aden
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and the shell worked well for me. Thanks for contributing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any reason renaming scripts/setup-python.sh to scripts/setup_python.sh? It seems that setup-python is still used in other places.

Description
Enforce 80-character column limit.
This configuration is preferred by Google Shell Style Guide. Also enforces 2-space indentation already defined in EditorConfig.
Echo commands without the backslash flag and default value.
The
-eflag can be safely removed because the ASCII code is embedded in the color definitions. Also removes the default value"", printing an empty line is already the expected output ofecho.Fix
setup.shby creating the parent folder recursively if the file does not exist.writeFileSyncmay throw an error if the parent directory does not exist. Wrap the call in a function that prepares the parent directory before writing the file.Declare a function if logic is reused at least twice.
Created functions
warn,die,is_installedandis_file.Type of Change
Changes Made
.editorconfig
config.yaml.example
core/setup_mcp.sh
scripts/generate-env.ts
scripts/setup.sh
scripts/setup-python.sh → scripts/setup_python.sh
PEP encourages underscore instead of dash as a separator.
Testing
Describe the tests you ran to verify your changes:
cd core && pytest tests/)cd core && ruff check .)Checklist