- Remove DiscreteMaterialPlanExtractor class (stateful) - Replace with pure functions: chunk_order_ids, get_login_url, extract_batch, etc. - All functions are stateless, accept explicit parameters - Caller manages browser/session lifecycle (consistent with extractor_core.py) - Lower coupling: no direct dependency on utils.auth.login - Update tests to match new function signatures Breaking Changes: - DiscreteMaterialPlanExtractor class removed - Use extract_and_post_process() or extract_from_file() instead of class methods - Caller must manage browser session before calling extractor functions
44 lines
1.0 KiB
Python
44 lines
1.0 KiB
Python
"""
|
|
Discrete Material Plan Maintenance Package
|
|
Core web operations and high-level extractor for Yonyou BIP discrete material plan maintenance.
|
|
"""
|
|
|
|
from .extractor_core import (
|
|
navigate_to_discrete_material_page,
|
|
setup_query_interface,
|
|
fill_and_search_orders,
|
|
download_batch_data,
|
|
execute_batch_download_workflow,
|
|
)
|
|
|
|
from .extractor import (
|
|
chunk_order_ids,
|
|
get_login_url,
|
|
extract_batch,
|
|
extract_batches,
|
|
extract_and_post_process,
|
|
read_order_ids_from_file,
|
|
extract_from_file,
|
|
)
|
|
|
|
from .excel_converter import ExcelConverter
|
|
|
|
__all__ = [
|
|
# Core functions
|
|
"navigate_to_discrete_material_page",
|
|
"setup_query_interface",
|
|
"fill_and_search_orders",
|
|
"download_batch_data",
|
|
"execute_batch_download_workflow",
|
|
# High-level extractor functions
|
|
"chunk_order_ids",
|
|
"get_login_url",
|
|
"extract_batch",
|
|
"extract_batches",
|
|
"extract_and_post_process",
|
|
"read_order_ids_from_file",
|
|
"extract_from_file",
|
|
# Utilities
|
|
"ExcelConverter",
|
|
]
|