mirror of
https://github.com/SuperClaude-Org/SuperClaude_Framework.git
synced 2025-12-17 17:56:46 +00:00
* feat: add missing install.sh script referenced in README\n\n- Create comprehensive installation script with POSIX compatibility\n- Add interactive and non-interactive installation modes\n- Include prerequisites checking and MCP server setup guidance\n- Replace echo -e with printf for better POSIX compliance * fix: resolve linting errors in install_mcp.py and clean_command_names.py Fix multiple ruff linting errors to ensure CI/CD pipeline passes: - install_mcp.py: Remove unused pathlib.Path import, replace bare except with specific exception types (ValueError, IndexError), remove extraneous f-string prefixes on lines without placeholders - clean_command_names.py: Remove unused os import, convert f-strings without placeholders to regular strings - pyproject.toml: Exclude docs/ directory from ruff checks to avoid N999 module naming violations in documentation templates All linting checks now pass successfully. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * style: apply ruff format to Python source files Apply ruff formatting rules to CLI and scripts modules to ensure consistent code style across the codebase. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix(ci): remove incompatible pip cache from quick-check workflow ## Problem GitHub Actions was failing with error: "Cache folder path is retrieved for pip but doesn't exist on disk: /home/runner/.cache/pip. This likely indicates that there are no dependencies to cache." ## Root Cause The quick-check.yml workflow specified `cache: 'pip'` in the Python setup step, but the workflow uses UV (not pip) for package management via `uv pip install --system -e ".[dev]"`. UV uses its own cache directory (~/.cache/uv), so the pip cache path was never created, causing the error. This was a migration oversight: - When UV was adopted as the project standard (commit 00706f0), the CLAUDE.md established "CRITICAL: Never use pip directly" rule - The test.yml workflow was created correctly without pip cache - The quick-check.yml workflow incorrectly included pip cache from initial creation (commit 8c0559c) and was not updated during migration ## Solution Remove `cache: 'pip'` line to align with: - Project's UV-first architecture (CLAUDE.md) - test.yml workflow (which runs successfully without pip cache) - readme-quality-check.yml workflow (no cache needed) Note: publish-pypi.yml intentionally uses pip cache as it directly runs `python -m pip install` commands, which is correct for that workflow. ## Impact - ✅ Eliminates GitHub Actions cache warning - ✅ Aligns all UV-based workflows consistently - ✅ Follows project standards documented in CLAUDE.md 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
SuperClaude PyPI Publishing Scripts
This directory contains scripts for building and publishing SuperClaude to PyPI.
Scripts
publish.sh - Main Publishing Script
Easy-to-use shell script for common publishing tasks:
# Test upload to TestPyPI
./scripts/publish.sh test
# Test installation from TestPyPI
./scripts/publish.sh test-install
# Production upload to PyPI
./scripts/publish.sh prod
# Build package only
./scripts/publish.sh build
# Clean build artifacts
./scripts/publish.sh clean
# Validate project structure
./scripts/publish.sh check
build_and_upload.py - Advanced Build Script
Python script with detailed control over the build and upload process:
# Build and upload to TestPyPI
python scripts/build_and_upload.py --testpypi
# Test installation from TestPyPI
python scripts/build_and_upload.py --testpypi --test-install
# Production upload (with confirmation)
python scripts/build_and_upload.py
# Skip validation (for faster builds)
python scripts/build_and_upload.py --skip-validation --testpypi
# Clean only
python scripts/build_and_upload.py --clean
Prerequisites
- PyPI Account: Register at https://pypi.org/account/register/
- API Tokens: Generate tokens at https://pypi.org/manage/account/
- Configuration: Create
~/.pypirc:[pypi] username = __token__ password = pypi-[your-production-token] [testpypi] repository = https://test.pypi.org/legacy/ username = __token__ password = pypi-[your-test-token]
GitHub Actions
The .github/workflows/publish-pypi.yml workflow automates publishing:
- Automatic: Publishes to PyPI when a GitHub release is created
- Manual: Can be triggered manually for TestPyPI uploads
- Validation: Includes package validation and installation testing
Required Secrets
Set these in your GitHub repository settings → Secrets and variables → Actions:
PYPI_API_TOKEN: Production PyPI tokenTEST_PYPI_API_TOKEN: TestPyPI token
Publishing Workflow
1. Development Release (TestPyPI)
# Test the build and upload process
./scripts/publish.sh test
# Verify the package installs correctly
./scripts/publish.sh test-install
2. Production Release (PyPI)
Option A: Manual
# Upload directly (requires confirmation)
./scripts/publish.sh prod
Option B: GitHub Release (Recommended)
- Update version in code
- Commit and push changes
- Create a new release on GitHub
- GitHub Actions will automatically build and publish
Version Management
Before publishing, ensure version consistency across:
pyproject.tomlsuperclaude/__init__.pysuperclaude/__main__.pysetup/__init__.py
The build script validates version consistency automatically.
Troubleshooting
Build Failures
- Check Python version compatibility (≥3.8)
- Ensure all required files are present
- Validate
pyproject.tomlsyntax
Upload Failures
- Verify API tokens are correct
- Check if version already exists on PyPI
- Ensure package name is available
Import Failures
- Check package structure (
__init__.pyfiles) - Verify all dependencies are listed
- Test local installation first
Security Notes
- Never commit API tokens to version control
- Use environment variables or
.pypircfor credentials - Tokens should have minimal required permissions
- Consider using Trusted Publishing for GitHub Actions