From 422617eb6c5e4018b4c57557b6f4dd5984726a00 Mon Sep 17 00:00:00 2001 From: William Valentin Date: Wed, 6 Aug 2025 10:58:25 -0700 Subject: [PATCH] feat: Update documentation structure and content - Added a link to the Recent Improvements section in the README.md for better visibility of new features. - Removed the SEARCH_FILTER_FIX.md file as its content has been integrated into other documentation. - Deleted the consolidate_docs.py script as its functionality is no longer needed after the documentation consolidation. - Removed the outdated CHANGELOG.md file and replaced it with a new structure that consolidates all changelog information. - Created a new DOCUMENTATION_INDEX.md file to provide a comprehensive guide to the documentation structure. - Updated the docs/README.md to reflect the new documentation organization and included links to preserved legacy documentation. --- DOCS_MIGRATION.md | 149 -------- PROJECT_CONSOLIDATION_SUMMARY.md | 266 ------------- README.md | 1 + SEARCH_FILTER_FIX.md | 77 ---- consolidate_docs.py | 617 ------------------------------- docs/CHANGELOG.md | 269 -------------- docs/DOCUMENTATION_INDEX.md | 78 ++++ docs/README.md | 34 +- 8 files changed, 99 insertions(+), 1392 deletions(-) delete mode 100644 DOCS_MIGRATION.md delete mode 100644 PROJECT_CONSOLIDATION_SUMMARY.md delete mode 100644 SEARCH_FILTER_FIX.md delete mode 100644 consolidate_docs.py delete mode 100644 docs/CHANGELOG.md create mode 100644 docs/DOCUMENTATION_INDEX.md diff --git a/DOCS_MIGRATION.md b/DOCS_MIGRATION.md deleted file mode 100644 index ca8c50c..0000000 --- a/DOCS_MIGRATION.md +++ /dev/null @@ -1,149 +0,0 @@ -# Documentation Migration Notice - -## ๐Ÿ“š TheChart Documentation Consolidation - -### โš ๏ธ Important: Documentation Structure Changed - -The documentation for TheChart has been **consolidated and reorganized** for better usability and maintenance. - -### ๐Ÿ”„ What Changed - -#### Old Structure (Scattered) -``` -docs/ -โ”œโ”€โ”€ FEATURES.md -โ”œโ”€โ”€ KEYBOARD_SHORTCUTS.md -โ”œโ”€โ”€ DEVELOPMENT.md -โ”œโ”€โ”€ TESTING.md -โ”œโ”€โ”€ EXPORT_SYSTEM.md -โ”œโ”€โ”€ MENU_THEMING.md -โ”œโ”€โ”€ CHANGELOG.md -โ”œโ”€โ”€ README.md -โ””โ”€โ”€ DOCUMENTATION_SUMMARY.md -``` - -#### New Structure (Consolidated) -``` -./ -โ”œโ”€โ”€ USER_GUIDE.md # ๐Ÿ†• Complete user manual -โ”œโ”€โ”€ DEVELOPER_GUIDE.md # ๐Ÿ†• Development & testing -โ”œโ”€โ”€ API_REFERENCE.md # ๐Ÿ†• Technical documentation -โ”œโ”€โ”€ README.md # Updated project overview -โ”œโ”€โ”€ CHANGELOG.md # Preserved as-is -โ””โ”€โ”€ docs/ - โ””โ”€โ”€ README.md # ๐Ÿ†• Documentation index -``` - -### ๐Ÿ“‹ Content Migration Map - -| Old File | New Location | Content | -|----------|--------------|---------| -| `FEATURES.md` | `USER_GUIDE.md` | Features, UI/UX, themes | -| `KEYBOARD_SHORTCUTS.md` | `USER_GUIDE.md` | All keyboard shortcuts | -| `DEVELOPMENT.md` | `DEVELOPER_GUIDE.md` | Dev setup, architecture | -| `TESTING.md` | `DEVELOPER_GUIDE.md` | Testing procedures | -| `EXPORT_SYSTEM.md` | `API_REFERENCE.md` | Export functionality | -| `MENU_THEMING.md` | `API_REFERENCE.md` | Theming system | -| `README.md` | Updated `README.md` | Enhanced overview | -| `CHANGELOG.md` | `CHANGELOG.md` | Preserved unchanged | - -### โœจ Benefits of New Structure - -1. **Better User Experience**: Clear entry points for different user types -2. **Reduced Redundancy**: Eliminated duplicate content across files -3. **Easier Maintenance**: Fewer files to keep synchronized -4. **Improved Navigation**: Logical organization by purpose -5. **Comprehensive Coverage**: All original content preserved and enhanced - -### ๐Ÿš€ How to Use New Documentation - -#### For Application Users -```bash -# Start here for complete user manual -โ†’ USER_GUIDE.md - - Features and functionality - - Keyboard shortcuts - - Theme customization - - Usage workflows -``` - -#### For Developers -```bash -# Start here for development information -โ†’ DEVELOPER_GUIDE.md - - Environment setup - - Testing framework (consolidated) - - Architecture overview - - Code quality standards -``` - -#### For Technical Details -```bash -# Start here for technical documentation -โ†’ API_REFERENCE.md - - Export system architecture - - Theming implementation - - API specifications -``` - -### ๐Ÿ” Finding Specific Information - -#### Common Lookups -- **"How do I use feature X?"** โ†’ `USER_GUIDE.md` -- **"What are the keyboard shortcuts?"** โ†’ `USER_GUIDE.md` (Keyboard Shortcuts section) -- **"How do I set up development?"** โ†’ `DEVELOPER_GUIDE.md` -- **"How do I run tests?"** โ†’ `DEVELOPER_GUIDE.md` (includes consolidated test info) -- **"How does export work?"** โ†’ `API_REFERENCE.md` -- **"What themes are available?"** โ†’ `USER_GUIDE.md` (Theme System section) - -### ๐Ÿ“‚ Backup Information - -**Original files backed up to**: `docs_backup_20250805_145336/` - -All original documentation files have been preserved in the backup directory for reference. - -### ๐Ÿ”— Integration with Test Consolidation - -This documentation consolidation complements the recent test structure consolidation: -- **Test documentation** moved from scattered scripts to `DEVELOPER_GUIDE.md` -- **Testing procedures** unified and enhanced -- **New test runners** documented with usage examples -- **Migration guides** included for both docs and tests - -### ๐Ÿ“Š Consolidation Statistics - -- **Files reduced**: 9 scattered files โ†’ 4 organized documents -- **Redundancy eliminated**: ~60% reduction in duplicate content -- **Content preserved**: 100% of original information retained -- **Navigation improved**: Clear user journey for each audience -- **Maintenance simplified**: Fewer files to synchronize - -### ๐ŸŽฏ Next Steps - -1. **Update bookmarks** to use new documentation files -2. **Review consolidated content** in the new structure -3. **Use documentation index** (`docs/README.md`) for navigation -4. **Check backup** if you need reference to original files - ---- - -## ๐Ÿ”„ Related Changes - -This documentation consolidation is part of broader project improvements: - -### Recent Consolidations -- โœ… **Test Consolidation**: Unified test structure with new runners -- โœ… **Documentation Consolidation**: This reorganization -- ๐Ÿš€ **Future**: Continued improvements to project organization - -### Quality Improvements -- Enhanced test coverage and organization -- Better documentation structure and navigation -- Streamlined development workflows -- Improved user and developer experience - ---- - -*Migration completed on: 2025-08-05 14:53:36* -*Backup location: `docs_backup_20250805_145336/`* -*For questions about this migration, see the consolidated documentation.* diff --git a/PROJECT_CONSOLIDATION_SUMMARY.md b/PROJECT_CONSOLIDATION_SUMMARY.md deleted file mode 100644 index dfc4323..0000000 --- a/PROJECT_CONSOLIDATION_SUMMARY.md +++ /dev/null @@ -1,266 +0,0 @@ -# ๐ŸŽ‰ TheChart Project Consolidation Summary - -## โœ… Complete Project Organization Overhaul - -TheChart has undergone a comprehensive consolidation to improve maintainability, usability, and developer experience. Both **testing** and **documentation** structures have been completely reorganized. - ---- - -## ๐Ÿ“š Documentation Consolidation - -### โœจ **What Was Accomplished** - -#### **Before: Scattered Documentation (9+ files)** -``` -docs/ -โ”œโ”€โ”€ FEATURES.md -โ”œโ”€โ”€ KEYBOARD_SHORTCUTS.md -โ”œโ”€โ”€ DEVELOPMENT.md -โ”œโ”€โ”€ TESTING.md -โ”œโ”€โ”€ EXPORT_SYSTEM.md -โ”œโ”€โ”€ MENU_THEMING.md -โ”œโ”€โ”€ CHANGELOG.md -โ”œโ”€โ”€ README.md -โ””โ”€โ”€ DOCUMENTATION_SUMMARY.md -``` - -#### **After: Unified Documentation (4 main files)** -``` -./ -โ”œโ”€โ”€ USER_GUIDE.md # ๐Ÿ†• Complete user manual -โ”œโ”€โ”€ DEVELOPER_GUIDE.md # ๐Ÿ†• Development & testing -โ”œโ”€โ”€ API_REFERENCE.md # ๐Ÿ†• Technical documentation -โ”œโ”€โ”€ README.md # โœจ Enhanced project overview -โ”œโ”€โ”€ CHANGELOG.md # Preserved as-is -โ””โ”€โ”€ docs/ - โ””โ”€โ”€ README.md # ๐Ÿ†• Documentation index -``` - -### ๐Ÿ“Š **Documentation Benefits** -- **60% reduction** in duplicate content -- **100% content preservation** - nothing lost -- **Clear user journeys** for different audiences -- **Easier maintenance** with fewer files to sync -- **Better discoverability** with logical organization - ---- - -## ๐Ÿงช Testing Consolidation - -### โœจ **What Was Accomplished** - -#### **Before: Mixed Testing Structure** -``` -scripts/ -โ”œโ”€โ”€ test_note_saving.py -โ”œโ”€โ”€ test_update_entry.py -โ”œโ”€โ”€ test_keyboard_shortcuts.py -โ”œโ”€โ”€ test_theme_changing.py -โ”œโ”€โ”€ test_menu_theming.py -โ””โ”€โ”€ integration_test.py - -tests/ -โ”œโ”€โ”€ test_*.py (unit tests) -โ””โ”€โ”€ conftest.py -``` - -#### **After: Unified Testing Structure** -``` -tests/ -โ”œโ”€โ”€ test_integration.py # ๐Ÿ†• Consolidated integration tests -โ”œโ”€โ”€ test_*.py # Enhanced unit tests -โ””โ”€โ”€ conftest.py # Test fixtures - -scripts/ -โ”œโ”€โ”€ run_tests.py # ๐Ÿ†• Main test runner -โ”œโ”€โ”€ quick_test.py # ๐Ÿ†• Quick test categories -โ”œโ”€โ”€ integration_test.py # Legacy (preserved) -โ””โ”€โ”€ deprecated_*.py # Old scripts (archived) -``` - -### ๐Ÿš€ **New Testing Workflow** - -#### **Quick Development Testing** -```bash -# Fast unit tests (development workflow) -.venv/bin/python scripts/quick_test.py unit - -# Theme-specific tests (UI work) -.venv/bin/python scripts/quick_test.py theme - -# Integration tests (feature work) -.venv/bin/python scripts/quick_test.py integration -``` - -#### **Comprehensive Testing** -```bash -# Full test suite with coverage -.venv/bin/python scripts/run_tests.py - -# Or use make -make test -``` - -### ๐Ÿ“Š **Testing Benefits** -- **Unified framework**: Everything uses pytest -- **Better organization**: Related tests grouped logically -- **Faster development**: Quick test categories -- **Enhanced coverage**: Integrated reporting -- **CI/CD ready**: Streamlined automation - ---- - -## ๐Ÿ› Bug Fixes Included - -### **Theme Manager Error Fixed** -- โœ… **Resolved**: `'_tkinter.Tcl_Obj' object has no attribute 'startswith'` -- โœ… **Result**: All theme switching now works perfectly -- โœ… **Coverage**: Theme tests pass consistently - -### **Import Issues Fixed** -- โœ… **Resolved**: Various import path issues in tests -- โœ… **Result**: Clean test execution across all environments -- โœ… **Coverage**: Proper module resolution - ---- - -## ๐Ÿ“ New Project Structure - -### **Root Level (Clean & Organized)** -``` -thechart/ -โ”œโ”€โ”€ USER_GUIDE.md # ๐Ÿ‘ฅ For users -โ”œโ”€โ”€ DEVELOPER_GUIDE.md # ๐Ÿ‘จโ€๐Ÿ’ป For developers -โ”œโ”€โ”€ API_REFERENCE.md # ๐Ÿ”ง Technical reference -โ”œโ”€โ”€ README.md # ๐Ÿš€ Project overview -โ”œโ”€โ”€ CHANGELOG.md # ๐Ÿ“‹ Version history -โ”œโ”€โ”€ tests/ # ๐Ÿงช Unified test suite -โ”œโ”€โ”€ scripts/ # ๐Ÿ› ๏ธ Test runners & utilities -โ”œโ”€โ”€ src/ # ๐Ÿ’ป Application code -โ””โ”€โ”€ docs/ # ๐Ÿ“š Documentation index -``` - -### **Clear User Journeys** -- **New Users** โ†’ `README.md` โ†’ `USER_GUIDE.md` -- **Developers** โ†’ `README.md` โ†’ `DEVELOPER_GUIDE.md` -- **Technical Users** โ†’ `API_REFERENCE.md` -- **Contributors** โ†’ `DEVELOPER_GUIDE.md` (includes testing) - ---- - -## ๐ŸŽฏ Usage Guide - -### **For Application Users** -```bash -# Read this first -๐Ÿ“– USER_GUIDE.md - โ”œโ”€โ”€ Complete feature documentation - โ”œโ”€โ”€ All keyboard shortcuts - โ”œโ”€โ”€ Theme system guide - โ””โ”€โ”€ Usage workflows -``` - -### **For Developers** -```bash -# Development setup and testing -๐Ÿ“– DEVELOPER_GUIDE.md - โ”œโ”€โ”€ Environment setup - โ”œโ”€โ”€ Consolidated testing guide - โ”œโ”€โ”€ Architecture overview - โ””โ”€โ”€ Code quality standards - -# Quick development testing -โšก scripts/quick_test.py unit -โšก scripts/quick_test.py theme -``` - -### **For Technical Integration** -```bash -# Technical documentation -๐Ÿ“– API_REFERENCE.md - โ”œโ”€โ”€ Export system architecture - โ”œโ”€โ”€ Theming implementation - โ”œโ”€โ”€ API specifications - โ””โ”€โ”€ System internals -``` - ---- - -## ๐Ÿ“Š Consolidation Impact - -### **Before Consolidation** -- ๐Ÿ“„ **9+ scattered documentation files** with overlapping content -- ๐Ÿงช **6+ individual test scripts** with different frameworks -- ๐Ÿ”€ **Mixed organization** making navigation difficult -- ๐Ÿ› **Theme switching errors** affecting user experience -- ๐Ÿงฉ **Inconsistent testing** approaches and coverage - -### **After Consolidation** -- ๐Ÿ“„ **4 well-organized documents** with clear purposes -- ๐Ÿงช **Unified test framework** with pytest throughout -- ๐ŸŽฏ **Clear user journeys** for different audiences -- โœ… **Bug-free theme switching** with comprehensive tests -- ๐Ÿš€ **Streamlined workflows** for both users and developers - -### **Quantified Improvements** -- **Documentation**: 60% reduction in redundancy, 100% content preservation -- **Testing**: Unified framework, enhanced coverage, faster development cycles -- **Bug Fixes**: Theme switching now works flawlessly -- **Developer Experience**: Clear workflows and quick feedback loops -- **Maintenance**: Significantly reduced overhead - ---- - -## ๐Ÿš€ Next Steps - -### **Immediate Use** -1. **New users**: Start with `README.md` โ†’ `USER_GUIDE.md` -2. **Developers**: Check `DEVELOPER_GUIDE.md` for setup and testing -3. **Testing**: Use `quick_test.py` for development, `run_tests.py` for comprehensive testing - -### **Development Workflow** -```bash -# During development -.venv/bin/python scripts/quick_test.py unit # Fast feedback - -# Before commits -.venv/bin/python scripts/run_tests.py # Full validation - -# When working on themes/UI -.venv/bin/python scripts/quick_test.py theme # Theme-specific tests -``` - -### **Documentation Updates** -- All documentation is now consolidated and easier to maintain -- Changes needed in fewer places -- Clear ownership and purpose for each document - ---- - -## ๐ŸŽ‰ Success Metrics - -### **User Experience** -- โœ… **Clear entry points** for different user types -- โœ… **Comprehensive guides** without overwhelming detail -- โœ… **Working theme system** with extensive customization -- โœ… **Complete keyboard shortcuts** for efficient usage - -### **Developer Experience** -- โœ… **Fast test feedback** with categorized testing -- โœ… **Clear development setup** with modern tooling -- โœ… **Comprehensive coverage** with integrated reporting -- โœ… **Bug-free core functionality** with theme switching - -### **Project Quality** -- โœ… **Reduced maintenance overhead** through consolidation -- โœ… **Better organization** with logical file structure -- โœ… **Enhanced discoverability** through clear navigation -- โœ… **Future-ready architecture** for continued development - ---- - -**TheChart** is now fully consolidated with professional documentation, unified testing, and bug-free core functionality! ๐ŸŽ‰ - -*Consolidation completed: August 5, 2025* -*Documentation backup: `docs_backup_*/`* -*Migration guides: `DOCS_MIGRATION.md`, `scripts/TESTING_MIGRATION.md`* diff --git a/README.md b/README.md index b4b1269..ae72a40 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ make test ### ๐Ÿ› ๏ธ **For Developers** - **[Developer Guide](DEVELOPER_GUIDE.md)** - Development setup, testing, and architecture - **[API Reference](API_REFERENCE.md)** - Technical documentation and system APIs +- **[Recent Improvements](IMPROVEMENTS_SUMMARY.md)** - Latest enhancements and new features ### ๐Ÿ“– **Complete Navigation** - **[Documentation Index](docs/README.md)** - Comprehensive documentation navigation diff --git a/SEARCH_FILTER_FIX.md b/SEARCH_FILTER_FIX.md deleted file mode 100644 index 41b022b..0000000 --- a/SEARCH_FILTER_FIX.md +++ /dev/null @@ -1,77 +0,0 @@ -# Search Filter Panel Display Fix Summary - -## Issue Description -The Search & Filter panel was not displaying all of its elements properly due to sizing constraints in the UI layout. - -## Root Cause Analysis -1. **Insufficient Vertical Space**: The search filter widget was positioned in grid row 1 with `weight=0`, meaning it couldn't expand vertically when needed. -2. **Layout Constraints**: The widget was using `sticky="ew"` (only horizontal expansion) instead of allowing vertical expansion. -3. **Content Overflow**: The widget contained many elements (search box, quick filters, date range, medicine filters, pathology filters) that needed more space than allocated. - -## Solutions Implemented - -### 1. Grid Layout Improvements (`main.py`) -- **Added minimum height**: Set `minsize=200` for the search filter row to ensure adequate space -- **Updated row configuration**: Modified grid row configuration to properly accommodate the search filter widget -- **Better weight distribution**: Maintained main weight on the table row while giving the search filter adequate space - -### 2. Search Filter Widget Enhancements (`search_filter_ui.py`) -- **Added scrollable container**: Implemented a Canvas with scrollbar for handling overflow content -- **Improved sticky configuration**: Changed from `sticky="ew"` to `sticky="nsew"` for full expansion -- **Compact layout design**: Reorganized elements to use space more efficiently: - - Reduced padding and margins throughout - - Made labels shorter (8 characters max) - - Arranged medicines in 4 columns instead of 3 - - Arranged pathologies in 2 rows side-by-side - - Reduced button text sizes - -### 3. User Experience Improvements -- **Mouse wheel scrolling**: Added support for mouse wheel scrolling within the filter panel -- **Cross-platform scrolling**: Implemented both Windows (``) and Linux (``, ``) scroll events -- **Fixed height container**: Limited the container height to 180px to prevent it from taking over the entire UI -- **Visual hierarchy**: Maintained clear separation between different filter sections - -## Technical Details - -### Before (Issues): -```python -# Grid configuration gave no vertical space to search filter -main_frame.grid_rowconfigure(i, weight=1 if i == 2 else 0) - -# Widget couldn't expand vertically -self.frame.grid(row=1, column=0, columnspan=2, sticky="ew", padx=10, pady=5) - -# No overflow handling for content -``` - -### After (Fixed): -```python -# Grid configuration with minimum height for search filter -if i == 1: # Search filter row - main_frame.grid_rowconfigure(i, weight=0, minsize=200) -elif i == 2: # Table row gets main weight - main_frame.grid_rowconfigure(i, weight=1) - -# Widget can expand in all directions -self.frame.grid(row=1, column=0, columnspan=2, sticky="nsew", padx=10, pady=5) - -# Scrollable container for overflow content -canvas = tk.Canvas(self.frame, height=180) # Limited height -scrollbar = ttk.Scrollbar(self.frame, orient="vertical", command=canvas.yview) -scrollable_frame = ttk.Frame(canvas) -``` - -## Results -- โœ… **All filter elements now visible**: Search box, quick filters, date range, medicine filters, and pathology filters -- โœ… **Scrollable interface**: Users can scroll through all filter options if content exceeds visible area -- โœ… **Responsive layout**: Filter panel adapts to different window sizes -- โœ… **Improved usability**: Mouse wheel scrolling and compact design improve user experience -- โœ… **Maintained functionality**: All existing search and filter capabilities work as before - -## User Instructions -1. **Toggle Panel**: Press `Ctrl+F` or use "Tools โ†’ Search & Filter" menu -2. **Scroll Content**: Use mouse wheel or scrollbar to navigate through filter options -3. **Compact Interface**: All elements are now visible and accessible within the allocated space -4. **Filter Controls**: All medicine and pathology filters are fully functional and visible - -The search filter panel now properly displays all its elements while maintaining a clean, organized interface that doesn't overwhelm the main application UI. diff --git a/consolidate_docs.py b/consolidate_docs.py deleted file mode 100644 index 91a7d0e..0000000 --- a/consolidate_docs.py +++ /dev/null @@ -1,617 +0,0 @@ -#!/usr/bin/env python3 -""" -Documentation consolidation script for TheChart. -Consolidates scattered documentation into a unified, well-organized structure. -""" - -import shutil -from datetime import datetime -from pathlib import Path - - -def create_unified_documentation(): - """Create a consolidated documentation structure.""" - - print("๐Ÿ“š TheChart Documentation Consolidation") - print("=" * 45) - - # Define the new consolidated structure - consolidated_docs = { - "USER_GUIDE.md": { - "title": "TheChart User Guide", - "sources": ["FEATURES.md", "KEYBOARD_SHORTCUTS.md"], - "description": "Complete user manual with features, shortcuts, and usage", - }, - "DEVELOPER_GUIDE.md": { - "title": "TheChart Developer Guide", - "sources": ["DEVELOPMENT.md", "TESTING.md"], - "description": "Development setup, testing, and architecture", - }, - "API_REFERENCE.md": { - "title": "TheChart API Reference", - "sources": ["EXPORT_SYSTEM.md", "MENU_THEMING.md"], - "description": "Technical API documentation and system details", - }, - "CHANGELOG.md": { - "title": "Version History", - "sources": ["CHANGELOG.md"], - "description": "Version history and release notes (preserved as-is)", - }, - } - - # Create backup of original docs - backup_dir = Path("docs_backup_" + datetime.now().strftime("%Y%m%d_%H%M%S")) - backup_dir.mkdir(exist_ok=True) - - docs_dir = Path("docs") - if docs_dir.exists(): - print(f"1. Creating backup in {backup_dir}/") - shutil.copytree(docs_dir, backup_dir / "docs", dirs_exist_ok=True) - - print("2. Consolidating documentation...") - - # Create consolidated docs - for filename, config in consolidated_docs.items(): - print(f" Creating {filename}...") - create_consolidated_doc(filename, config) - - # Create updated main README - print("3. Updating main README.md...") - create_updated_main_readme() - - # Create new documentation index - print("4. Creating new documentation index...") - create_new_docs_index() - - # Create migration notice - print("5. Creating migration notice...") - create_docs_migration_notice(backup_dir) - - print("\nโœ… Documentation consolidation completed!") - print(f"๐Ÿ“‹ Backup created in: {backup_dir}/") - - -def create_consolidated_doc(filename, config): - """Create a consolidated documentation file.""" - - content = f"""# {config["title"]} - -> ๐Ÿ“– **Consolidated Documentation**: This document combines multiple documentation -files for better organization and easier navigation. - -## Table of Contents -- [Overview](#overview) -""" - - # Read and combine source files - docs_dir = Path("docs") - combined_content = [] - - for source_file in config["sources"]: - source_path = docs_dir / source_file - if source_path.exists(): - print(f" Incorporating {source_file}...") - - with open(source_path, encoding="utf-8") as f: - source_content = f.read() - - # Process and clean the content - processed_content = process_source_content(source_content, source_file) - combined_content.append(processed_content) - - # Build the final document - if combined_content: - content += "\n## Overview\n\n" - content += config["description"] + "\n\n" - content += "\n\n".join(combined_content) - - # Add footer - content += f""" - ---- - -## ๐Ÿ“– Documentation Navigation - -- [User Guide](USER_GUIDE.md) - Features, shortcuts, and usage -- [Developer Guide](DEVELOPER_GUIDE.md) - Development and testing -- [API Reference](API_REFERENCE.md) - Technical documentation -- [Changelog](CHANGELOG.md) - Version history -- [Documentation Index](docs/README.md) - Complete navigation - ---- - -*This document was generated by the documentation consolidation system.* -*Last updated: {datetime.now().strftime("%Y-%m-%d %H:%M:%S")}* -""" - - # Write the consolidated document - with open(filename, "w", encoding="utf-8") as f: - f.write(content) - - -def process_source_content(content, source_file): - """Process source content for inclusion in consolidated document.""" - - lines = content.split("\n") - processed_lines = [] - - # Skip the first title line (we'll use our own) - skip_first_title = True - - for line in lines: - # Skip the first H1 title - if skip_first_title and line.startswith("# "): - skip_first_title = False - continue - - # Adjust heading levels (shift down by 1) - if line.startswith("#"): - line = "#" + line - - processed_lines.append(line) - - # Add source attribution - attribution = f"\n---\n*Originally from: {source_file}*\n" - - return "\n".join(processed_lines) + attribution - - -def create_updated_main_readme(): - """Create an updated main README with consolidated documentation links.""" - - content = """# TheChart -Modern medication tracking application with advanced UI/UX for monitoring treatment -progress and symptom evolution. - -## ๐Ÿš€ Quick Start -```bash -# Install dependencies -make install - -# Run the application -make run - -# Run tests (consolidated test suite) -make test -``` - -## ๐Ÿ“š Documentation - -### ๐ŸŽฏ **For Users** -- **[User Guide](USER_GUIDE.md)** - Complete features, keyboard shortcuts, and usage -guide -- **[Changelog](CHANGELOG.md)** - Version history and recent improvements - -### ๐Ÿ› ๏ธ **For Developers** -- **[Developer Guide](DEVELOPER_GUIDE.md)** - Development setup, testing, and -architecture -- **[API Reference](API_REFERENCE.md)** - Technical documentation and system APIs - -### ๐Ÿ“– **Complete Navigation** -- **[Documentation Index](docs/README.md)** - Comprehensive documentation navigation - -> ๐Ÿ’ก **Getting Started**: New users should start with the [User Guide](USER_GUIDE.md), -while developers should check the [Developer Guide](DEVELOPER_GUIDE.md). - -## โœจ Recent Major Updates (v1.9.5+) - -### ๐ŸŽจ UI/UX Improvements -- **8 Professional Themes**: Arc, Equilux, Adapta, Yaru, Ubuntu, Plastik, Breeze, -Elegance -- **Smart Tooltips**: Context-sensitive help throughout the application -- **Enhanced Keyboard Shortcuts**: Comprehensive shortcut system for all operations -- **Modern Styling**: Card-style frames, professional form controls, responsive design - -### ๐Ÿงช Testing Improvements -- **Consolidated Test Suite**: Unified pytest-based testing structure -- **Quick Test Categories**: Unit, integration, and theme-specific tests -- **Enhanced Coverage**: Comprehensive test coverage with automated reporting -- **Developer-Friendly**: Fast feedback cycles and targeted testing - -### ๐Ÿš€ Performance & Quality -- **Optimized Data Management**: Enhanced CSV handling and caching -- **Improved Export System**: JSON, XML, and PDF export with graph integration -- **Code Quality**: Enhanced linting, formatting, and type checking -- **CI/CD Ready**: Streamlined testing and deployment pipeline - -## ๐ŸŽฏ Key Features - -### Core Functionality -- **๐Ÿ“Š Medication Tracking**: Log daily medication intake with dose tracking -- **๐Ÿ“ˆ Symptom Monitoring**: Track pathologies on customizable scales -- **๐Ÿ“‹ Data Management**: Comprehensive entry editing, validation, and organization -- **๐Ÿ“ค Export System**: Multiple export formats (CSV, JSON, XML, PDF) - -### Advanced Features -- **๐ŸŽจ Theme System**: 8 professional themes with complete UI integration -- **โŒจ๏ธ Keyboard Shortcuts**: Full keyboard navigation and shortcuts -- **๐Ÿ“Š Visualization**: Interactive graphs and charts with matplotlib -- **๐Ÿ’ก Smart Tooltips**: Context-aware help and guidance -- **โš™๏ธ Settings Management**: Persistent configuration and preferences - -## ๐Ÿ› ๏ธ Installation - -### Prerequisites -- Python 3.11+ -- UV package manager (recommended) or pip -- Virtual environment support - -### Setup -```bash -# Clone the repository -git clone -cd thechart - -# Install with UV (recommended) -uv sync - -# Or install with pip -python -m venv .venv -source .venv/bin/activate # On Windows: .venv\\Scripts\\activate -pip install -r requirements.txt - -# Run the application -python src/main.py -``` - -## ๐Ÿงช Testing - -### Quick Testing (Development) -```bash -# Fast unit tests -.venv/bin/python scripts/quick_test.py unit - -# Theme functionality tests -.venv/bin/python scripts/quick_test.py theme - -# Integration tests -.venv/bin/python scripts/quick_test.py integration -``` - -### Comprehensive Testing -```bash -# Full test suite with coverage -.venv/bin/python scripts/run_tests.py - -# Or use make -make test -``` - -## ๐Ÿš€ Usage - -### Basic Workflow -1. **Launch**: Run `python src/main.py` or use the desktop file -2. **Configure**: Set up medicines and pathologies via the Tools menu -3. **Track**: Add daily entries with medication and symptom data -4. **Visualize**: View graphs and trends in the main interface -5. **Export**: Export data in your preferred format - -### Keyboard Shortcuts -- **Ctrl+S**: Save/Add entry -- **Ctrl+Q**: Quit application -- **Ctrl+E**: Export data -- **F1**: Show help -- **F2**: Open settings - -> ๐Ÿ“– See the [User Guide](USER_GUIDE.md) for complete usage instructions -and advanced features. - -## ๐Ÿค Contributing - -### Development Setup -See the [Developer Guide](DEVELOPER_GUIDE.md) for: -- Development environment setup -- Testing procedures and best practices -- Code quality standards -- Architecture overview - -### Code Quality -This project maintains high code quality standards: -- **Testing**: Comprehensive test suite with >90% coverage -- **Linting**: Ruff for code formatting and style -- **Type Checking**: MyPy for type safety -- **Documentation**: Comprehensive documentation and examples - -## ๐Ÿ“„ License - -This project is licensed under the MIT License - see the [LICENSE](LICENSE) -file for details. - -## ๐Ÿ”— Links - -- **Documentation**: Complete guides in the [Documentation Index](docs/README.md) -- **Testing**: Consolidated testing guide in [Developer Guide](DEVELOPER_GUIDE.md) -- **Changelog**: Version history in [CHANGELOG.md](CHANGELOG.md) - ---- - -**TheChart** - Professional medication tracking with modern UI/UX -""" - - with open("README.md", "w", encoding="utf-8") as f: - f.write(content) - - -def create_new_docs_index(): - """Create a new documentation index for the docs/ directory.""" - - content = """# TheChart Documentation Index - -## ๐Ÿ“š Consolidated Documentation Structure - -This documentation has been **consolidated and reorganized** for better navigation and -reduced redundancy. - -### ๐ŸŽฏ Main Documentation (Root Level) - -#### For Users -- **[User Guide](../USER_GUIDE.md)** - Complete user manual - - Features and functionality - - Keyboard shortcuts reference - - Theme system and customization - - Usage examples and workflows - -#### For Developers -- **[Developer Guide](../DEVELOPER_GUIDE.md)** - Development and testing - - Environment setup and dependencies - - Testing framework and procedures - - Architecture overview - - Code quality standards - -#### Technical Reference -- **[API Reference](../API_REFERENCE.md)** - Technical documentation - - Export system architecture - - Menu theming implementation - - API specifications - - System internals - -#### Project Information -- **[Main README](../README.md)** - Project overview and quick start -- **[Changelog](../CHANGELOG.md)** - Version history and release notes - -### ๐Ÿ“ Legacy Documentation (Preserved) - -The following files are preserved for reference but content has been consolidated: - -#### Original Structure -- `FEATURES.md` โ†’ Content moved to `USER_GUIDE.md` -- `KEYBOARD_SHORTCUTS.md` โ†’ Content moved to `USER_GUIDE.md` -- `DEVELOPMENT.md` โ†’ Content moved to `DEVELOPER_GUIDE.md` -- `TESTING.md` โ†’ Content moved to `DEVELOPER_GUIDE.md` -- `EXPORT_SYSTEM.md` โ†’ Content moved to `API_REFERENCE.md` -- `MENU_THEMING.md` โ†’ Content moved to `API_REFERENCE.md` - -#### Migration Benefits -1. **Reduced Redundancy**: Eliminated duplicate content across multiple files -2. **Better Organization**: Logical grouping by user type and purpose -3. **Easier Navigation**: Clear entry points for different audiences -4. **Comprehensive Coverage**: All information preserved and enhanced -5. **Maintainability**: Fewer files to keep synchronized - -### ๐Ÿš€ Quick Navigation - -#### I want to... -- **Use the application** โ†’ [User Guide](../USER_GUIDE.md) -- **Develop or contribute** โ†’ [Developer Guide](../DEVELOPER_GUIDE.md) -- **Understand the technical details** โ†’ [API Reference](../API_REFERENCE.md) -- **See what's new** โ†’ [Changelog](../CHANGELOG.md) -- **Get started quickly** โ†’ [Main README](../README.md) - -#### I'm looking for... -- **Features and shortcuts** โ†’ [User Guide](../USER_GUIDE.md) -- **Testing information** โ†’ [Developer Guide](../DEVELOPER_GUIDE.md) -- **Export functionality** โ†’ [API Reference](../API_REFERENCE.md) -- **Installation instructions** โ†’ [Main README](../README.md) - -### ๐Ÿ“Š Documentation Statistics - -- **Total Documents**: 4 main documents (was 9+ scattered files) -- **Content Coverage**: 100% of original content preserved -- **Redundancy Reduction**: ~60% reduction in duplicate information -- **Navigation Improvement**: Single entry point per user type - -### ๐Ÿ”„ Migration Information - -This consolidation was performed to: -- Improve documentation discoverability -- Reduce maintenance overhead -- Provide clearer user journeys -- Eliminate content duplication -- Create better developer experience - -**Previous structure**: Multiple scattered files with overlapping content -**New structure**: 4 comprehensive, well-organized documents - ---- - -## ๐Ÿ†• Recent Documentation Updates - -### Test Consolidation Integration -The documentation now includes comprehensive information about the recently -consolidated test structure: -- Unified test framework documentation -- New test runner usage -- Quick test categories for development -- Migration guide for test changes - -### Enhanced User Experience -- Consolidated keyboard shortcuts in User Guide -- Complete theme system documentation -- Streamlined feature explanations -- Better cross-referencing between documents - ---- - -*Documentation consolidated on {datetime.now().strftime("%Y-%m-%d")}* -*See `DOCS_MIGRATION.md` for detailed migration information* -""" - - docs_dir = Path("docs") - docs_dir.mkdir(exist_ok=True) - - with open(docs_dir / "README.md", "w", encoding="utf-8") as f: - f.write(content) - - -def create_docs_migration_notice(backup_dir): - """Create a migration notice for the documentation consolidation.""" - - content = f"""# Documentation Migration Notice - -## ๐Ÿ“š TheChart Documentation Consolidation - -### โš ๏ธ Important: Documentation Structure Changed - -The documentation for TheChart has been **consolidated and reorganized** for better -usability and maintenance. - -### ๐Ÿ”„ What Changed - -#### Old Structure (Scattered) -``` -docs/ -โ”œโ”€โ”€ FEATURES.md -โ”œโ”€โ”€ KEYBOARD_SHORTCUTS.md -โ”œโ”€โ”€ DEVELOPMENT.md -โ”œโ”€โ”€ TESTING.md -โ”œโ”€โ”€ EXPORT_SYSTEM.md -โ”œโ”€โ”€ MENU_THEMING.md -โ”œโ”€โ”€ CHANGELOG.md -โ”œโ”€โ”€ README.md -โ””โ”€โ”€ DOCUMENTATION_SUMMARY.md -``` - -#### New Structure (Consolidated) -``` -./ -โ”œโ”€โ”€ USER_GUIDE.md # ๐Ÿ†• Complete user manual -โ”œโ”€โ”€ DEVELOPER_GUIDE.md # ๐Ÿ†• Development & testing -โ”œโ”€โ”€ API_REFERENCE.md # ๐Ÿ†• Technical documentation -โ”œโ”€โ”€ README.md # Updated project overview -โ”œโ”€โ”€ CHANGELOG.md # Preserved as-is -โ””โ”€โ”€ docs/ - โ””โ”€โ”€ README.md # ๐Ÿ†• Documentation index -``` - -### ๐Ÿ“‹ Content Migration Map - -| Old File | New Location | Content | -|----------|--------------|---------| -| `FEATURES.md` | `USER_GUIDE.md` | Features, UI/UX, themes | -| `KEYBOARD_SHORTCUTS.md` | `USER_GUIDE.md` | All keyboard shortcuts | -| `DEVELOPMENT.md` | `DEVELOPER_GUIDE.md` | Dev setup, architecture | -| `TESTING.md` | `DEVELOPER_GUIDE.md` | Testing procedures | -| `EXPORT_SYSTEM.md` | `API_REFERENCE.md` | Export functionality | -| `MENU_THEMING.md` | `API_REFERENCE.md` | Theming system | -| `README.md` | Updated `README.md` | Enhanced overview | -| `CHANGELOG.md` | `CHANGELOG.md` | Preserved unchanged | - -### โœจ Benefits of New Structure - -1. **Better User Experience**: Clear entry points for different user types -2. **Reduced Redundancy**: Eliminated duplicate content across files -3. **Easier Maintenance**: Fewer files to keep synchronized -4. **Improved Navigation**: Logical organization by purpose -5. **Comprehensive Coverage**: All original content preserved and enhanced - -### ๐Ÿš€ How to Use New Documentation - -#### For Application Users -```bash -# Start here for complete user manual -โ†’ USER_GUIDE.md - - Features and functionality - - Keyboard shortcuts - - Theme customization - - Usage workflows -``` - -#### For Developers -```bash -# Start here for development information -โ†’ DEVELOPER_GUIDE.md - - Environment setup - - Testing framework (consolidated) - - Architecture overview - - Code quality standards -``` - -#### For Technical Details -```bash -# Start here for technical documentation -โ†’ API_REFERENCE.md - - Export system architecture - - Theming implementation - - API specifications -``` - -### ๐Ÿ” Finding Specific Information - -#### Common Lookups -- **"How do I use feature X?"** โ†’ `USER_GUIDE.md` -- **"What are the keyboard shortcuts?"** โ†’ `USER_GUIDE.md` (Keyboard Shortcuts section) -- **"How do I set up development?"** โ†’ `DEVELOPER_GUIDE.md` -- **"How do I run tests?"** โ†’ `DEVELOPER_GUIDE.md` (includes consolidated test info) -- **"How does export work?"** โ†’ `API_REFERENCE.md` -- **"What themes are available?"** โ†’ `USER_GUIDE.md` (Theme System section) - -### ๐Ÿ“‚ Backup Information - -**Original files backed up to**: `{backup_dir.name}/` - -All original documentation files have been preserved in the backup directory for -reference. - -### ๐Ÿ”— Integration with Test Consolidation - -This documentation consolidation complements the recent test structure consolidation: -- **Test documentation** moved from scattered scripts to `DEVELOPER_GUIDE.md` -- **Testing procedures** unified and enhanced -- **New test runners** documented with usage examples -- **Migration guides** included for both docs and tests - -### ๐Ÿ“Š Consolidation Statistics - -- **Files reduced**: 9 scattered files โ†’ 4 organized documents -- **Redundancy eliminated**: ~60% reduction in duplicate content -- **Content preserved**: 100% of original information retained -- **Navigation improved**: Clear user journey for each audience -- **Maintenance simplified**: Fewer files to synchronize - -### ๐ŸŽฏ Next Steps - -1. **Update bookmarks** to use new documentation files -2. **Review consolidated content** in the new structure -3. **Use documentation index** (`docs/README.md`) for navigation -4. **Check backup** if you need reference to original files - ---- - -## ๐Ÿ”„ Related Changes - -This documentation consolidation is part of broader project improvements: - -### Recent Consolidations -- โœ… **Test Consolidation**: Unified test structure with new runners -- โœ… **Documentation Consolidation**: This reorganization -- ๐Ÿš€ **Future**: Continued improvements to project organization - -### Quality Improvements -- Enhanced test coverage and organization -- Better documentation structure and navigation -- Streamlined development workflows -- Improved user and developer experience - ---- - -*Migration completed on: {datetime.now().strftime("%Y-%m-%d %H:%M:%S")}* -*Backup location: `{backup_dir.name}/`* -*For questions about this migration, see the consolidated documentation.* -""" - - with open("DOCS_MIGRATION.md", "w", encoding="utf-8") as f: - f.write(content) - - -if __name__ == "__main__": - create_unified_documentation() diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md deleted file mode 100644 index f5c4def..0000000 --- a/docs/CHANGELOG.md +++ /dev/null @@ -1,269 +0,0 @@ -# Changelog - -All notable changes to TheChart project are documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [1.9.5] - 2025-08-05 - -### ๐ŸŽจ Major UI/UX Overhaul -- **Added**: Professional theme system with ttkthemes integration -- **Added**: 8 curated themes (Arc, Equilux, Adapta, Yaru, Ubuntu, Plastik, Breeze, Elegance) -- **Added**: Dynamic theme switching without restart -- **Added**: Theme persistence between sessions -- **Added**: Comprehensive settings window with tabbed interface -- **Added**: Smart tooltip system with context-sensitive help -- **Improved**: Table selection highlighting and alternating row colors -- **Improved**: Modern styling for all UI components (buttons, frames, forms) -- **Improved**: Professional card-style layouts and enhanced spacing - -### โš™๏ธ Settings and Configuration System -- **Added**: Advanced settings window (accessible via F2) -- **Added**: Theme selection with live preview -- **Added**: UI preferences and customization options -- **Added**: About dialog with detailed application information -- **Added**: Settings persistence across application restarts - -### ๐Ÿ’ก Enhanced User Experience -- **Added**: Intelligent tooltips for all interactive elements -- **Added**: Specialized help for pathology scales and medicine options -- **Added**: Non-intrusive tooltip timing (500-800ms delay) -- **Added**: Quick theme switching via menu bar -- **Improved**: Visual hierarchy with better typography and spacing -- **Improved**: Professional color schemes across all themes - -### ๐Ÿ—๏ธ Technical Architecture Improvements -- **Added**: Modular theme manager with dependency injection -- **Added**: Tooltip management system -- **Added**: Enhanced UI manager with theme integration -- **Improved**: Code organization with separate concerns -- **Improved**: Error handling with graceful theme fallbacks - -## [1.7.0] - 2025-08-05 - -### โŒจ๏ธ Keyboard Shortcuts System -- **Added**: Comprehensive keyboard shortcuts for improved productivity -- **Added**: File operations shortcuts (Ctrl+S, Ctrl+Q, Ctrl+E) -- **Added**: Data management shortcuts (Ctrl+N, Ctrl+R, F5) -- **Added**: Window management shortcuts (Ctrl+M, Ctrl+P) -- **Added**: Table operation shortcuts (Delete, Escape) -- **Added**: Help system shortcut (F1) -- **Added**: Menu integration showing shortcuts next to menu items -- **Added**: Button labels updated to show primary shortcuts -- **Added**: In-app help dialog accessible via F1 -- **Added**: Status bar feedback for all keyboard operations -- **Improved**: Button text shows shortcuts (e.g., "Add Entry (Ctrl+S)") -- **Improved**: Case-insensitive shortcuts (Ctrl+S and Ctrl+Shift+S both work) - -#### Keyboard Shortcuts Added: -- **Ctrl+S**: Save/Add new entry -- **Ctrl+Q**: Quit application (with confirmation) -- **Ctrl+E**: Export data -- **Ctrl+N**: Clear entries -- **Ctrl+R / F5**: Refresh data -- **Ctrl+M**: Manage medicines -- **Ctrl+P**: Manage pathologies -- **Delete**: Delete selected entry (with confirmation) -- **Escape**: Clear selection -- **F1**: Show keyboard shortcuts help - -### ๐Ÿ“š Documentation Updates -- **Updated**: FEATURES.md with keyboard shortcuts section -- **Added**: KEYBOARD_SHORTCUTS.md with comprehensive shortcut reference -- **Updated**: In-app help system with shortcut information -- **Updated**: About dialog with keyboard shortcut mention - -## [1.6.1] - 2025-07-31 - -### ๐Ÿ“š Documentation Overhaul -- **BREAKING**: Consolidated scattered documentation into organized structure -- **Added**: Comprehensive `docs/FEATURES.md` with complete feature documentation -- **Added**: Detailed `docs/DEVELOPMENT.md` with testing and development guide -- **Updated**: Streamlined `README.md` with quick-start focus and navigation -- **Removed**: 10 redundant/outdated markdown files -- **Improved**: Clear separation between user and developer documentation - -### ๐Ÿ—๏ธ Documentation Structure -``` -docs/ -โ”œโ”€โ”€ FEATURES.md # Complete feature guide (new) -โ”œโ”€โ”€ DEVELOPMENT.md # Development & testing guide (new) -โ””โ”€โ”€ CHANGELOG.md # This changelog (new) - -README.md # Streamlined quick-start guide (updated) -``` - -## [1.3.3] - Previous Releases - -### ๐Ÿฅ Modular Medicine System -- **Added**: Dynamic medicine management system -- **Added**: JSON-based medicine configuration (`medicines.json`) -- **Added**: Medicine management UI (`Tools` โ†’ `Manage Medicines...`) -- **Added**: Configurable medicine properties (colors, doses, names) -- **Added**: Automatic UI updates when medicines change -- **Added**: Backward compatibility with existing data - -### ๐Ÿ’Š Advanced Dose Tracking System -- **Added**: Precise timestamp recording for medicine doses -- **Added**: Multiple daily dose support for same medicine -- **Added**: Comprehensive dose tracking interface in edit windows -- **Added**: Quick-dose buttons for common amounts -- **Added**: Real-time dose display and feedback -- **Added**: Historical dose data persistence in CSV -- **Improved**: Dose format parsing with robust error handling - -#### Punch Button Redesign -- **Moved**: Dose tracking from main input to edit window -- **Added**: Individual dose entry fields per medicine -- **Added**: "Take [Medicine]" buttons with immediate recording -- **Added**: Editable dose display areas with history -- **Improved**: User experience with centralized dose management - -### ๐Ÿ“Š Enhanced Graph Visualization -- **Added**: Medicine dose bar charts with distinct colors -- **Added**: Interactive toggle controls for symptoms and medicines -- **Added**: Enhanced legend with multi-column layout -- **Added**: Average dosage calculations and displays -- **Added**: Professional styling with transparency and shadows -- **Improved**: Graph layout with dynamic positioning - -#### Medicine Dose Plotting -- **Added**: Visual representation of daily medication intake -- **Added**: Scaled dose display (mg/10) for chart compatibility -- **Added**: Color-coded bars for each medicine -- **Added**: Semi-transparent rendering to preserve symptom visibility -- **Fixed**: Dose calculation logic for complex timestamp formats - -#### Legend Enhancements -- **Added**: Multi-column legend layout (2 columns) -- **Added**: Average dosage information per medicine -- **Added**: Tracking status for medicines without current doses -- **Added**: Frame, shadow, and transparency effects -- **Improved**: Space utilization and readability - -### ๐Ÿงช Comprehensive Testing Framework -- **Added**: Professional testing infrastructure with pytest -- **Added**: 93% code coverage across 112 tests -- **Added**: Coverage reporting (HTML, XML, terminal) -- **Added**: Pre-commit testing hooks -- **Added**: Comprehensive dose calculation testing -- **Added**: UI component testing with mocking -- **Added**: Medicine plotting and legend testing - -#### Test Infrastructure -- **Added**: `tests/conftest.py` with shared fixtures -- **Added**: Sample data generators for realistic testing -- **Added**: Mock loggers and temporary file management -- **Added**: Environment variable mocking - -#### Pre-commit Testing -- **Added**: Automated testing before commits -- **Added**: Core functionality validation (3 essential tests) -- **Added**: Commit blocking on test failures -- **Configured**: `.pre-commit-config.yaml` with testing hooks - -### ๐Ÿ—๏ธ Technical Architecture Improvements -- **Added**: Modular component architecture -- **Added**: MedicineManager and PathologyManager classes -- **Added**: Dynamic UI generation based on configuration -- **Improved**: Separation of concerns across modules -- **Enhanced**: Error handling and logging throughout - -### ๐Ÿ“ˆ Data Management Enhancements -- **Added**: Automatic data migration and backup system -- **Added**: Dynamic CSV column management -- **Added**: Robust dose string parsing -- **Improved**: Data validation and error handling -- **Enhanced**: Backward compatibility preservation - -### ๐Ÿ”ง Development Tools & Workflow -- **Added**: uv integration for fast package management -- **Added**: Comprehensive Makefile with development commands -- **Added**: Docker support with multi-platform builds -- **Added**: Pre-commit hooks for code quality -- **Added**: Ruff for fast Python formatting and linting -- **Improved**: Virtual environment management - -### ๐Ÿš€ Deployment & Distribution -- **Added**: PyInstaller integration for standalone executables -- **Added**: Linux desktop integration -- **Added**: Automatic file installation and desktop entries -- **Added**: Docker containerization support -- **Improved**: Build and deployment automation - -## Technical Details - -### Dependencies -- **Runtime**: Python 3.13+, matplotlib, pandas, tkinter, colorlog -- **Development**: pytest, pytest-cov, ruff, pre-commit, pyinstaller -- **Package Management**: uv (Rust-based, 10-100x faster than pip/Poetry) - -### Architecture -- **Frontend**: Tkinter-based GUI with dynamic component generation -- **Backend**: Pandas for data manipulation, Matplotlib for visualization -- **Storage**: CSV-based with JSON configuration files -- **Testing**: pytest with comprehensive mocking and coverage - -### File Structure -``` -src/ # Main application code -โ”œโ”€โ”€ main.py # Application entry point -โ”œโ”€โ”€ ui_manager.py # User interface management -โ”œโ”€โ”€ data_manager.py # CSV operations and data persistence -โ”œโ”€โ”€ graph_manager.py # Visualization and plotting -โ”œโ”€โ”€ medicine_manager.py # Medicine system management -โ””โ”€โ”€ pathology_manager.py # Symptom tracking - -tests/ # Comprehensive test suite (112 tests, 93% coverage) -docs/ # Organized documentation -โ”œโ”€โ”€ FEATURES.md # Complete feature documentation -โ”œโ”€โ”€ DEVELOPMENT.md # Development and testing guide -โ””โ”€โ”€ CHANGELOG.md # This changelog - -Configuration Files: -โ”œโ”€โ”€ medicines.json # Medicine definitions (auto-generated) -โ”œโ”€โ”€ pathologies.json # Symptom categories (auto-generated) -โ”œโ”€โ”€ pyproject.toml # Project configuration -โ””โ”€โ”€ uv.lock # Dependency lock file -``` - -## Migration Notes - -### From Previous Versions -- **Data Compatibility**: All existing CSV data continues to work -- **Automatic Migration**: Data structure updates handled automatically -- **Backup Creation**: Automatic backups before major changes -- **No Data Loss**: Existing functionality preserved during updates - -### Configuration Migration -- **Medicine System**: Hard-coded medicines converted to JSON configuration -- **UI Updates**: Interface automatically adapts to new medicine definitions -- **Graph Integration**: Visualization system updated for dynamic medicines - -## Future Roadmap - -### Planned Features (v2.0) -- **Mobile App**: Companion mobile application for dose tracking -- **Cloud Sync**: Multi-device data synchronization -- **Advanced Analytics**: Machine learning-based trend analysis -- **Reminder System**: Intelligent medication reminders -- **Doctor Integration**: Healthcare provider report generation - -### Platform Expansion -- **macOS Support**: Native macOS application -- **Windows Support**: Windows executable and installer -- **Web Interface**: Browser-based version for universal access - -### API Development -- **REST API**: External system integration -- **Plugin Architecture**: Third-party extension support -- **Data Export**: Multiple format support (JSON, XML, etc.) - ---- - -## Contributing - -This project follows semantic versioning and maintains comprehensive documentation. -For development guidelines, see [docs/DEVELOPMENT.md](docs/DEVELOPMENT.md). -For feature information, see [docs/FEATURES.md](docs/FEATURES.md). diff --git a/docs/DOCUMENTATION_INDEX.md b/docs/DOCUMENTATION_INDEX.md new file mode 100644 index 0000000..c32d189 --- /dev/null +++ b/docs/DOCUMENTATION_INDEX.md @@ -0,0 +1,78 @@ +# TheChart Documentation Index + +## ๐Ÿ“š Complete Documentation Guide + +### ๐Ÿš€ Quick Navigation + +#### Essential Documents +- **[README.md](../README.md)** - Project overview and quick start guide +- **[USER_GUIDE.md](../USER_GUIDE.md)** - Complete user manual with features and shortcuts +- **[DEVELOPER_GUIDE.md](../DEVELOPER_GUIDE.md)** - Development setup, testing, and architecture +- **[API_REFERENCE.md](../API_REFERENCE.md)** - Technical documentation and system APIs + +#### Project History +- **[CHANGELOG.md](../CHANGELOG.md)** - Version history and release notes +- **[IMPROVEMENTS_SUMMARY.md](../IMPROVEMENTS_SUMMARY.md)** - Recent enhancements and new features + +### ๐Ÿ“– Documentation Organization + +This project uses a **consolidated documentation structure** to avoid redundancy and improve maintainability: + +#### Root Level Documents (Primary) +All main documentation is located in the project root for easy access: + +- **README.md** - Entry point for all users +- **USER_GUIDE.md** - Comprehensive user documentation +- **DEVELOPER_GUIDE.md** - Complete development guide +- **API_REFERENCE.md** - Technical reference documentation +- **CHANGELOG.md** - Version history +- **IMPROVEMENTS_SUMMARY.md** - Latest feature summary + +#### docs/ Folder (Reference) +The docs/ folder contains: +- Legacy documentation files (preserved for reference) +- Specialized topic documentation +- This documentation index + +### ๐Ÿ” Find What You Need + +#### New Users +Start with: **[USER_GUIDE.md](../USER_GUIDE.md)** +- Application features +- Getting started guide +- Keyboard shortcuts +- UI customization + +#### Developers +Start with: **[DEVELOPER_GUIDE.md](../DEVELOPER_GUIDE.md)** +- Environment setup +- Testing procedures +- Architecture overview +- Contributing guidelines + +#### System Administrators +Check: **[API_REFERENCE.md](../API_REFERENCE.md)** +- Export system details +- Configuration options +- Technical specifications +- Integration information + +### ๐Ÿ—๏ธ Documentation Standards + +All documentation follows these principles: +- **Single Source of Truth**: No duplicate content across files +- **Clear Navigation**: Easy cross-references and linking +- **Up-to-date**: Regular updates with code changes +- **User-focused**: Organized by user needs, not technical structure + +### ๐Ÿ“ Contributing to Documentation + +When updating documentation: +1. Edit the appropriate root-level file +2. Update cross-references if needed +3. Test all links for accuracy +4. Follow the established format and style + +--- + +*Last updated: August 6, 2025* diff --git a/docs/README.md b/docs/README.md index 917c3ee..8cb348b 100644 --- a/docs/README.md +++ b/docs/README.md @@ -30,24 +30,30 @@ This documentation has been **consolidated and reorganized** for better navigati #### Project Information - **[Main README](../README.md)** - Project overview and quick start - **[Changelog](../CHANGELOG.md)** - Version history and release notes +- **[Recent Improvements](../IMPROVEMENTS_SUMMARY.md)** - Latest enhancements and new features -### ๐Ÿ“ Legacy Documentation (Preserved) +## ๏ฟฝ๏ธ Legacy Reference Files -The following files are preserved for reference but content has been consolidated: +The following specialized documentation files are preserved in the docs/ folder: -#### Original Structure -- `FEATURES.md` โ†’ Content moved to `USER_GUIDE.md` -- `KEYBOARD_SHORTCUTS.md` โ†’ Content moved to `USER_GUIDE.md` -- `DEVELOPMENT.md` โ†’ Content moved to `DEVELOPER_GUIDE.md` -- `TESTING.md` โ†’ Content moved to `DEVELOPER_GUIDE.md` -- `EXPORT_SYSTEM.md` โ†’ Content moved to `API_REFERENCE.md` -- `MENU_THEMING.md` โ†’ Content moved to `API_REFERENCE.md` +### Feature Documentation +- **[FEATURES.md](FEATURES.md)** - Original feature documentation (consolidated into USER_GUIDE.md) +- **[KEYBOARD_SHORTCUTS.md](KEYBOARD_SHORTCUTS.md)** - Original shortcuts reference (consolidated into USER_GUIDE.md) +- **[EXPORT_SYSTEM.md](EXPORT_SYSTEM.md)** - Original export documentation (consolidated into API_REFERENCE.md) +- **[MENU_THEMING.md](MENU_THEMING.md)** - Original theming documentation (consolidated into API_REFERENCE.md) -#### Migration Benefits -1. **Reduced Redundancy**: Eliminated duplicate content across multiple files -2. **Better Organization**: Logical grouping by user type and purpose -3. **Easier Navigation**: Clear entry points for different audiences -4. **Comprehensive Coverage**: All information preserved and enhanced +### Development Documentation +- **[DEVELOPMENT.md](DEVELOPMENT.md)** - Original development guide (consolidated into DEVELOPER_GUIDE.md) +- **[TESTING.md](TESTING.md)** - Original testing documentation (consolidated into DEVELOPER_GUIDE.md) + +### System Documentation +- **[DOCUMENTATION_SUMMARY.md](DOCUMENTATION_SUMMARY.md)** - Documentation organization summary + +> **Note**: These files are preserved for reference but their content has been consolidated into the main documentation files for better organization and reduced redundancy. + +--- + +**๐Ÿ“– For complete documentation navigation, see: [DOCUMENTATION_INDEX.md](DOCUMENTATION_INDEX.md)** 5. **Maintainability**: Fewer files to keep synchronized ### ๐Ÿš€ Quick Navigation