- Replace print() statements with logging module in all test files
- Use consistent logger naming: bipauto.tests.<test_name>
- Apply unified log format: [%(levelname)s] %(name)s: %(message)s
- Migrates test_extractor_real.py, test_login.py, test_auth_config.py, test_extractor_component.py
This change ensures consistent log output format between test files and utils modules, matching the existing bipauto.* logger hierarchy.
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>
- Add explicit check for ERP_URL environment variable
- Prevent AttributeError when ERP_URL is not set
- Provide clear error message for missing configuration
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Import only login and logout (remove close_session)
- Add explicit URL construction before login call
- Pass all required parameters to login()
- Replace close_session() with direct context.close() and browser.close()
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>