[PR #250] [CLOSED] chore: improve develop.sh and install.sh with better error handling #314

Closed
opened 2026-10-26 21:16:10 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/deepseek-ai/DeepGEMM/pull/250
Author: @yurekami
Created: 12/25/2025
Status: ❌ Closed

Base: main ← Head: chore/improve-shell-scripts


📝 Commits (1)

  • 66927ee chore: improve develop.sh and install.sh with better error handling

📊 Changes

2 files changed (+118 additions, -9 deletions)

View changed files

📝 develop.sh (+54 -5)
📝 install.sh (+64 -4)

📄 Description

Summary

Improve develop.sh and install.sh scripts with better error handling, prerequisite checks, and user feedback.

Changes

Both Scripts

  • Bash strict mode: Added set -euo pipefail for better error detection
  • Colored output: Green for success, yellow for warnings, red for errors
  • Prerequisite checks:
    • Verify Python is available
    • Verify pip is available (install.sh only)
    • Check CUDA_HOME or fallback to /usr/local/cuda
  • Automatic submodule init: Initialize submodules if missing
  • Proper cleanup: Use trap to ensure directory is restored on exit
  • Success messages: Show helpful next steps after completion

develop.sh Improvements

# Before
python setup.py build
# After
echo "Building DeepGEMM..."
python setup.py build
echo -e "${GREEN}Development environment setup complete!${NC}"
echo "You can now run tests with:"
echo "  python tests/test_core.py"

install.sh Improvements

# Before
pip install dist/*.whl --force-reinstall
# After
wheel_file=$(find dist -name "*.whl" -type f | head -n 1)
pip install "$wheel_file" --force-reinstall
echo "You can verify the installation with:"
echo "  python -c \"import deep_gemm; print(deep_gemm.__path__)\""

Benefits

  • Better debugging: Script fails fast on errors with meaningful messages
  • Smoother onboarding: New contributors get clear feedback
  • Robustness: Handles missing prerequisites gracefully
  • Consistency: Both scripts follow the same patterns

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/deepseek-ai/DeepGEMM/pull/250 **Author:** [@yurekami](https://github.com/yurekami) **Created:** 12/25/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `chore/improve-shell-scripts` --- ### 📝 Commits (1) - [`66927ee`](https://github.com/deepseek-ai/DeepGEMM/commit/66927ee049768549ea359ab4d57dbae4ee63c7de) chore: improve develop.sh and install.sh with better error handling ### 📊 Changes **2 files changed** (+118 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `develop.sh` (+54 -5) 📝 `install.sh` (+64 -4) </details> ### 📄 Description ## Summary Improve `develop.sh` and `install.sh` scripts with better error handling, prerequisite checks, and user feedback. ## Changes ### Both Scripts - **Bash strict mode**: Added `set -euo pipefail` for better error detection - **Colored output**: Green for success, yellow for warnings, red for errors - **Prerequisite checks**: - Verify Python is available - Verify pip is available (install.sh only) - Check CUDA_HOME or fallback to /usr/local/cuda - **Automatic submodule init**: Initialize submodules if missing - **Proper cleanup**: Use `trap` to ensure directory is restored on exit - **Success messages**: Show helpful next steps after completion ### develop.sh Improvements ```bash # Before python setup.py build # After echo "Building DeepGEMM..." python setup.py build echo -e "${GREEN}Development environment setup complete!${NC}" echo "You can now run tests with:" echo " python tests/test_core.py" ``` ### install.sh Improvements ```bash # Before pip install dist/*.whl --force-reinstall # After wheel_file=$(find dist -name "*.whl" -type f | head -n 1) pip install "$wheel_file" --force-reinstall echo "You can verify the installation with:" echo " python -c \"import deep_gemm; print(deep_gemm.__path__)\"" ``` ## Benefits - **Better debugging**: Script fails fast on errors with meaningful messages - **Smoother onboarding**: New contributors get clear feedback - **Robustness**: Handles missing prerequisites gracefully - **Consistency**: Both scripts follow the same patterns 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-26 21:16:10 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/DeepGEMM#314
No description provided.