Enhance event occurrence parsing to skip unmatched high school section headers
This commit introduces a new property to track skipped high school section headers in the EventOccurrenceParseResult and EventOccurrenceParserResult classes. The EventOccurrenceParser has been updated to gracefully skip HS section headers that do not match any event definitions, improving the parsing logic. Additionally, the LocationParsingConfiguration has been removed from the EventOccurrenceParser, simplifying its constructor. Unit tests have been updated to reflect these changes and ensure correct behavior during parsing.
This commit is contained in:
@@ -30,6 +30,12 @@ public class EventOccurrenceParseResult
|
||||
/// </summary>
|
||||
public List<ParsingIssue> Issues { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// List of high school (HS) section headers that were encountered but skipped
|
||||
/// because they don't match any event definition in the system.
|
||||
/// </summary>
|
||||
public List<string> SkippedHSSectionHeaders { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Total number of event occurrences successfully parsed.
|
||||
/// </summary>
|
||||
@@ -110,11 +116,6 @@ public enum ParsingIssueType
|
||||
/// <summary>
|
||||
/// Invalid format or other parsing issue.
|
||||
/// </summary>
|
||||
InvalidFormat,
|
||||
|
||||
/// <summary>
|
||||
/// Location parsing failed (no matching pattern found).
|
||||
/// </summary>
|
||||
LocationParseFailure
|
||||
InvalidFormat
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user