refactor: Remove deprecated scripts and clean up UIManager methods for improved maintainability

This commit is contained in:
William Valentin
2025-08-10 09:49:03 -07:00
parent 1fa9f9cd01
commit 7c7d892150
7 changed files with 2 additions and 292 deletions

View File

@@ -1,110 +0,0 @@
# TheChart Scripts Directory
This directory contains interactive demonstrations and utility scripts for TheChart application.
## Scripts Overview
### Testing Scripts
#### `run_tests.py`
Main test runner for the application.
```bash
cd /home/will/Code/thechart
.venv/bin/python scripts/run_tests.py
```
#### `integration_test.py`
Comprehensive integration test for the export system.
- Tests all export formats (JSON, XML, PDF)
- Validates data integrity and file creation
- No GUI dependencies - safe for automated testing
```bash
cd /home/will/Code/thechart
.venv/bin/python scripts/integration_test.py
```
### Feature Testing Scripts
#### `test_note_saving.py`
Tests note saving and retrieval functionality.
- Validates note persistence in CSV files
- Tests special characters and formatting
#### `test_update_entry.py`
Tests entry update functionality.
- Validates data modification operations
- Tests date validation and duplicate handling
#### `test_keyboard_shortcuts.py`
Tests keyboard shortcut functionality.
- Validates keyboard event handling
- Tests shortcut combinations and responses
### Interactive Demonstrations
#### `test_menu_theming.py`
Interactive demonstration of menu theming functionality.
- Live theme switching demonstration
- Visual display of theme colors
- Real-time menu color updates
```bash
cd /home/will/Code/thechart
.venv/bin/python scripts/test_menu_theming.py
```
## Usage
All scripts should be run from the project root directory using the virtual environment:
```bash
cd /home/will/Code/thechart
source .venv/bin/activate.fish # For fish shell
# OR
source .venv/bin/activate # For bash/zsh
python scripts/<script_name>.py
```
## Test Organization
### Unit Tests
Located in `/tests/` directory:
- `test_theme_manager.py` - Theme manager functionality tests
- `test_data_manager.py` - Data management tests
- `test_ui_manager.py` - UI component tests
- `test_graph_manager.py` - Graph functionality tests
- And more...
Run unit tests with:
```bash
cd /home/will/Code/thechart
.venv/bin/python -m pytest tests/
```
### Integration Tests
Located in `/scripts/` directory:
- `integration_test.py` - Export system integration test
- Feature-specific test scripts
### Interactive Demos
Located in `/scripts/` directory:
- `test_menu_theming.py` - Menu theming demonstration
## Test Data
- Integration tests create temporary export files in `integration_test_exports/` (auto-cleaned)
- Test scripts use the main `thechart_data.csv` file unless specified otherwise
- No test data is committed to the repository
## Development
When adding new scripts:
1. Place them in this directory
2. Use the standard shebang: `#!/usr/bin/env python3`
3. Add proper docstrings and error handling
4. Update this README with script documentation
5. Follow the project's linting and formatting standards
6. For unit tests, place them in `/tests/` directory
7. For integration tests or demos, place them in `/scripts/` directory

View File

@@ -1,27 +0,0 @@
#!/usr/bin/env python3
"""
⚠️ DEPRECATED SCRIPT ⚠️
This script has been consolidated into the new unified test suite.
Please use the new testing structure instead:
For theme testing:
.venv/bin/python scripts/quick_test.py theme
For integration testing:
.venv/bin/python scripts/quick_test.py integration
For all tests:
.venv/bin/python scripts/run_tests.py
See TESTING_MIGRATION.md for full details.
"""
import sys
print("⚠️ This script is deprecated. Please use the new test structure.")
print("See TESTING_MIGRATION.md for migration instructions.")
sys.exit(1)
# Original script content below (preserved for reference):
# """ + content[content.find('"""'):] if '"""' in content else content + """

View File

@@ -1,27 +0,0 @@
#!/usr/bin/env python3
"""
⚠️ DEPRECATED SCRIPT ⚠️
This script has been consolidated into the new unified test suite.
Please use the new testing structure instead:
For theme testing:
.venv/bin/python scripts/quick_test.py theme
For integration testing:
.venv/bin/python scripts/quick_test.py integration
For all tests:
.venv/bin/python scripts/run_tests.py
See TESTING_MIGRATION.md for full details.
"""
import sys
print("⚠️ This script is deprecated. Please use the new test structure.")
print("See TESTING_MIGRATION.md for migration instructions.")
sys.exit(1)
# Original script content below (preserved for reference):
# """ + content[content.find('"""'):] if '"""' in content else content + """

View File

@@ -1,27 +0,0 @@
#!/usr/bin/env python3
"""
⚠️ DEPRECATED SCRIPT ⚠️
This script has been consolidated into the new unified test suite.
Please use the new testing structure instead:
For theme testing:
.venv/bin/python scripts/quick_test.py theme
For integration testing:
.venv/bin/python scripts/quick_test.py integration
For all tests:
.venv/bin/python scripts/run_tests.py
See TESTING_MIGRATION.md for full details.
"""
import sys
print("⚠️ This script is deprecated. Please use the new test structure.")
print("See TESTING_MIGRATION.md for migration instructions.")
sys.exit(1)
# Original script content below (preserved for reference):
# """ + content[content.find('"""'):] if '"""' in content else content + """

View File

@@ -1,27 +0,0 @@
#!/usr/bin/env python3
"""
⚠️ DEPRECATED SCRIPT ⚠️
This script has been consolidated into the new unified test suite.
Please use the new testing structure instead:
For theme testing:
.venv/bin/python scripts/quick_test.py theme
For integration testing:
.venv/bin/python scripts/quick_test.py integration
For all tests:
.venv/bin/python scripts/run_tests.py
See TESTING_MIGRATION.md for full details.
"""
import sys
print("⚠️ This script is deprecated. Please use the new test structure.")
print("See TESTING_MIGRATION.md for migration instructions.")
sys.exit(1)
# Original script content below (preserved for reference):
# """ + content[content.find('"""'):] if '"""' in content else content + """