Implement core skills: Code validation, model fine-tuning, and system diagnostics

- Added `ModelFineTuner` class for preparing training data and fine-tuning models based on user corrections.
- Introduced `CodeValidator` class to validate generated code against various hardware and style rules, including safety checks and function naming conventions.
- Developed skills for calculator operations, system information retrieval, weather fetching, and timer functionality.
- Implemented a self-diagnostic skill to run unit tests and report results.
- Created a dynamic skill loading mechanism to discover and register skills from the current directory.
- Added unit tests for skills to ensure functionality and reliability.
This commit is contained in:
JamesTheGiblet 2026-01-06 22:04:37 +00:00
parent 743f9f311d
commit f9fd27d228
28 changed files with 2398 additions and 4077 deletions

29
tests/test_all.py Normal file
View file

@ -0,0 +1,29 @@
import unittest
import sys
import os
def run_suite():
"""
Discover and run all tests in the tests/ directory.
"""
# Get directories
tests_dir = os.path.dirname(os.path.abspath(__file__))
project_root = os.path.dirname(tests_dir)
# Add project root to sys.path to allow imports of 'core', 'skills', etc.
if project_root not in sys.path:
sys.path.insert(0, project_root)
# Discover tests
loader = unittest.TestLoader()
suite = loader.discover(tests_dir, pattern="test_*.py", top_level_dir=project_root)
# Run tests
runner = unittest.TextTestRunner(verbosity=2)
result = runner.run(suite)
return result.wasSuccessful()
if __name__ == "__main__":
success = run_suite()
sys.exit(0 if success else 1)