Skip to content

refactor: address all code review issues#9

Open
redlotusaustin wants to merge 5 commits intoblacksiders:mainfrom
redlotusaustin:refactor/address-code-review-issues
Open

refactor: address all code review issues#9
redlotusaustin wants to merge 5 commits intoblacksiders:mainfrom
redlotusaustin:refactor/address-code-review-issues

Conversation

@redlotusaustin
Copy link

Summary

This PR addresses all issues identified in the comprehensive code review:

High Priority

  • ✅ Add path validation for --skill-dir and --vault-dir arguments
  • ✅ Add comprehensive error handling for directory operations
  • ✅ Fix symlink handling to prevent source deletion

Medium Priority

  • ✅ Add type hints to all functions
  • ✅ Define magic numbers as constants
  • ✅ Fix IndexOutOfBounds risk in unknown args check
  • ✅ Add unit tests (38 tests, 100% pass rate)

Low Priority

  • ✅ Remove artificial time.sleep() delays
  • ✅ Use Path.as_posix() for cross-platform paths
  • ✅ Add docstrings to all functions
  • ✅ Add __version__ and shebang
  • ✅ Optimize category matching with precomputed lookup dict
  • ✅ Add --dry-run mode for previewing changes

New Features

  • --dry-run flag to preview changes without executing
  • --version flag to show version number
  • Comprehensive error messages with color-coded output

Testing

$ python -m pytest tests/ -v
========================= 38 passed in 0.07s =========================

Breaking Changes

None - all changes are backward compatible.

Files Changed

  • setup.py - Complete refactor with all fixes
  • README.md - Updated documentation with new CLI options
  • pyproject.toml - Added for project configuration
  • .gitignore - Added for Python/Venv exclusions
  • tests/test_setup.py - 38 comprehensive unit tests

elCorbacho and others added 5 commits March 9, 2026 01:20
Add new 'debug' domain category to DOMAIN_HEURISTICS with keywords covering:
- Debugging tools and techniques (debug, breakpoint, trace)
- Logging frameworks (logger, logging)
- Performance profiling (profiler, profiling, devtools)
- Monitoring and observability (sentry, datadog, newrelic)
- Error tracking and diagnostics (error-tracking, diagnostic)

This enables automatic skill classification for debugging-related tools and extensions.
- Add --skill-dir to override source skills directory
- Add --vault-dir to override destination vault directory
- Fix symlink handling to prevent source deletion
- Fix shutil.move to use explicit destination path
…g/programming/security

- Add 'documentation' category for code-documenter, docstrings, swagger, etc
- Add 'wordpress' category for wordpress, generateblocks, gutenberg, woocommerce
- Add bug-hunter/hunter/bug keywords to debug category
- Add vibesec/vibe-security keywords to security category
- Add find-skills to tooling category
- Add mago to programming category
High Priority:
- Add path validation for --skill-dir and --vault-dir arguments
- Add comprehensive error handling for directory operations
- Fix symlink handling to prevent source deletion

Medium Priority:
- Add type hints to all functions
- Define magic numbers as constants (PROGRESS_LOG_THRESHOLD, BATCH_PROGRESS_INTERVAL)
- Fix IndexOutOfBounds risk in unknown args check
- Add unit tests (38 tests, 100% pass rate)

Low Priority:
- Remove artificial time.sleep() delays
- Use Path.as_posix() for cross-platform paths
- Add docstrings to all functions
- Add __version__ and shebang
- Optimize category matching with precomputed lookup dict
- Add --dry-run mode for previewing changes

Documentation:
- Update README with new CLI options table
- Add Development & Testing section
- Add pyproject.toml for project configuration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants