Reorganize repository structure and clean up documentation
Clean up and organize the flask-shopdb repository for better maintainability and discoverability: ## Changes - Update .gitignore for build artifacts (publish/, data/, 122M total) - Reorganize .claude/ into 6 subdirectories with README navigation - Consolidate overlapping MCP setup guides into MCP-QUICK-START.md - Move deployment docs from root to docs/deployment/ - Archive dated status reports to .claude/archived/ - Delete temporary files (logs, backups, empty reports, ~50K) ## New Structure .claude/ organized into: - setup/ - MCP, VM, Hyper-V, GitHub setup guides + scripts (17 files) - plans/ - Feature plans and protocols (5 files) - maintenance/ - Deployment checklists and reports (4 files) - archived/ - Historical documentation (9 files) - skills/ - Claude Code automation (5 files) - workflows/ - Security audit workflow (1 file) docs/deployment/ created with 6 deployment guides: - LOCAL-DEV-SETUP.md, DOCKER-SETUP.md, DOCKER-PREBUILT-APPROACH.md - PRODUCTION-READINESS.md, DEPLOY-TO-VM.md, README.md Root directory cleaned to essential docs only: - CLAUDE.md, README.md, CONTRIBUTING.md, CHANGELOG.md Benefits: - Clear navigation via README.md in each subdirectory - No duplicate/overlapping documentation - Large artifacts properly gitignored (won't bloat repository) - Historical context preserved in archived/ See .claude/CLEANUP-SUMMARY.md for complete details. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
101
.claude/skills/test-changes.md
Normal file
101
.claude/skills/test-changes.md
Normal file
@@ -0,0 +1,101 @@
|
||||
---
|
||||
name: test-changes
|
||||
description: Run tests for recent changes before committing
|
||||
---
|
||||
|
||||
Run pytest for backend changes and check frontend builds successfully. Always run before claiming work is complete.
|
||||
|
||||
## Backend Tests
|
||||
|
||||
1. Navigate to repo root:
|
||||
```
|
||||
cd C:\Users\270015376\Documents\github\flask-shopdb
|
||||
```
|
||||
|
||||
2. Run full test suite:
|
||||
```
|
||||
pytest -v
|
||||
```
|
||||
|
||||
3. If focusing on specific plugin:
|
||||
```
|
||||
pytest tests/test_plugins/test_endpoints*.py -v
|
||||
pytest tests/test_plugins/test_notifications*.py -v
|
||||
```
|
||||
|
||||
4. For migration tests:
|
||||
```
|
||||
pytest tests/test_plugin_migrations.py -v
|
||||
```
|
||||
|
||||
## Frontend Checks
|
||||
|
||||
1. Navigate to frontend:
|
||||
```
|
||||
cd C:\Users\270015376\Documents\github\flask-shopdb\frontend
|
||||
```
|
||||
|
||||
2. Run frontend build to catch errors:
|
||||
```
|
||||
npm run build
|
||||
```
|
||||
This will catch Vue template errors, TypeScript issues, etc.
|
||||
|
||||
3. If tests exist:
|
||||
```
|
||||
npm test
|
||||
```
|
||||
|
||||
## Pre-Commit Checks
|
||||
|
||||
Run the naming/style checker:
|
||||
```
|
||||
./scripts/check-naming-and-style.sh
|
||||
```
|
||||
|
||||
This verifies:
|
||||
- Database table names are lowercase concatenated
|
||||
- No unicode/emojis in code
|
||||
- Column names are snake_case
|
||||
|
||||
## What to Check Based on Changes
|
||||
|
||||
**Database migrations**:
|
||||
- Run `pytest tests/test_plugin_migrations.py -v`
|
||||
- Verify migration runs forward and backward
|
||||
- Check no JSONB (use TEXT for MySQL)
|
||||
|
||||
**API endpoints**:
|
||||
- Run tests for the specific plugin
|
||||
- Test authentication/authorization
|
||||
- Check XSS escaping if handling user input
|
||||
|
||||
**Frontend components**:
|
||||
- Run `npm run build` to catch template errors
|
||||
- Check browser console for runtime errors
|
||||
- Test in actual browser if UI change
|
||||
|
||||
**Agent/Tray**:
|
||||
- Build with `dotnet build` to catch compile errors
|
||||
- No automated tests yet, test manually
|
||||
|
||||
## Common Test Failures
|
||||
|
||||
**Migration conflicts**:
|
||||
- Two branches both added migrations
|
||||
- Renumber the newer one
|
||||
|
||||
**Import errors**:
|
||||
- Missing `from shopdb.api import ...`
|
||||
- Should use API surface, not internal imports
|
||||
|
||||
**Database name violations**:
|
||||
- Table name has underscores (should be concatenated lowercase)
|
||||
- Column name not snake_case
|
||||
|
||||
## Notes
|
||||
|
||||
- Tests must pass before pushing to origin
|
||||
- Frontend build must complete without errors
|
||||
- Style checker must pass
|
||||
- Manual testing for agent/tray changes
|
||||
Reference in New Issue
Block a user