-
Notifications
You must be signed in to change notification settings - Fork 3
feat(copilot): Development Copilot implementation #412
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
Conversation
Add hook integration tests validating: - Hook chain execution order (SessionStart → Stop) - settings.json configuration for all lifecycle events - Hook script existence and functionality - Definition of Done pattern enforcement - Test-runner modes for physics and coverage validation Tests verify existing hook infrastructure without requiring actual file edits or git operations. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add Core Dev Loop slash commands: - /swp:dev:implement - Guided feature/fix implementation - Analysis, planning, and execution phases - Physics validation for core/instabilities modules - Hook-based Definition of Done pattern - /swp:dev:fix-tests - Guided test failure recovery - 6 failure categories with targeted fixes - DataFrame pattern recovery guide - Physics constraint validation Both commands leverage existing hooks as validation layer. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add DataFrame patterns tooling: - /swp:dev:dataframe-audit - Audit command for M/C/S patterns - dataframe-patterns.yml - ast-grep rules (advisory mode) - swp-df-001: Prefer .xs() over boolean indexing - swp-df-002: Chain reorder_levels with sort_index - swp-df-003: Use transpose-groupby pattern - swp-df-004: Validate MultiIndex names - swp-df-005: Check duplicate columns - swp-df-006: Level parameter usage - test_contracts_dataframe.py - 23 contract tests covering: - MultiIndex structure validation (M/C/S names, 3 levels) - Ion data requirements (M/C names, required columns) - Cross-section patterns (.xs() usage) - Reorder levels + sort_index chain - Groupby transpose pattern - Column duplication prevention - Level-specific operations 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add Class Usage slice: - /swp:dev:refactor-class - Analyze and refactor class patterns - Class hierarchy documentation (Core → Base → Plasma/Ion/etc) - Constructor validation patterns - Species handling rules - class-patterns.yml - ast-grep rules (advisory mode) - swp-class-001: Plasma constructor requires species - swp-class-002: Ion constructor requires species - swp-class-003: Spacecraft requires name and frame - swp-class-004: xs() should specify axis and level - swp-class-005: super().__init__() pattern - swp-class-006: Plasma attribute access via __getattr__ - test_contracts_class.py - 35 contract tests covering: - Class hierarchy inheritance - Core/Base class initialization (logger, units, constants) - Ion class requirements and data extraction - Plasma class species handling and Ion creation - Vector and Tensor class structure - Constructor validation contracts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ction - Update /swp:dev:dataframe-audit to use `sg scan --config` as primary method - Update /swp:dev:refactor-class with ast-grep validation section - Fix ast-grep YAML rules to use `rule:` block with `$$$args` syntax - Add installation instructions for ast-grep (brew/pip/cargo) - Document grep fallback for patterns ast-grep can't handle - Change rule severity from warning to info (advisory mode) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- ast-grep-py>=0.35: Structural code pattern matching for /swp:dev:* commands - pre-commit>=3.5: Git hook framework (was missing from dev deps) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Regenerate docs/requirements.txt with urllib3 security fix - Regenerate requirements-dev.lock with security fix + new deps - Adds ast-grep-py and pre-commit to dev lockfile Resolves dependabot alert #71 (decompression bomb vulnerability) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add translations: blosc2→python-blosc2, msgpack→msgpack-python, mypy-extensions→mypy_extensions, restructuredtext-lint→restructuredtext_lint - Add PIP_ONLY_PACKAGES set for packages not on conda-forge (ast-grep-py) - Regenerate solarwindpy.yml from requirements-dev.lock with all dev deps - Update header to mention pip-only packages and recommend pip install -e ".[dev]" This fixes conda env creation failures when packages have different names on PyPI vs conda-forge, or are pip-only. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Instead of excluding pip-only packages (like ast-grep-py), add them to
a `pip:` subsection in the generated solarwindpy.yml. This allows
single-step environment creation:
conda env create -f solarwindpy.yml # Installs everything
pip install -e . # Just editable install
The pip: subsection is automatically populated from PIP_ONLY_PACKAGES
and installed by conda during env creation.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove ast-grep-py from dev dependencies in pyproject.toml - ast-grep functionality now provided via MCP server (@ast-grep/ast-grep-mcp) - Clear PIP_ONLY_PACKAGES set (no pip-only packages currently needed) - Regenerate requirements-dev.lock and solarwindpy.yml The MCP server provides Claude-native ast-grep access, eliminating the need for Python bindings. Install MCP server with: claude mcp add ast-grep -- npx -y @ast-grep/ast-grep-mcp Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Claude finished @blalterman's task —— View job Code Review: Development Copilot ImplementationReview Checklist
Final Assessment ✅This is a high-quality implementation that significantly enhances the SolarWindPy development workflow. The PR demonstrates excellent software engineering practices across multiple dimensions. Strengths1. Comprehensive Development Workflow
2. Excellent Code Quality
3. Security and Dependency Management
4. Robust Test Coverage
Areas for EnhancementMinor Issues
Recommendations
Performance Considerations
Security Assessment
Overall Recommendation: APPROVEThis PR represents a significant step forward in development tooling for SolarWindPy. The implementation is well-architected, thoroughly tested, and addresses real workflow needs. The minor issues noted above are non-blocking and can be addressed in follow-up work. The Development Copilot pattern established here could serve as a model for other scientific Python projects requiring domain-specific development guidance. |
SolarWindPy Documentation Validation - Python 3.11✅ Status: PASSED Essential Metrics:
🎉 All essential documentation examples working! |
Summary
/swp:dev:implement,/swp:dev:fix-tests,/swp:dev:dataframe-audit,/swp:dev:refactor-class)Changes
/swp:dev:*slash commands for guided workflowsTest plan
/swp:dev:implementon a feature/swp:dev:dataframe-auditon codebase🤖 Generated with Claude Code