- Added permissions for editing and deleting CSV field mappings. - Created type converter for CSV cells to handle various data types. - Implemented database migrations for CSV field mappings and import logs. - Seeded initial system templates for nutrition and activity data imports. - Developed admin endpoints for managing system CSV templates. - Introduced user endpoints for CSV import analysis and mapping retrieval. - Added tests for core CSV parser functionalities, including delimiter detection and value conversion.
28 lines
804 B
Python
28 lines
804 B
Python
"""Universal CSV import foundation (Issue #21)."""
|
|
|
|
from csv_parser.core import (
|
|
decode_raw_bytes,
|
|
sniff_delimiter,
|
|
parse_csv_sample,
|
|
column_signature,
|
|
normalize_header_for_signature,
|
|
)
|
|
from csv_parser.module_registry import MODULE_DEFINITIONS, get_module_definition, list_modules
|
|
from csv_parser.type_converter import convert_value, build_row_after_mapping
|
|
from csv_parser.permissions import user_may_delete_mapping, user_may_edit_mapping_row
|
|
|
|
__all__ = [
|
|
"decode_raw_bytes",
|
|
"sniff_delimiter",
|
|
"parse_csv_sample",
|
|
"column_signature",
|
|
"normalize_header_for_signature",
|
|
"MODULE_DEFINITIONS",
|
|
"get_module_definition",
|
|
"list_modules",
|
|
"convert_value",
|
|
"build_row_after_mapping",
|
|
"user_may_delete_mapping",
|
|
"user_may_edit_mapping_row",
|
|
]
|