solarwindpy 0.0.1.dev0__py3-none-any.whl → 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of solarwindpy might be problematic. Click here for more details.
- plans/.velocity/metrics.json +96 -0
- plans/0-overview-template.md +268 -0
- plans/N-phase-template.md +106 -0
- plans/PLAN_AUDIT_SUMMARY.md +173 -0
- plans/TEMPLATE-USAGE-GUIDE.md +198 -0
- plans/__init__.py +1 -0
- plans/abandoned/compaction-agent-system/0-Overview.md +123 -0
- plans/abandoned/compaction-agent-system/agents-index-update-plan.md +109 -0
- plans/abandoned/compaction-agent-system/compacted_state.md +85 -0
- plans/abandoned/compaction-agent-system/implementation-plan.md +107 -0
- plans/abandoned/compaction-agent-system/system-validation-report.md +159 -0
- plans/abandoned/compaction-agent-system/usage-guide.md +210 -0
- plans/abandoned/hook-system-enhancement/0-Overview.md +214 -0
- plans/abandoned/hook-system-enhancement/1-Phase1-Core-Infrastructure.md +313 -0
- plans/abandoned/hook-system-enhancement/2-Phase2-Intelligent-Testing.md +385 -0
- plans/abandoned/hook-system-enhancement/3-Phase3-Physics-Validation.md +444 -0
- plans/abandoned/hook-system-enhancement/4-Phase4-Performance-Monitoring.md +458 -0
- plans/abandoned/hook-system-enhancement/5-Phase5-Developer-Experience.md +532 -0
- plans/abandoned/hook-system-enhancement/6-Implementation-Timeline.md +274 -0
- plans/abandoned/hook-system-enhancement/7-Risk-Management.md +376 -0
- plans/abandoned/hook-system-enhancement/8-Testing-Strategy.md +579 -0
- plans/abandoned/readthedocs-automation/0-Overview.md +247 -0
- plans/abandoned/readthedocs-automation/1-Emergency-Documentation-Fixes.md +270 -0
- plans/abandoned/readthedocs-automation/2-Template-System-Enhancement.md +811 -0
- plans/abandoned/readthedocs-automation/3-Quality-Audit-ReadTheDocs-Integration.md +844 -0
- plans/abandoned/readthedocs-automation/4-Plan-Consolidation-Cleanup.md +632 -0
- plans/abandoned/readthedocs-automation/9-Closeout.md +207 -0
- plans/abandoned/readthedocs-automation/ABANDONMENT_REASON.md +72 -0
- plans/cicd-architecture-redesign/0-Overview.md +193 -0
- plans/cicd-architecture-redesign/1-Workflow-Creation.md +103 -0
- plans/cicd-architecture-redesign/2-Version-Detection.md +123 -0
- plans/cicd-architecture-redesign/3-Deployment-Gates.md +169 -0
- plans/cicd-architecture-redesign/4-RC-Testing.md +194 -0
- plans/cicd-architecture-redesign/5-TestPyPI-Validation.md +264 -0
- plans/cicd-architecture-redesign/6-Production-Release.md +263 -0
- plans/cicd-architecture-redesign/7-Cleanup.md +243 -0
- plans/cicd-architecture-redesign/8-Documentation.md +285 -0
- plans/cicd-architecture-redesign/Closeout.md +225 -0
- plans/closeout-template.md +259 -0
- plans/completed/circular-import-audit/0-Overview.md +152 -0
- plans/completed/circular-import-audit/1-Static-Dependency-Analysis.md +62 -0
- plans/completed/circular-import-audit/2-Dynamic-Import-Testing.md +56 -0
- plans/completed/circular-import-audit/3-Performance-Impact-Assessment.md +56 -0
- plans/completed/circular-import-audit/4-Issue-Remediation.md +78 -0
- plans/completed/circular-import-audit/5-Preventive-Infrastructure.md +89 -0
- plans/completed/claude-settings-ecosystem-alignment/0-Overview.md +162 -0
- plans/completed/claude-settings-ecosystem-alignment/1-Security-Foundation.md +148 -0
- plans/completed/claude-settings-ecosystem-alignment/2-Hook-Integration.md +158 -0
- plans/completed/claude-settings-ecosystem-alignment/3-Agent-System-Integration.md +177 -0
- plans/completed/claude-settings-ecosystem-alignment/4-Enhanced-Workflow-Automation.md +159 -0
- plans/completed/claude-settings-ecosystem-alignment/5-Validation-Monitoring.md +181 -0
- plans/completed/claude-settings-ecosystem-alignment/compacted_session_state.md +290 -0
- plans/completed/combined_plan_with_checklist_documentation/1-Overview-and-Goals.md +51 -0
- plans/completed/combined_plan_with_checklist_documentation/2-Toolchain-and-Hosting.md +69 -0
- plans/completed/combined_plan_with_checklist_documentation/3-Repository-Structure.md +61 -0
- plans/completed/combined_plan_with_checklist_documentation/4-Configuration-and-Standards.md +70 -0
- plans/completed/combined_plan_with_checklist_documentation/5-Documentation-Content.md +62 -0
- plans/completed/combined_plan_with_checklist_documentation/6-CI-CD-and-Validation.md +58 -0
- plans/completed/combined_plan_with_checklist_documentation/7-Maintenance.md +55 -0
- plans/completed/combined_test_plan_with_checklist_fitfunctions/0-Overview.md +135 -0
- plans/completed/combined_test_plan_with_checklist_fitfunctions/1-Common-fixtures.md +59 -0
- plans/completed/combined_test_plan_with_checklist_fitfunctions/10-power_laws.md +56 -0
- plans/completed/combined_test_plan_with_checklist_fitfunctions/2-core.py-FitFunction.md +118 -0
- plans/completed/combined_test_plan_with_checklist_fitfunctions/3-gaussians.py-Gaussian-GaussianNormalized-GaussianLn.md +69 -0
- plans/completed/combined_test_plan_with_checklist_fitfunctions/4-trend_fits.py-TrendFit.md +99 -0
- plans/completed/combined_test_plan_with_checklist_fitfunctions/5-plots.py-FFPlot.md +98 -0
- plans/completed/combined_test_plan_with_checklist_fitfunctions/6-tex_info.py-TeXinfo.md +79 -0
- plans/completed/combined_test_plan_with_checklist_fitfunctions/7-Justification.md +49 -0
- plans/completed/combined_test_plan_with_checklist_fitfunctions/8-exponentials.md +64 -0
- plans/completed/combined_test_plan_with_checklist_fitfunctions/9-lines.md +58 -0
- plans/completed/combined_test_plan_with_checklist_plotting/0-Overview.md +142 -0
- plans/completed/combined_test_plan_with_checklist_plotting/1-base.py.md +90 -0
- plans/completed/combined_test_plan_with_checklist_plotting/10-labels-special.py.md +102 -0
- plans/completed/combined_test_plan_with_checklist_plotting/11-labels-chemistry.py.md +212 -0
- plans/completed/combined_test_plan_with_checklist_plotting/12-labels-composition.py.md +242 -0
- plans/completed/combined_test_plan_with_checklist_plotting/13-labels-datetime.py.md +247 -0
- plans/completed/combined_test_plan_with_checklist_plotting/14-labels-elemental_abundance.py.md +274 -0
- plans/completed/combined_test_plan_with_checklist_plotting/15-visual-validation.md +256 -0
- plans/completed/combined_test_plan_with_checklist_plotting/16-integration-testing.md +266 -0
- plans/completed/combined_test_plan_with_checklist_plotting/17-performance-benchmarks.md +267 -0
- plans/completed/combined_test_plan_with_checklist_plotting/18-Fixtures-and-Utilities.md +86 -0
- plans/completed/combined_test_plan_with_checklist_plotting/2-agg_plot.py.md +90 -0
- plans/completed/combined_test_plan_with_checklist_plotting/3-histograms.py.md +201 -0
- plans/completed/combined_test_plan_with_checklist_plotting/4-scatter.py.md +167 -0
- plans/completed/combined_test_plan_with_checklist_plotting/5-spiral.py.md +216 -0
- plans/completed/combined_test_plan_with_checklist_plotting/6-orbits.py.md +108 -0
- plans/completed/combined_test_plan_with_checklist_plotting/7-tools.py.md +86 -0
- plans/completed/combined_test_plan_with_checklist_plotting/8-select_data_from_figure.py.md +97 -0
- plans/completed/combined_test_plan_with_checklist_plotting/9-labels-base.py.md +88 -0
- plans/completed/combined_test_plan_with_checklist_solar_activity/.gitkeep +0 -0
- plans/completed/combined_test_plan_with_checklist_solar_activity/0-Overview.md +170 -0
- plans/completed/combined_test_plan_with_checklist_solar_activity/1-Package-Entry-Point-__init__.py.md +121 -0
- plans/completed/combined_test_plan_with_checklist_solar_activity/2-Core-Base-Classes-base.py.md +142 -0
- plans/completed/combined_test_plan_with_checklist_solar_activity/3-Plotting-Helpers-plots.py.md +123 -0
- plans/completed/combined_test_plan_with_checklist_solar_activity/4-LISIRD-Sub-package.md +119 -0
- plans/completed/combined_test_plan_with_checklist_solar_activity/5-Extrema-Calculator.md +103 -0
- plans/completed/combined_test_plan_with_checklist_solar_activity/6-Sunspot-Number-Sub-package.md +163 -0
- plans/completed/combined_test_plan_with_checklist_solar_activity/7-Sunspot-Number-Init.py.md +217 -0
- plans/completed/combined_test_plan_with_checklist_solar_activity/compacted_state.md +52 -0
- plans/completed/compaction-agent-modernization/0-Overview.md +156 -0
- plans/completed/compaction-agent-modernization/1-Architecture-Audit-Gap-Analysis.md +132 -0
- plans/completed/compaction-agent-modernization/2-Token-Baseline-Recalibration.md +153 -0
- plans/completed/compaction-agent-modernization/3-Agent-Reference-Updates.md +184 -0
- plans/completed/compaction-agent-modernization/4-Compression-Algorithm-Modernization.md +238 -0
- plans/completed/compaction-agent-modernization/5-Workflow-Integration-Streamlining.md +252 -0
- plans/completed/compaction-agent-modernization/6-Template-Structure-Optimization.md +240 -0
- plans/completed/compaction-agent-modernization/7-Integration-Testing-Validation.md +292 -0
- plans/completed/compaction-hook-enhancement/0-Overview.md +150 -0
- plans/completed/compaction-hook-enhancement/1-Token-Estimation-Enhancement.md +179 -0
- plans/completed/compaction-hook-enhancement/2-Compression-Intelligence.md +294 -0
- plans/completed/compaction-hook-enhancement/3-Git-Integration-Metadata.md +310 -0
- plans/completed/compaction-hook-enhancement/4-Session-Continuity-Features.md +358 -0
- plans/completed/compaction-hook-enhancement/5-Testing-Strategy.md +404 -0
- plans/completed/compaction-hook-enhancement/6-Integration-Roadmap.md +319 -0
- plans/completed/compaction-hook-enhancement/compacted_state.md +142 -0
- plans/completed/docstring-audit-enhancement/0-Overview.md +274 -0
- plans/completed/docstring-audit-enhancement/1-Infrastructure-Setup-and-Validation-Tools.md +206 -0
- plans/completed/docstring-audit-enhancement/2-Core-Physics-Modules-Enhancement.md +237 -0
- plans/completed/docstring-audit-enhancement/3-Fitfunctions-Mathematical-Modules-Enhancement.md +188 -0
- plans/completed/docstring-audit-enhancement/4-Plotting-Visualization-Modules-Enhancement.md +243 -0
- plans/completed/docstring-audit-enhancement/5-Specialized-Modules-Enhancement.md +216 -0
- plans/completed/docstring-audit-enhancement/6-Validation-and-Integration.md +216 -0
- plans/completed/fitfunctions-testing-implementation/0-Overview.md +130 -0
- plans/completed/fitfunctions-testing-implementation/1-Test-Infrastructure-Setup.md +79 -0
- plans/completed/fitfunctions-testing-implementation/2-Common-Fixtures-Test-Utilities.md +104 -0
- plans/completed/fitfunctions-testing-implementation/3-Core-FitFunction-Testing.md +168 -0
- plans/completed/fitfunctions-testing-implementation/4-Specialized-Function-Classes.md +210 -0
- plans/completed/fitfunctions-testing-implementation/5-Advanced-Classes-Testing.md +214 -0
- plans/completed/fitfunctions-testing-implementation/6-Plotting-Integration-Testing.md +231 -0
- plans/completed/fitfunctions-testing-implementation/7-Extended-Coverage-BONUS.md +184 -0
- plans/completed/numpy-docstring-conversion-plan/numpy-docstring-conversion-plan.md +118 -0
- plans/completed/pr-review-remediation/0-Overview.md +138 -0
- plans/completed/pr-review-remediation/1-Critical-Safety-Improvements.md +179 -0
- plans/completed/pr-review-remediation/2-Smart-Timeouts-Validation.md +399 -0
- plans/completed/pr-review-remediation/3-Enhanced-GitHub-Integration.md +258 -0
- plans/completed/pr-review-remediation/compacted_state.md +66 -0
- plans/completed/python-310-migration/0-Overview.md +390 -0
- plans/completed/python-310-migration/1-Planning-Setup.md +164 -0
- plans/completed/python-310-migration/2-Implementation.md +256 -0
- plans/completed/python-310-migration/3-Testing-Validation.md +335 -0
- plans/completed/python-310-migration/4-Documentation-Release.md +274 -0
- plans/completed/python-310-migration/5-Closeout.md +252 -0
- plans/completed/requirements-management-consolidation/0-Overview.md +118 -0
- plans/completed/requirements-management-consolidation/1-Documentation-Validation-Environment-Setup.md +116 -0
- plans/completed/requirements-management-consolidation/2-Requirements-Consolidation.md +161 -0
- plans/completed/requirements-management-consolidation/3-Workflow-Automation-Final-Integration.md +196 -0
- plans/completed/single-ecosystem-plan-implementation/0-Overview.md +83 -0
- plans/completed/single-ecosystem-plan-implementation/1-Plan-Preservation-Session-Management.md +38 -0
- plans/completed/single-ecosystem-plan-implementation/2-File-Structure-Optimization.md +43 -0
- plans/completed/single-ecosystem-plan-implementation/3-Plan-Migration-Archive-Setup.md +82 -0
- plans/completed/single-ecosystem-plan-implementation/4-Agent-System-Transformation.md +108 -0
- plans/completed/single-ecosystem-plan-implementation/5-Template-System-Enhancement.md +131 -0
- plans/completed/single-ecosystem-plan-implementation/6-Final-Validation-Testing.md +120 -0
- plans/completed/test-directory-consolidation/0-Overview.md +51 -0
- plans/completed/test-directory-consolidation/1-Structure-Preparation.md +82 -0
- plans/completed/test-directory-consolidation/2-File-Migration.md +100 -0
- plans/completed/test-directory-consolidation/3-Import-Transformation.md +117 -0
- plans/completed/test-directory-consolidation/4-Configuration-Consolidation.md +140 -0
- plans/completed/test-directory-consolidation/5-Validation.md +152 -0
- plans/completed/test-directory-consolidation/6-Cleanup.md +156 -0
- plans/completed/test-planning-agents-architecture/0-Overview.md +79 -0
- plans/completed/test-planning-agents-architecture/1-Branch-Isolation-Testing.md +49 -0
- plans/completed/test-planning-agents-architecture/2-Cross-Branch-Coordination.md +51 -0
- plans/completed/test-planning-agents-architecture/3-Merge-Workflow-Testing.md +48 -0
- plans/deployment-semver-pypi-rtd/0-Overview.md +463 -0
- plans/deployment-semver-pypi-rtd/1-Semantic-Versioning-Foundation.md +136 -0
- plans/deployment-semver-pypi-rtd/2-PyPI-Deployment-Infrastructure.md +168 -0
- plans/deployment-semver-pypi-rtd/3-Release-Automation.md +214 -0
- plans/deployment-semver-pypi-rtd/4-Plan-Closeout.md +543 -0
- plans/deployment-semver-pypi-rtd/compacted_session_state.md +172 -0
- plans/deployment-semver-pypi-rtd/compacted_state.md +131 -0
- plans/documentation-code-audit/0-Overview.md +393 -0
- plans/documentation-code-audit/1-Discovery-Inventory.md +183 -0
- plans/documentation-code-audit/2-Execution-Environment-Setup.md +263 -0
- plans/documentation-code-audit/3-Systematic-Validation.md +322 -0
- plans/documentation-code-audit/4-Code-Example-Remediation.md +358 -0
- plans/documentation-code-audit/5-Physics-MultiIndex-Compliance.md +464 -0
- plans/documentation-code-audit/6-Doctest-Integration.md +523 -0
- plans/documentation-code-audit/7-Reporting-Documentation.md +498 -0
- plans/documentation-code-audit/8-Closeout.md +456 -0
- plans/documentation-rebuild-session/compacted_state.md +109 -0
- plans/documentation-rendering-fixes/0-Overview.md +104 -0
- plans/documentation-rendering-fixes/1-Sphinx-Build-Diagnostics-Warning-Audit.md +101 -0
- plans/documentation-rendering-fixes/2-Configuration-Infrastructure-Fixes.md +113 -0
- plans/documentation-rendering-fixes/3-Docstring-Syntax-Audit-Repair.md +131 -0
- plans/documentation-rendering-fixes/4-HTML-Page-Rendering-Verification.md +113 -0
- plans/documentation-rendering-fixes/5-Advanced-Documentation-Quality-Assurance.md +119 -0
- plans/documentation-rendering-fixes/6-Documentation-Build-Optimization-Testing.md +129 -0
- plans/documentation-rendering-fixes/compacted_state.md +132 -0
- plans/documentation-template-fix/0-Overview.md +197 -0
- plans/documentation-template-fix/1-Template-System-Analysis.md +269 -0
- plans/documentation-template-fix/2-Template-Modification.md +609 -0
- plans/documentation-template-fix/3-Build-System-Integration.md +766 -0
- plans/documentation-template-fix/4-Testing-Validation.md +1399 -0
- plans/documentation-template-fix/5-Documentation-Training.md +602 -0
- plans/documentation-workflow-fix/0-Overview.md +222 -0
- plans/documentation-workflow-fix/1-Immediate-Fixes.md +238 -0
- plans/documentation-workflow-fix/2-Configuration-Setup.md +298 -0
- plans/documentation-workflow-fix/3-Pre-commit-Integration.md +382 -0
- plans/documentation-workflow-fix/4-Workflow-Improvements.md +446 -0
- plans/documentation-workflow-fix/5-Documentation-and-Training.md +527 -0
- plans/duplicate-object-warnings-fix-plan.md +130 -0
- plans/github-issues-migration/0-Overview.md +510 -0
- plans/github-issues-migration/1-Foundation-Label-System.md +180 -0
- plans/github-issues-migration/2-Migration-Tool-Rewrite.md +235 -0
- plans/github-issues-migration/3-CLI-Integration-Automation.md +169 -0
- plans/github-issues-migration/4-Validated-Migration.md +252 -0
- plans/github-issues-migration/5-Documentation-Training.md +171 -0
- plans/github-issues-migration/6-Closeout.md +179 -0
- plans/github-workflows-repair/repair-plan.md +299 -0
- plans/issues_from_plans.py +342 -0
- plans/pr-270-doc-validation-fixes/0-Overview.md +354 -0
- plans/pr-270-doc-validation-fixes/1-Critical-PR-Fixes.md +117 -0
- plans/pr-270-doc-validation-fixes/2-Framework-Right-Sizing.md +129 -0
- plans/pr-270-doc-validation-fixes/3-Sustainable-Documentation.md +126 -0
- plans/pr-270-doc-validation-fixes/4-Closeout-Migration.md +143 -0
- plans/pr-270-doc-validation-fixes/PLAN_COMPLETED.md +149 -0
- plans/python-310-migration/0-Overview.md +390 -0
- plans/python-310-migration/1-Planning-Setup.md +164 -0
- plans/python-310-migration/2-Implementation.md +256 -0
- plans/python-310-migration/3-Testing-Validation.md +335 -0
- plans/python-310-migration/4-Documentation-Release.md +274 -0
- plans/python-310-migration/5-Closeout.md +252 -0
- plans/readthedocs-simplified/0-Overview.md +243 -0
- plans/readthedocs-simplified/1-Immediate-Fixes.md +216 -0
- plans/readthedocs-simplified/2-Template-Simplification.md +278 -0
- plans/readthedocs-simplified/3-ReadTheDocs-Setup.md +298 -0
- plans/readthedocs-simplified/4-Testing-Validation.md +328 -0
- plans/readthedocs-simplified/5-Closeout.md +231 -0
- plans/readthedocs-simplified/compacted_state.md +127 -0
- plans/session-compaction-2025-08-12/compacted_state.md +114 -0
- plans/session-compaction-2025-08-13/compacted_state.md +145 -0
- plans/session-continuity-protocol/0-Overview.md +35 -0
- plans/session-continuity-protocol/1-Core-Principles-Framework.md +40 -0
- plans/session-continuity-protocol/2-Pre-Session-Validation-System.md +79 -0
- plans/session-continuity-protocol/3-Context-Switching-Prevention.md +87 -0
- plans/session-continuity-protocol/4-Progress-Tracking-Recovery.md +100 -0
- plans/sphinx-warnings-analysis.md +222 -0
- plans/systemprompt-optimization/0-Overview.md +447 -0
- plans/systemprompt-optimization/1-Deploy-SystemPrompt.md +114 -0
- plans/systemprompt-optimization/2-Documentation-Alignment.md +198 -0
- plans/systemprompt-optimization/3-Monitoring-Infrastructure.md +396 -0
- plans/systemprompt-optimization/4-Implementation-Script.md +450 -0
- plans/systemprompt-optimization/9-Closeout.md +165 -0
- plans/systemprompt-optimization/compacted_state.md +143 -0
- plans/template-value-propositions/0-Overview.md +357 -0
- plans/template-value-propositions/1-Value-Proposition-Framework-Design.md +144 -0
- plans/template-value-propositions/2-Plan-Template-Enhancement.md +178 -0
- plans/template-value-propositions/3-Value-Generator-Hook-Implementation.md +291 -0
- plans/template-value-propositions/4-Value-Validator-Hook-Implementation.md +274 -0
- plans/template-value-propositions/5-Documentation-Agent-Updates.md +219 -0
- plans/template-value-propositions/6-Integration-Testing-Validation.md +247 -0
- plans/tests-audit/0-Overview.md +410 -0
- plans/tests-audit/1-Discovery-Inventory.md +170 -0
- plans/tests-audit/2-Physics-Validation-Audit.md +195 -0
- plans/tests-audit/3-Architecture-Compliance.md +195 -0
- plans/tests-audit/4-Numerical-Stability-Analysis.md +203 -0
- plans/tests-audit/5-Documentation-Enhancement.md +220 -0
- plans/tests-audit/6-Audit-Deliverables.md +220 -0
- plans/tests-audit/7-Closeout.md +252 -0
- plans/tests-audit/artifacts/ARCHITECTURE_COMPLIANCE_REPORT.md +315 -0
- plans/tests-audit/artifacts/ARCHITECTURE_RECOMMENDATIONS.md +943 -0
- plans/tests-audit/artifacts/COMPREHENSIVE_AUDIT_REPORT.md +356 -0
- plans/tests-audit/artifacts/CONTRIBUTING_ENHANCED_TEMPLATE.md +419 -0
- plans/tests-audit/artifacts/COVERAGE_GAP_ANALYSIS.md +152 -0
- plans/tests-audit/artifacts/DOCUMENTATION_ENHANCEMENT_REPORT.md +502 -0
- plans/tests-audit/artifacts/EXECUTIVE_AUDIT_SUMMARY.md +129 -0
- plans/tests-audit/artifacts/IMPLEMENTATION_ROADMAP.md +647 -0
- plans/tests-audit/artifacts/NUMERICAL_RECOMMENDATIONS.md +739 -0
- plans/tests-audit/artifacts/NUMERICAL_STABILITY_GUIDE_TEMPLATE.rst +451 -0
- plans/tests-audit/artifacts/NUMERICAL_STABILITY_REPORT.md +301 -0
- plans/tests-audit/artifacts/PHASE_3_SUMMARY.md +280 -0
- plans/tests-audit/artifacts/PHASE_4_SUMMARY.md +229 -0
- plans/tests-audit/artifacts/PHASE_5_SUMMARY.md +292 -0
- plans/tests-audit/artifacts/PHASE_6_CLOSEOUT.md +278 -0
- plans/tests-audit/artifacts/PHYSICS_GUIDE_TEMPLATE.rst +268 -0
- plans/tests-audit/artifacts/PHYSICS_VALIDATION_REPORT.md +235 -0
- plans/tests-audit/artifacts/TECHNICAL_DELIVERABLES_PACKAGE.md +2502 -0
- plans/tests-audit/artifacts/TEST_INVENTORY.csv +1204 -0
- plans/tests-audit/artifacts/TEST_INVENTORY.md +135 -0
- plans/tests-audit/artifacts/test_discovery_analysis.py +231 -0
- plans/tests-audit/artifacts/test_parser.py +395 -0
- solarwindpy/README.md +3 -0
- solarwindpy/Untitled.ipynb +54 -0
- solarwindpy/__init__.py +74 -0
- solarwindpy/core/__init__.py +23 -0
- solarwindpy/core/alfvenic_turbulence.py +804 -0
- solarwindpy/core/base.py +267 -0
- solarwindpy/core/ions.py +309 -0
- solarwindpy/core/plasma.py +2133 -0
- solarwindpy/core/spacecraft.py +256 -0
- solarwindpy/core/tensor.py +90 -0
- solarwindpy/core/units_constants.py +199 -0
- solarwindpy/core/vector.py +328 -0
- solarwindpy/fitfunctions/__init__.py +20 -0
- solarwindpy/fitfunctions/core.py +734 -0
- solarwindpy/fitfunctions/exponentials.py +188 -0
- solarwindpy/fitfunctions/gaussians.py +264 -0
- solarwindpy/fitfunctions/lines.py +116 -0
- solarwindpy/fitfunctions/moyal.py +71 -0
- solarwindpy/fitfunctions/plots.py +751 -0
- solarwindpy/fitfunctions/power_laws.py +209 -0
- solarwindpy/fitfunctions/tex_info.py +568 -0
- solarwindpy/fitfunctions/trend_fits.py +482 -0
- solarwindpy/instabilities/__init__.py +16 -0
- solarwindpy/instabilities/beta_ani.py +82 -0
- solarwindpy/instabilities/verscharen2016.py +631 -0
- solarwindpy/plotting/__init__.py +33 -0
- solarwindpy/plotting/agg_plot.py +489 -0
- solarwindpy/plotting/base.py +465 -0
- solarwindpy/plotting/hist1d.py +405 -0
- solarwindpy/plotting/hist2d.py +1035 -0
- solarwindpy/plotting/histograms.py +1845 -0
- solarwindpy/plotting/labels/__init__.py +104 -0
- solarwindpy/plotting/labels/base.py +686 -0
- solarwindpy/plotting/labels/chemistry.py +19 -0
- solarwindpy/plotting/labels/composition.py +100 -0
- solarwindpy/plotting/labels/datetime.py +235 -0
- solarwindpy/plotting/labels/elemental_abundance.py +73 -0
- solarwindpy/plotting/labels/special.py +794 -0
- solarwindpy/plotting/orbits.py +515 -0
- solarwindpy/plotting/scatter.py +99 -0
- solarwindpy/plotting/select_data_from_figure.py +329 -0
- solarwindpy/plotting/spiral.py +980 -0
- solarwindpy/plotting/tools.py +434 -0
- solarwindpy/scripts/__init__.py +1 -0
- solarwindpy/scripts/logs/.gitignore +1 -0
- solarwindpy/solar_activity/__init__.py +53 -0
- solarwindpy/solar_activity/base.py +605 -0
- solarwindpy/solar_activity/lisird/__init__.py +3 -0
- solarwindpy/solar_activity/lisird/extrema_calculator.py +394 -0
- solarwindpy/solar_activity/lisird/lisird.py +319 -0
- solarwindpy/solar_activity/plots.py +116 -0
- solarwindpy/solar_activity/sunspot_number/.DS_Store +0 -0
- solarwindpy/solar_activity/sunspot_number/__init__.py +3 -0
- solarwindpy/solar_activity/sunspot_number/sidc.py +556 -0
- solarwindpy/solar_activity/sunspot_number/ssn_extrema.csv +72 -0
- solarwindpy/solar_activity/sunspot_number/ssn_extrema.csv.silso +72 -0
- solarwindpy/tools/__init__.py +162 -0
- solarwindpy-0.1.0.dist-info/METADATA +181 -0
- solarwindpy-0.1.0.dist-info/RECORD +409 -0
- {solarwindpy-0.0.1.dev0.dist-info → solarwindpy-0.1.0.dist-info}/WHEEL +1 -1
- solarwindpy-0.1.0.dist-info/licenses/LICENSE.rst +32 -0
- solarwindpy-0.1.0.dist-info/top_level.txt +3 -0
- tests/__init__.py +1 -0
- tests/conftest.py +10 -0
- tests/core/__init__.py +1 -0
- tests/core/test_alfvenic_turbulence.py +544 -0
- tests/core/test_base.py +112 -0
- tests/core/test_base_head_tail.py +29 -0
- tests/core/test_base_mi_tuples.py +11 -0
- tests/core/test_core_verify_datetimeindex.py +32 -0
- tests/core/test_ions.py +325 -0
- tests/core/test_plasma.py +2581 -0
- tests/core/test_plasma_io.py +12 -0
- tests/core/test_quantities.py +507 -0
- tests/core/test_spacecraft.py +210 -0
- tests/core/test_units_constants.py +22 -0
- tests/data/epoch.csv +4 -0
- tests/data/plasma.csv +4 -0
- tests/data/spacecraft.csv +4 -0
- tests/fitfunctions/conftest.py +60 -0
- tests/fitfunctions/test_core.py +193 -0
- tests/fitfunctions/test_exponentials.py +342 -0
- tests/fitfunctions/test_gaussians.py +142 -0
- tests/fitfunctions/test_lines.py +349 -0
- tests/fitfunctions/test_moyal.py +258 -0
- tests/fitfunctions/test_plots.py +258 -0
- tests/fitfunctions/test_power_laws.py +365 -0
- tests/fitfunctions/test_tex_info.py +183 -0
- tests/fitfunctions/test_trend_fit_properties.py +31 -0
- tests/fitfunctions/test_trend_fits.py +244 -0
- tests/plotting/__init__.py +1 -0
- tests/plotting/labels/__init__.py +1 -0
- tests/plotting/labels/test_chemistry.py +243 -0
- tests/plotting/labels/test_composition.py +345 -0
- tests/plotting/labels/test_datetime.py +445 -0
- tests/plotting/labels/test_elemental_abundance.py +366 -0
- tests/plotting/labels/test_init.py +66 -0
- tests/plotting/labels/test_labels_base.py +347 -0
- tests/plotting/labels/test_special.py +550 -0
- tests/plotting/test_agg_plot.py +602 -0
- tests/plotting/test_base.py +752 -0
- tests/plotting/test_fixtures_utilities.py +775 -0
- tests/plotting/test_histograms.py +546 -0
- tests/plotting/test_integration.py +675 -0
- tests/plotting/test_orbits.py +435 -0
- tests/plotting/test_performance.py +708 -0
- tests/plotting/test_scatter.py +752 -0
- tests/plotting/test_select_data_from_figure.py +1209 -0
- tests/plotting/test_spiral.py +573 -0
- tests/plotting/test_tools.py +607 -0
- tests/plotting/test_visual_validation.py +465 -0
- tests/solar_activity/__init__.py +1 -0
- tests/solar_activity/lisird/__init__.py +1 -0
- tests/solar_activity/lisird/test_extrema_calculator.py +593 -0
- tests/solar_activity/lisird/test_lisird_id.py +187 -0
- tests/solar_activity/sunspot_number/__init__.py +1 -0
- tests/solar_activity/sunspot_number/test_init.py +399 -0
- tests/solar_activity/sunspot_number/test_sidc.py +465 -0
- tests/solar_activity/sunspot_number/test_sidc_id.py +223 -0
- tests/solar_activity/sunspot_number/test_sidc_loader.py +275 -0
- tests/solar_activity/sunspot_number/test_ssn_extrema.py +406 -0
- tests/solar_activity/test_base.py +656 -0
- tests/solar_activity/test_init.py +396 -0
- tests/solar_activity/test_plots.py +371 -0
- tests/test_circular_imports.py +408 -0
- tests/test_issue_titles.py +25 -0
- tests/test_statusline.py +298 -0
- solarwindpy-0.0.1.dev0.dist-info/METADATA +0 -14
- solarwindpy-0.0.1.dev0.dist-info/RECORD +0 -4
- solarwindpy-0.0.1.dev0.dist-info/top_level.txt +0 -1
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
# Phase 2: Smart Timeouts and Validation
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
- **Phase**: 2 of 3
|
|
5
|
+
- **Duration**: 2.0 hours
|
|
6
|
+
- **Priority**: HIGH (ROI 8-9/10)
|
|
7
|
+
- **Dependencies**: Phase 1 (depth limits enable better timeout calculation)
|
|
8
|
+
- **Affects**: `.claude/hooks/*`, `.claude/settings.local.json`, new validation utilities
|
|
9
|
+
|
|
10
|
+
## Objective
|
|
11
|
+
Implement adaptive timeout system and input validation to eliminate false timeout failures and prevent malformed operations, while maintaining the simplicity appropriate for SolarWindPy's scale.
|
|
12
|
+
|
|
13
|
+
## Context
|
|
14
|
+
Current fixed timeouts (120s) cause either:
|
|
15
|
+
1. **False failures** when complex physics tests need more time
|
|
16
|
+
2. **Unnecessary waits** when simple changes complete in 5-10s
|
|
17
|
+
|
|
18
|
+
Additionally, lack of input validation allows malformed commands to reach tools, causing cryptic errors.
|
|
19
|
+
|
|
20
|
+
**ROI Analysis:**
|
|
21
|
+
- Adaptive timeouts: ROI 9/10 (saves 30-60 min/day developer time)
|
|
22
|
+
- Input validation: ROI 8/10 (prevents system failures, clear errors)
|
|
23
|
+
|
|
24
|
+
## Tasks
|
|
25
|
+
|
|
26
|
+
### Task 2.1: Adaptive Timeout System (1 hour)
|
|
27
|
+
**Priority**: HIGH (Massive time savings on every code edit)
|
|
28
|
+
|
|
29
|
+
**Problem**: Fixed 120s timeouts for all operations regardless of complexity.
|
|
30
|
+
|
|
31
|
+
**Solution**: Scale timeouts based on operation type and changed files.
|
|
32
|
+
|
|
33
|
+
#### Subtask 2.1.1: Create Timeout Configuration (15 minutes)
|
|
34
|
+
|
|
35
|
+
**New File**: `.claude/config/timeouts.json`
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"adaptive_timeouts": {
|
|
39
|
+
"enabled": true,
|
|
40
|
+
"base_timeouts": {
|
|
41
|
+
"physics_validation": 180,
|
|
42
|
+
"test_execution": 120,
|
|
43
|
+
"coverage_analysis": 60,
|
|
44
|
+
"file_analysis": 30,
|
|
45
|
+
"git_operations": 15
|
|
46
|
+
},
|
|
47
|
+
"scaling": {
|
|
48
|
+
"per_file_factor": 15,
|
|
49
|
+
"max_timeout": 300,
|
|
50
|
+
"min_timeout": 10
|
|
51
|
+
},
|
|
52
|
+
"operation_patterns": {
|
|
53
|
+
"solarwindpy/instabilities/*.py": "physics_validation",
|
|
54
|
+
"solarwindpy/core/*.py": "physics_validation",
|
|
55
|
+
"solarwindpy/plotting/*.py": "test_execution",
|
|
56
|
+
"tests/*.py": "test_execution",
|
|
57
|
+
"*.md": "file_analysis"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**Rationale**:
|
|
64
|
+
- Physics calculations (instabilities) take longest: 180s base
|
|
65
|
+
- Core physics validation: 180s base
|
|
66
|
+
- General tests: 120s base
|
|
67
|
+
- Documentation: 30s base
|
|
68
|
+
- Scale by 15s per changed file (reasonable for SolarWindPy size)
|
|
69
|
+
|
|
70
|
+
#### Subtask 2.1.2: Update Test Runner Hook (30 minutes)
|
|
71
|
+
|
|
72
|
+
**File**: `.claude/hooks/test-runner.sh`
|
|
73
|
+
|
|
74
|
+
**Current Problem** (line 8):
|
|
75
|
+
```bash
|
|
76
|
+
MAX_TEST_TIME=120 # Fixed timeout
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**Enhanced Implementation**:
|
|
80
|
+
```bash
|
|
81
|
+
#!/bin/bash
|
|
82
|
+
# Calculate adaptive timeout based on changed files and types
|
|
83
|
+
|
|
84
|
+
calculate_timeout() {
|
|
85
|
+
local changed_files="$1"
|
|
86
|
+
local file_count=$(echo "$changed_files" | wc -l)
|
|
87
|
+
local base_timeout=120
|
|
88
|
+
|
|
89
|
+
# Check for physics files (need more time)
|
|
90
|
+
if echo "$changed_files" | grep -q "solarwindpy/instabilities/\|solarwindpy/core/"; then
|
|
91
|
+
base_timeout=180
|
|
92
|
+
elif echo "$changed_files" | grep -q "solarwindpy/plotting/"; then
|
|
93
|
+
base_timeout=120
|
|
94
|
+
elif echo "$changed_files" | grep -q "tests/"; then
|
|
95
|
+
base_timeout=120
|
|
96
|
+
else
|
|
97
|
+
base_timeout=60
|
|
98
|
+
fi
|
|
99
|
+
|
|
100
|
+
# Scale by file count (15s per file)
|
|
101
|
+
local scaled_timeout=$((base_timeout + file_count * 15))
|
|
102
|
+
|
|
103
|
+
# Clamp to reasonable bounds for SolarWindPy
|
|
104
|
+
if [ $scaled_timeout -gt 300 ]; then
|
|
105
|
+
scaled_timeout=300
|
|
106
|
+
elif [ $scaled_timeout -lt 10 ]; then
|
|
107
|
+
scaled_timeout=10
|
|
108
|
+
fi
|
|
109
|
+
|
|
110
|
+
echo $scaled_timeout
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
# Get changed files for timeout calculation
|
|
114
|
+
CHANGED_FILES=$(git diff --name-only HEAD~1..HEAD 2>/dev/null || echo "unknown")
|
|
115
|
+
MAX_TEST_TIME=$(calculate_timeout "$CHANGED_FILES")
|
|
116
|
+
|
|
117
|
+
echo "Adaptive timeout: ${MAX_TEST_TIME}s for $(echo "$CHANGED_FILES" | wc -l) changed files"
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
#### Subtask 2.1.3: Update Hook Configurations (15 minutes)
|
|
121
|
+
|
|
122
|
+
**Files**: `.claude/settings.local.json` (hooks section around lines 127-249)
|
|
123
|
+
|
|
124
|
+
**Update Timeout Values**:
|
|
125
|
+
```json
|
|
126
|
+
{
|
|
127
|
+
"hooks": {
|
|
128
|
+
"PostToolUse": [
|
|
129
|
+
{
|
|
130
|
+
"matcher": "Edit",
|
|
131
|
+
"hooks": [
|
|
132
|
+
{
|
|
133
|
+
"type": "command",
|
|
134
|
+
"command": ".claude/hooks/test-runner.sh --changed",
|
|
135
|
+
"timeout": "adaptive"
|
|
136
|
+
}
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
**Implementation Note**: The actual timeout will be calculated by the hook itself, with "adaptive" signaling to use the new system.
|
|
145
|
+
|
|
146
|
+
### Task 2.2: Basic Input Validation (1 hour)
|
|
147
|
+
**Priority**: HIGH (Prevents system failures with clear errors)
|
|
148
|
+
|
|
149
|
+
**Problem**: Malformed inputs cause cryptic tool failures.
|
|
150
|
+
|
|
151
|
+
**Solution**: Validate inputs before they reach tools.
|
|
152
|
+
|
|
153
|
+
#### Subtask 2.2.1: Create Input Validator (45 minutes)
|
|
154
|
+
|
|
155
|
+
**New File**: `.claude/utils/input-validator.py`
|
|
156
|
+
```python
|
|
157
|
+
#!/usr/bin/env python3
|
|
158
|
+
"""
|
|
159
|
+
Basic input validation for SolarWindPy Claude operations
|
|
160
|
+
Focused on preventing common errors and security issues
|
|
161
|
+
"""
|
|
162
|
+
|
|
163
|
+
import re
|
|
164
|
+
import os
|
|
165
|
+
from pathlib import Path
|
|
166
|
+
|
|
167
|
+
class SolarWindPyValidator:
|
|
168
|
+
"""Simple validator for SolarWindPy-specific operations."""
|
|
169
|
+
|
|
170
|
+
# Safe path patterns for SolarWindPy
|
|
171
|
+
SAFE_PATHS = [
|
|
172
|
+
r'^solarwindpy/',
|
|
173
|
+
r'^tests/',
|
|
174
|
+
r'^\.claude/',
|
|
175
|
+
r'^docs/',
|
|
176
|
+
r'^scripts/',
|
|
177
|
+
r'^\w+\.py$',
|
|
178
|
+
r'^\w+\.md$'
|
|
179
|
+
]
|
|
180
|
+
|
|
181
|
+
# Dangerous patterns to block
|
|
182
|
+
DANGEROUS_PATTERNS = [
|
|
183
|
+
r'\.\./', # Directory traversal
|
|
184
|
+
r'~/', # Home directory access
|
|
185
|
+
r'/etc/', # System directories
|
|
186
|
+
r'rm\s+-rf', # Dangerous removal
|
|
187
|
+
r';\s*\w+', # Command chaining
|
|
188
|
+
r'\|\s*\w+', # Piping
|
|
189
|
+
r'`[^`]*`', # Command substitution
|
|
190
|
+
r'\$\(', # Command substitution
|
|
191
|
+
]
|
|
192
|
+
|
|
193
|
+
def validate_file_path(self, path: str) -> tuple[bool, str]:
|
|
194
|
+
"""Validate file path is safe for SolarWindPy operations."""
|
|
195
|
+
if not path:
|
|
196
|
+
return False, "Empty path not allowed"
|
|
197
|
+
|
|
198
|
+
# Check for dangerous patterns
|
|
199
|
+
for pattern in self.DANGEROUS_PATTERNS:
|
|
200
|
+
if re.search(pattern, path):
|
|
201
|
+
return False, f"Dangerous pattern detected: {pattern}"
|
|
202
|
+
|
|
203
|
+
# Check against safe paths
|
|
204
|
+
for pattern in self.SAFE_PATHS:
|
|
205
|
+
if re.match(pattern, path):
|
|
206
|
+
return True, "Path validated"
|
|
207
|
+
|
|
208
|
+
return False, f"Path not in allowed locations: {path}"
|
|
209
|
+
|
|
210
|
+
def validate_branch_name(self, branch: str) -> tuple[bool, str]:
|
|
211
|
+
"""Validate git branch name follows SolarWindPy conventions."""
|
|
212
|
+
if not branch:
|
|
213
|
+
return False, "Empty branch name"
|
|
214
|
+
|
|
215
|
+
# SolarWindPy branch patterns
|
|
216
|
+
valid_patterns = [
|
|
217
|
+
r'^master$',
|
|
218
|
+
r'^plan/[\w\-]+$',
|
|
219
|
+
r'^feature/[\w\-]+$',
|
|
220
|
+
r'^update-\d{4}$',
|
|
221
|
+
r'^codex/\d{4}-\d{2}-\d{2}',
|
|
222
|
+
]
|
|
223
|
+
|
|
224
|
+
for pattern in valid_patterns:
|
|
225
|
+
if re.match(pattern, branch):
|
|
226
|
+
return True, "Branch name validated"
|
|
227
|
+
|
|
228
|
+
return False, f"Branch name doesn't match SolarWindPy conventions: {branch}"
|
|
229
|
+
|
|
230
|
+
def validate_test_pattern(self, pattern: str) -> tuple[bool, str]:
|
|
231
|
+
"""Validate test execution pattern is safe."""
|
|
232
|
+
if not pattern:
|
|
233
|
+
return False, "Empty test pattern"
|
|
234
|
+
|
|
235
|
+
# Safe test patterns for SolarWindPy
|
|
236
|
+
safe_patterns = [
|
|
237
|
+
r'^tests/[\w/]*\.py$',
|
|
238
|
+
r'^solarwindpy/[\w/]*\.py$',
|
|
239
|
+
r'^tests/$',
|
|
240
|
+
r'^--\w+$', # pytest flags
|
|
241
|
+
r'^\w+$', # simple module names
|
|
242
|
+
]
|
|
243
|
+
|
|
244
|
+
for safe in safe_patterns:
|
|
245
|
+
if re.match(safe, pattern):
|
|
246
|
+
return True, "Test pattern validated"
|
|
247
|
+
|
|
248
|
+
return False, f"Test pattern not safe: {pattern}"
|
|
249
|
+
|
|
250
|
+
def validate_operation(operation_type: str, **kwargs) -> tuple[bool, str]:
|
|
251
|
+
"""Main validation entry point."""
|
|
252
|
+
validator = SolarWindPyValidator()
|
|
253
|
+
|
|
254
|
+
if operation_type == "file_path":
|
|
255
|
+
return validator.validate_file_path(kwargs.get('path', ''))
|
|
256
|
+
elif operation_type == "branch_name":
|
|
257
|
+
return validator.validate_branch_name(kwargs.get('branch', ''))
|
|
258
|
+
elif operation_type == "test_pattern":
|
|
259
|
+
return validator.validate_test_pattern(kwargs.get('pattern', ''))
|
|
260
|
+
else:
|
|
261
|
+
return False, f"Unknown operation type: {operation_type}"
|
|
262
|
+
|
|
263
|
+
if __name__ == "__main__":
|
|
264
|
+
# CLI interface for validation
|
|
265
|
+
import sys
|
|
266
|
+
|
|
267
|
+
if len(sys.argv) < 3:
|
|
268
|
+
print("Usage: input-validator.py <operation_type> <value>")
|
|
269
|
+
sys.exit(1)
|
|
270
|
+
|
|
271
|
+
operation = sys.argv[1]
|
|
272
|
+
value = sys.argv[2]
|
|
273
|
+
|
|
274
|
+
if operation == "file_path":
|
|
275
|
+
is_valid, message = validate_operation("file_path", path=value)
|
|
276
|
+
elif operation == "branch_name":
|
|
277
|
+
is_valid, message = validate_operation("branch_name", branch=value)
|
|
278
|
+
elif operation == "test_pattern":
|
|
279
|
+
is_valid, message = validate_operation("test_pattern", pattern=value)
|
|
280
|
+
else:
|
|
281
|
+
is_valid, message = False, f"Unknown operation: {operation}"
|
|
282
|
+
|
|
283
|
+
print(message)
|
|
284
|
+
sys.exit(0 if is_valid else 1)
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
#### Subtask 2.2.2: Integrate Validation into Session Hook (15 minutes)
|
|
288
|
+
|
|
289
|
+
**File**: `.claude/hooks/validate-session-state.sh`
|
|
290
|
+
|
|
291
|
+
**Current Enhancement** (add before existing validation):
|
|
292
|
+
```bash
|
|
293
|
+
#!/bin/bash
|
|
294
|
+
# Enhanced session validation with input checking
|
|
295
|
+
|
|
296
|
+
echo "🔍 Validating session state..."
|
|
297
|
+
|
|
298
|
+
# Get current branch
|
|
299
|
+
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "unknown")
|
|
300
|
+
|
|
301
|
+
# Validate branch name
|
|
302
|
+
if ! python .claude/utils/input-validator.py branch_name "$CURRENT_BRANCH"; then
|
|
303
|
+
echo "⚠️ Warning: Branch name doesn't follow SolarWindPy conventions"
|
|
304
|
+
echo " Current: $CURRENT_BRANCH"
|
|
305
|
+
echo " Expected: plan/*, feature/*, master, update-YYYY"
|
|
306
|
+
fi
|
|
307
|
+
|
|
308
|
+
# Check for safe working directory
|
|
309
|
+
if [ ! -f "solarwindpy/__init__.py" ]; then
|
|
310
|
+
echo "❌ Not in SolarWindPy root directory"
|
|
311
|
+
exit 1
|
|
312
|
+
fi
|
|
313
|
+
|
|
314
|
+
# Validate recent file changes are safe
|
|
315
|
+
RECENT_FILES=$(git diff --name-only HEAD~1..HEAD 2>/dev/null | head -10)
|
|
316
|
+
if [ -n "$RECENT_FILES" ]; then
|
|
317
|
+
echo "📋 Validating recent file changes:"
|
|
318
|
+
while IFS= read -r file; do
|
|
319
|
+
if [ -n "$file" ]; then
|
|
320
|
+
if python .claude/utils/input-validator.py file_path "$file"; then
|
|
321
|
+
echo " ✓ $file"
|
|
322
|
+
else
|
|
323
|
+
echo " ⚠️ $file (outside safe paths)"
|
|
324
|
+
fi
|
|
325
|
+
fi
|
|
326
|
+
done <<< "$RECENT_FILES"
|
|
327
|
+
fi
|
|
328
|
+
|
|
329
|
+
# Continue with existing validation...
|
|
330
|
+
echo "✅ Session state validation complete"
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
## Validation Steps
|
|
334
|
+
|
|
335
|
+
### Timeout Validation
|
|
336
|
+
1. **Small Change Test**:
|
|
337
|
+
```bash
|
|
338
|
+
# Edit single plotting file
|
|
339
|
+
touch solarwindpy/plotting/test.py
|
|
340
|
+
git add solarwindpy/plotting/test.py
|
|
341
|
+
# Should get ~120s timeout (base) + 15s (1 file) = 135s
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
2. **Physics Change Test**:
|
|
345
|
+
```bash
|
|
346
|
+
# Edit core physics file
|
|
347
|
+
touch solarwindpy/core/plasma.py
|
|
348
|
+
git add solarwindpy/core/plasma.py
|
|
349
|
+
# Should get ~180s timeout (physics base) + 15s (1 file) = 195s
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
3. **Multiple Files Test**:
|
|
353
|
+
```bash
|
|
354
|
+
# Edit 5 files
|
|
355
|
+
# Should get base + (5 * 15s) = base + 75s, capped at 300s
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
### Input Validation Testing
|
|
359
|
+
1. **Safe Paths**:
|
|
360
|
+
```bash
|
|
361
|
+
python .claude/utils/input-validator.py file_path "solarwindpy/core/plasma.py"
|
|
362
|
+
# Should return: Path validated
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
2. **Dangerous Paths**:
|
|
366
|
+
```bash
|
|
367
|
+
python .claude/utils/input-validator.py file_path "../../../etc/passwd"
|
|
368
|
+
# Should return: Dangerous pattern detected
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
3. **Branch Names**:
|
|
372
|
+
```bash
|
|
373
|
+
python .claude/utils/input-validator.py branch_name "feature/pr-review-remediation"
|
|
374
|
+
# Should return: Branch name validated
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
## Dependencies
|
|
378
|
+
- **Phase 1**: Depth limits must be working for timeout calculations
|
|
379
|
+
- **Next Phase**: Validated inputs enable better GitHub integration
|
|
380
|
+
|
|
381
|
+
## Rollback Procedures
|
|
382
|
+
1. **Timeouts**: Revert to fixed 120s values
|
|
383
|
+
2. **Validation**: Remove validation calls from hooks
|
|
384
|
+
3. **Files**: Remove new `.claude/config/` and `.claude/utils/` files
|
|
385
|
+
|
|
386
|
+
## Success Metrics
|
|
387
|
+
- **Performance**: No false timeout failures, 30-60 min/day saved
|
|
388
|
+
- **Reliability**: Clear error messages for invalid inputs
|
|
389
|
+
- **User Experience**: Appropriate timeouts for operation complexity
|
|
390
|
+
- **Security**: Malformed inputs blocked before reaching tools
|
|
391
|
+
|
|
392
|
+
## Implementation Notes
|
|
393
|
+
- **SolarWindPy Specific**: Timeout values calibrated for physics calculations
|
|
394
|
+
- **Simple Validation**: Whitelist approach, no complex parsing
|
|
395
|
+
- **Backward Compatible**: Falls back to fixed timeouts if adaptive fails
|
|
396
|
+
- **Low Maintenance**: Simple patterns, no complex dependencies
|
|
397
|
+
|
|
398
|
+
---
|
|
399
|
+
*Phase 2 eliminates the major workflow friction points (timeouts, cryptic errors) while maintaining the simplicity appropriate for SolarWindPy's development scale.*
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
# Phase 3: Enhanced GitHub Integration
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
- **Phase**: 3 of 3
|
|
5
|
+
- **Duration**: 0.5 hours (30 minutes)
|
|
6
|
+
- **Priority**: MEDIUM (ROI 7/10)
|
|
7
|
+
- **Dependencies**: Phases 1-2 (validated inputs, reliable routing)
|
|
8
|
+
- **Affects**: `.github/workflows/claude-code-review.yml`, documentation
|
|
9
|
+
|
|
10
|
+
## Objective
|
|
11
|
+
Optimize Claude Code's automated PR review workflow to provide more relevant, physics-aware feedback that leverages SolarWindPy's sophisticated agent routing system and domain expertise.
|
|
12
|
+
|
|
13
|
+
## Context
|
|
14
|
+
Current GitHub integration uses generic review prompts. With the improved agent routing and validation from Phases 1-2, we can now provide more targeted, SolarWindPy-specific review guidance that focuses on:
|
|
15
|
+
- Physics validation and unit consistency
|
|
16
|
+
- Solar wind domain expertise
|
|
17
|
+
- Appropriate use of the 8-agent system
|
|
18
|
+
- Scientific code review standards
|
|
19
|
+
|
|
20
|
+
**ROI**: 7/10 - Improves review quality and reduces manual review time.
|
|
21
|
+
|
|
22
|
+
## Tasks
|
|
23
|
+
|
|
24
|
+
### Task 3.1: Enhance Claude Code Review Workflow (30 minutes)
|
|
25
|
+
**Priority**: MEDIUM (Better reviews save manual review time)
|
|
26
|
+
|
|
27
|
+
**File**: `.github/workflows/claude-code-review.yml`
|
|
28
|
+
|
|
29
|
+
#### Current Configuration Analysis
|
|
30
|
+
**Current Direct Prompt** (lines 19-26):
|
|
31
|
+
```yaml
|
|
32
|
+
direct_prompt: Please review this pull request and provide feedback on:
|
|
33
|
+
- Code quality and best practices
|
|
34
|
+
- Potential bugs or issues
|
|
35
|
+
- Performance considerations
|
|
36
|
+
- Security concerns
|
|
37
|
+
- Test coverage
|
|
38
|
+
|
|
39
|
+
Be constructive and helpful in your feedback.
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
#### Enhanced SolarWindPy-Specific Prompt
|
|
43
|
+
|
|
44
|
+
**Updated Configuration**:
|
|
45
|
+
```yaml
|
|
46
|
+
direct_prompt: |
|
|
47
|
+
Please review this pull request for SolarWindPy, a solar wind physics analysis library.
|
|
48
|
+
|
|
49
|
+
Focus your review on these SolarWindPy-specific areas:
|
|
50
|
+
|
|
51
|
+
**Physics & Scientific Accuracy:**
|
|
52
|
+
- Unit consistency (SI units internally, conversion for display only)
|
|
53
|
+
- Thermal speed convention: mw² = 2kT
|
|
54
|
+
- Alfvén speed calculations: V_A = B/√(μ₀ρ) with proper ion composition
|
|
55
|
+
- Missing data handling (NaN, never 0 or -999)
|
|
56
|
+
- Time series chronological order preservation
|
|
57
|
+
|
|
58
|
+
**Code Quality & Architecture:**
|
|
59
|
+
- MultiIndex DataFrame patterns (M/C/S structure: Measurement/Component/Species)
|
|
60
|
+
- Use of .xs() for DataFrame views, not copies
|
|
61
|
+
- DateTime indices named "Epoch"
|
|
62
|
+
- Proper inheritance from Base class for logging/units/constants
|
|
63
|
+
|
|
64
|
+
**Agent Routing Optimization:**
|
|
65
|
+
- Physics calculations → PhysicsValidator
|
|
66
|
+
- DataFrame operations → DataFrameArchitect
|
|
67
|
+
- Plotting code → PlottingEngineer
|
|
68
|
+
- Test files → TestEngineer
|
|
69
|
+
- Complex tasks → UnifiedPlanCoordinator
|
|
70
|
+
|
|
71
|
+
**Performance & Security:**
|
|
72
|
+
- No unbounded operations (add -maxdepth to find commands)
|
|
73
|
+
- Appropriate timeout values for physics calculations
|
|
74
|
+
- Memory efficiency for large datasets
|
|
75
|
+
- Input validation for file paths and commands
|
|
76
|
+
|
|
77
|
+
**Testing Standards:**
|
|
78
|
+
- Coverage ≥95% (enforced by hooks)
|
|
79
|
+
- Physics constraint validation in tests
|
|
80
|
+
- Numerical stability testing for edge cases
|
|
81
|
+
- Integration with existing .claude/hooks system
|
|
82
|
+
|
|
83
|
+
When suggesting improvements, consider:
|
|
84
|
+
- SolarWindPy has ~50 files, 1-2 developers, 5-10 PRs/month
|
|
85
|
+
- Favor simple, maintainable solutions over complex engineering
|
|
86
|
+
- Leverage existing sophisticated .claude agent/hook ecosystem
|
|
87
|
+
- Maintain scientific accuracy and numerical precision
|
|
88
|
+
|
|
89
|
+
Be constructive and provide specific, actionable feedback with line references.
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
#### Additional Configuration Enhancements
|
|
93
|
+
|
|
94
|
+
**File Pattern Targeting** (add after line 30):
|
|
95
|
+
```yaml
|
|
96
|
+
# Only run detailed review for significant changes
|
|
97
|
+
- name: Check if substantial changes
|
|
98
|
+
id: check_changes
|
|
99
|
+
run: |
|
|
100
|
+
FILES_CHANGED=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | wc -l)
|
|
101
|
+
LINES_CHANGED=$(git diff --stat ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | tail -1 | awk '{print $4+$6}')
|
|
102
|
+
echo "files_changed=$FILES_CHANGED" >> $GITHUB_OUTPUT
|
|
103
|
+
echo "lines_changed=$LINES_CHANGED" >> $GITHUB_OUTPUT
|
|
104
|
+
|
|
105
|
+
# Skip review for trivial changes
|
|
106
|
+
if [ $FILES_CHANGED -lt 2 ] && [ $LINES_CHANGED -lt 20 ]; then
|
|
107
|
+
echo "skip_review=true" >> $GITHUB_OUTPUT
|
|
108
|
+
else
|
|
109
|
+
echo "skip_review=false" >> $GITHUB_OUTPUT
|
|
110
|
+
fi
|
|
111
|
+
|
|
112
|
+
# Conditional review execution
|
|
113
|
+
- name: Run Claude Code Review
|
|
114
|
+
if: steps.check_changes.outputs.skip_review == 'false'
|
|
115
|
+
uses: anthropics/claude-code-action@beta
|
|
116
|
+
# ... rest of configuration
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
#### Physics-Specific Review Triggers
|
|
120
|
+
|
|
121
|
+
**Enhanced File-Based Triggering**:
|
|
122
|
+
```yaml
|
|
123
|
+
# Add physics-specific review intensity
|
|
124
|
+
- name: Determine Review Focus
|
|
125
|
+
id: review_focus
|
|
126
|
+
run: |
|
|
127
|
+
PHYSICS_FILES=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep -E "(instabilities|core)" | wc -l)
|
|
128
|
+
PLOTTING_FILES=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep "plotting" | wc -l)
|
|
129
|
+
TEST_FILES=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep "tests/" | wc -l)
|
|
130
|
+
|
|
131
|
+
if [ $PHYSICS_FILES -gt 0 ]; then
|
|
132
|
+
echo "Extra focus on physics validation, unit consistency, and numerical accuracy." >> physics_focus.txt
|
|
133
|
+
fi
|
|
134
|
+
if [ $PLOTTING_FILES -gt 0 ]; then
|
|
135
|
+
echo "Extra focus on matplotlib best practices and publication-quality output." >> plotting_focus.txt
|
|
136
|
+
fi
|
|
137
|
+
if [ $TEST_FILES -gt 0 ]; then
|
|
138
|
+
echo "Extra focus on test coverage ≥95% and physics constraint validation." >> testing_focus.txt
|
|
139
|
+
fi
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Task 3.2: Create Quick Reference Documentation (Optional)
|
|
143
|
+
**Priority**: LOW (Nice-to-have for context)
|
|
144
|
+
|
|
145
|
+
**New File**: `.claude/docs/review-guidelines.md` (if time permits)
|
|
146
|
+
|
|
147
|
+
```markdown
|
|
148
|
+
# SolarWindPy PR Review Guidelines
|
|
149
|
+
|
|
150
|
+
## Quick Reference for Claude Code Reviews
|
|
151
|
+
|
|
152
|
+
### Physics Review Checklist
|
|
153
|
+
- [ ] Units: SI internally, display conversion only
|
|
154
|
+
- [ ] Thermal speed: mw² = 2kT convention
|
|
155
|
+
- [ ] Alfvén speed: V_A = B/√(μ₀ρ)
|
|
156
|
+
- [ ] Missing data: NaN (never 0 or -999)
|
|
157
|
+
- [ ] Time series: Chronological order maintained
|
|
158
|
+
|
|
159
|
+
### Code Structure Review
|
|
160
|
+
- [ ] MultiIndex: M/C/S structure (Measurement/Component/Species)
|
|
161
|
+
- [ ] DataFrame: Use .xs() for views, not copies
|
|
162
|
+
- [ ] DateTime: Indices named "Epoch"
|
|
163
|
+
- [ ] Inheritance: Base class for logging/units/constants
|
|
164
|
+
|
|
165
|
+
### Performance Review
|
|
166
|
+
- [ ] Operations: No unbounded find/grep commands
|
|
167
|
+
- [ ] Timeouts: Appropriate for operation complexity
|
|
168
|
+
- [ ] Memory: Efficient for large solar wind datasets
|
|
169
|
+
|
|
170
|
+
### Agent Routing Optimization
|
|
171
|
+
- Physics calculations → PhysicsValidator
|
|
172
|
+
- DataFrame operations → DataFrameArchitect
|
|
173
|
+
- Plotting code → PlottingEngineer
|
|
174
|
+
- Test files → TestEngineer
|
|
175
|
+
- Complex tasks → UnifiedPlanCoordinator
|
|
176
|
+
|
|
177
|
+
### SolarWindPy Scale Context
|
|
178
|
+
- ~50 Python files (focused scientific library)
|
|
179
|
+
- 1-2 active developers
|
|
180
|
+
- 5-10 PRs/month
|
|
181
|
+
- Sophisticated .claude agent/hook ecosystem
|
|
182
|
+
- Favor simplicity over complex engineering
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
## Validation Steps
|
|
186
|
+
|
|
187
|
+
### GitHub Workflow Validation
|
|
188
|
+
1. **Workflow Syntax**:
|
|
189
|
+
```bash
|
|
190
|
+
# Validate YAML syntax
|
|
191
|
+
yamllint .github/workflows/claude-code-review.yml
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
2. **Test Review Trigger**:
|
|
195
|
+
- Create test PR with physics file changes
|
|
196
|
+
- Verify physics-specific prompts are included
|
|
197
|
+
- Confirm agent routing suggestions appear
|
|
198
|
+
|
|
199
|
+
3. **Change Detection**:
|
|
200
|
+
- Test with trivial changes (skip review)
|
|
201
|
+
- Test with substantial changes (full review)
|
|
202
|
+
- Test with physics-specific changes (enhanced prompts)
|
|
203
|
+
|
|
204
|
+
### Review Quality Assessment
|
|
205
|
+
1. **Physics Focus**:
|
|
206
|
+
- Submit PR with unit inconsistency
|
|
207
|
+
- Verify review catches physics issues
|
|
208
|
+
- Confirm domain-specific feedback
|
|
209
|
+
|
|
210
|
+
2. **Agent Routing**:
|
|
211
|
+
- Submit PR affecting multiple domains
|
|
212
|
+
- Verify appropriate agent suggestions
|
|
213
|
+
- Confirm routing conflicts are resolved
|
|
214
|
+
|
|
215
|
+
## Dependencies
|
|
216
|
+
- **Phase 1**: Agent routing conflicts must be resolved
|
|
217
|
+
- **Phase 2**: Input validation enables better workflow triggers
|
|
218
|
+
- **GitHub Actions**: Must support enhanced YAML configuration
|
|
219
|
+
|
|
220
|
+
## Rollback Procedures
|
|
221
|
+
1. **Workflow**: Revert to original direct_prompt
|
|
222
|
+
2. **Documentation**: Remove new review guidelines
|
|
223
|
+
3. **Triggers**: Remove file-based review intensity logic
|
|
224
|
+
|
|
225
|
+
## Success Metrics
|
|
226
|
+
- **Review Quality**: More physics-specific, actionable feedback
|
|
227
|
+
- **Efficiency**: Skip trivial changes, focus on substantial ones
|
|
228
|
+
- **Agent Utilization**: Better suggestions for domain-specific work
|
|
229
|
+
- **Developer Experience**: Faster, more relevant review cycles
|
|
230
|
+
|
|
231
|
+
## Implementation Notes
|
|
232
|
+
- **SolarWindPy Specific**: Prompts tailored to solar wind physics domain
|
|
233
|
+
- **Leverage Existing**: Uses sophisticated agent routing system
|
|
234
|
+
- **Scale Appropriate**: Review intensity matches change significance
|
|
235
|
+
- **Maintainable**: Simple workflow enhancements, no complex logic
|
|
236
|
+
|
|
237
|
+
## Expected Outcomes
|
|
238
|
+
|
|
239
|
+
### Before Enhancement
|
|
240
|
+
- Generic code review feedback
|
|
241
|
+
- No physics domain awareness
|
|
242
|
+
- Manual agent selection required
|
|
243
|
+
- Same review intensity for all changes
|
|
244
|
+
|
|
245
|
+
### After Enhancement
|
|
246
|
+
- Physics-aware review feedback with unit/constraint checking
|
|
247
|
+
- Automatic agent routing suggestions based on file types
|
|
248
|
+
- Review intensity scaled to change significance
|
|
249
|
+
- Domain expertise leveraged through targeted prompts
|
|
250
|
+
|
|
251
|
+
### ROI Analysis
|
|
252
|
+
- **Time Investment**: 30 minutes
|
|
253
|
+
- **Value**: 2-4 hours/month saved on manual review
|
|
254
|
+
- **Payback**: 2-3 review cycles
|
|
255
|
+
- **Annual Value**: $1,200-2,400 in developer time
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
*Phase 3 completes the PR review enhancement by optimizing the GitHub integration to leverage SolarWindPy's domain expertise and sophisticated agent ecosystem, delivering more valuable automated reviews.*
|