Add centralized logging utility and optional logger parameters to all
core functions for better observability and debugging capabilities.
New modules:
- utils/logging.py: Centralized logger configuration with console
and optional file handlers
Enhanced features:
- Added optional logger parameter to all extractor_core functions
- Added logger support to extractor, excel_converter, and auth modules
- Functions remain silent when logger=None (backward compatible)
- Improved environment variable validation in test files
Documentation:
- Added discrete_material_plan_extractor_core.md with complete API
reference and usage patterns
Benefits:
- Consistent logging format across all components
- Optional debug output for troubleshooting
- No breaking changes - fully backward compatible
- Better error messages and validation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove close_session() wrapper function entirely
- Callers now directly manage browser/context lifecycle
- Reduces module to pure authentication functions only
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove all os.getenv() calls from login() function
- Remove URL construction logic (caller provides complete URL)
- Add parameter validation with clear error messages
- Function is now pure with no side effects
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove os, dotenv, and pathlib imports
- Remove module-level environment setup code
- Prepare for pure function implementation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>