mirror of
https://github.com/pacnpal/Pac-cogs.git
synced 2025-12-20 02:41:06 -05:00
Delete cline_docs directory
This commit is contained in:
@@ -1,90 +0,0 @@
|
||||
# Active Context
|
||||
|
||||
## Current Focus
|
||||
|
||||
- Adding fallback import patterns to all non-init Python files
|
||||
- Maintaining relative imports while ensuring compatibility with Red-DiscordBot loading
|
||||
- Implementing consistent import patterns across the entire codebase
|
||||
|
||||
## Recent Changes
|
||||
|
||||
- Added fallback imports in core module files:
|
||||
- base.py
|
||||
- cleanup.py
|
||||
- commands.py
|
||||
- error_handler.py
|
||||
- events.py
|
||||
- guild.py
|
||||
- initialization.py
|
||||
- lifecycle.py
|
||||
- response_handler.py
|
||||
- settings.py
|
||||
- Verified types.py (no changes needed - only standard library imports)
|
||||
- __init__.py
|
||||
|
||||
## Next Steps
|
||||
|
||||
1. Add fallback imports to database module files:
|
||||
- connection_manager.py
|
||||
- query_manager.py
|
||||
- schema_manager.py
|
||||
- video_archive_db.py
|
||||
- __init__.py
|
||||
|
||||
2. Add fallback imports to ffmpeg module files:
|
||||
- binary_manager.py
|
||||
- encoder_params.py
|
||||
- exceptions.py
|
||||
- ffmpeg_downloader.py
|
||||
- ffmpeg_manager.py
|
||||
- gpu_detector.py
|
||||
- process_manager.py
|
||||
- verification_manager.py
|
||||
- video_analyzer.py
|
||||
- __init__.py
|
||||
|
||||
3. Add fallback imports to queue module files:
|
||||
- cleanup.py
|
||||
- health_checker.py
|
||||
- manager.py
|
||||
- metrics_manager.py
|
||||
- models.py
|
||||
- monitoring.py
|
||||
- persistence.py
|
||||
- processor.py
|
||||
- recovery_manager.py
|
||||
- state_manager.py
|
||||
- types.py
|
||||
- __init__.py
|
||||
|
||||
4. Add fallback imports to utils module files:
|
||||
- compression_handler.py
|
||||
- compression_manager.py
|
||||
- directory_manager.py
|
||||
- download_core.py
|
||||
- download_manager.py
|
||||
- exceptions.py
|
||||
- file_deletion.py
|
||||
- file_operations.py
|
||||
- file_ops.py
|
||||
- message_manager.py
|
||||
- path_manager.py
|
||||
- permission_manager.py
|
||||
- process_manager.py
|
||||
- progress_handler.py
|
||||
- progress_tracker.py
|
||||
- url_validator.py
|
||||
- __init__.py
|
||||
|
||||
## Active Files
|
||||
|
||||
Currently working through database module files
|
||||
|
||||
## Strategy
|
||||
|
||||
- Process one module at a time
|
||||
- Update files systematically
|
||||
- Commit changes per module
|
||||
- Keep context documentation updated
|
||||
- Test loading after each module update
|
||||
- Pay special attention to both TYPE_CHECKING imports and package-level imports
|
||||
@@ -1,25 +0,0 @@
|
||||
# Product Context
|
||||
|
||||
## Purpose
|
||||
|
||||
The videoarchiver module appears to be a Discord bot component for archiving video content, with complex processing and queue management capabilities.
|
||||
|
||||
## Core Problems/Solutions
|
||||
|
||||
- Managing video archival process
|
||||
- Handling message processing
|
||||
- Queue management
|
||||
- Cleanup operations
|
||||
|
||||
## Key Workflows
|
||||
|
||||
1. Message processing and validation
|
||||
2. Queue management and processing
|
||||
3. Video downloading and archiving
|
||||
4. Cleanup operations
|
||||
|
||||
## Product Direction
|
||||
|
||||
- Maintain clean architecture
|
||||
- Avoid cyclic dependencies
|
||||
- Ensure robust error handling
|
||||
@@ -1,139 +0,0 @@
|
||||
# System Patterns
|
||||
|
||||
## Import Patterns
|
||||
|
||||
### Standard Import Structure
|
||||
|
||||
Every non-init Python file should follow this pattern:
|
||||
|
||||
```python
|
||||
try:
|
||||
# Try relative imports first
|
||||
from ..module.submodule import Component
|
||||
from .local_module import LocalComponent
|
||||
except ImportError:
|
||||
# Fall back to absolute imports if relative imports fail
|
||||
from videoarchiver.module.submodule import Component
|
||||
from videoarchiver.current_module.local_module import LocalComponent
|
||||
```
|
||||
|
||||
### TYPE_CHECKING Imports
|
||||
|
||||
For type checking imports, use:
|
||||
|
||||
```python
|
||||
if TYPE_CHECKING:
|
||||
try:
|
||||
from ..module.component import Component
|
||||
except ImportError:
|
||||
from videoarchiver.module.component import Component
|
||||
```
|
||||
|
||||
### Package-Level Imports
|
||||
|
||||
For package-level imports, use:
|
||||
|
||||
```python
|
||||
try:
|
||||
from .. import utils
|
||||
except ImportError:
|
||||
from videoarchiver import utils
|
||||
```
|
||||
|
||||
### Import Rules
|
||||
|
||||
1. Always try relative imports first
|
||||
2. Provide absolute import fallbacks
|
||||
3. Group imports logically:
|
||||
- Standard library imports first
|
||||
- Third-party imports second
|
||||
- Local/relative imports third
|
||||
4. Use explicit imports over wildcard imports
|
||||
5. Handle TYPE_CHECKING imports separately
|
||||
6. Keep __init__.py files simple with direct imports
|
||||
7. Test imports in both development and production environments
|
||||
|
||||
## Module Organization
|
||||
|
||||
### Core Module
|
||||
|
||||
- Base components and interfaces
|
||||
- Core functionality implementation
|
||||
- Command handling
|
||||
- Event processing
|
||||
- Error handling
|
||||
- Lifecycle management
|
||||
|
||||
### Database Module
|
||||
|
||||
- Database connections
|
||||
- Query management
|
||||
- Schema definitions
|
||||
- Data models
|
||||
- Migration handling
|
||||
|
||||
### FFmpeg Module
|
||||
|
||||
- Process management
|
||||
- Binary handling
|
||||
- Encoding parameters
|
||||
- GPU detection
|
||||
- Video analysis
|
||||
|
||||
### Queue Module
|
||||
|
||||
- Queue management
|
||||
- State tracking
|
||||
- Health monitoring
|
||||
- Recovery mechanisms
|
||||
- Cleanup operations
|
||||
|
||||
### Utils Module
|
||||
|
||||
- Common utilities
|
||||
- File operations
|
||||
- Progress tracking
|
||||
- Permission management
|
||||
- Message handling
|
||||
|
||||
## Development Patterns
|
||||
|
||||
### Code Organization
|
||||
|
||||
- Keep modules focused and cohesive
|
||||
- Follow single responsibility principle
|
||||
- Use clear and consistent naming
|
||||
- Maintain proper documentation
|
||||
- Implement proper error handling
|
||||
|
||||
### Testing Strategy
|
||||
|
||||
- Test in development environment
|
||||
- Verify in production environment
|
||||
- Check import resolution
|
||||
- Validate component interactions
|
||||
- Monitor error handling
|
||||
|
||||
### Error Handling
|
||||
|
||||
- Use specific exception types
|
||||
- Provide detailed error contexts
|
||||
- Implement graceful degradation
|
||||
- Log errors appropriately
|
||||
- Track error patterns
|
||||
|
||||
### Component Management
|
||||
|
||||
- Register components explicitly
|
||||
- Track component states
|
||||
- Monitor health metrics
|
||||
- Handle cleanup properly
|
||||
- Manage dependencies carefully
|
||||
|
||||
### Documentation
|
||||
|
||||
- Maintain clear docstrings
|
||||
- Update context files
|
||||
- Document patterns and decisions
|
||||
- Track changes systematically
|
||||
- Keep examples current
|
||||
Reference in New Issue
Block a user