Repository navigation
Fix/parse robustness - #14
Merged
sandeeprjs92 merged 5 commits intoSep 7, 2026
Merged
Conversation
Add TestDateStrFormats class with 15 tests covering all date string formats encountered in real registrar feeds: DD/MM/YYYY, MM/DD/YYYY with AM/PM, DD-MM-YYYY, ISO YYYY-MM-DD, JavaScript Date.toString(), and already-normalized YYYYMMDD.
Replace the simple str() fallback in _date_str() with deterministic multi-format parsing that handles DD/MM/YYYY, MM/DD/YYYY with AM/PM, DD-MM-YYYY, ISO YYYY-MM-DD, JavaScript Date.toString(), and already-normalized YYYYMMDD strings. Disambiguation rule: AM/PM present means US month/day order; first component > 12 means DD/MM; otherwise DD/MM (Indian convention). Deduplicates the inline date-to-string logic in adapter-level composite_key() methods by delegating to the shared _date_str().
Add parse_utils module with: - normalize_quoted_csv: strips matched single quotes from CSV headers and cell values (handles CAMS lot-level quoted feeds) - peek_feed_headers: reads only the first CSV row for detection - has_quoted_headers: detects if a CSV uses single-quoted headers - to_number: strips Indian-locale commas before float conversion
CamsWbr2cAdapter.parse() now detects single-quoted CSV headers (common in CAMS lot-level exports) and strips matched quotes from headers and cell values before returning the DataFrame. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace .astype(float) with to_number() in the Django bridge so Indian-formatted values like "1,00,000.50" parse correctly instead of raising ValueError.
sandeeprjs92
approved these changes
Sep 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.