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:
2026-01-09 00:14:19 -05:00
parent f916cfad6b
commit 19e5ef0675
10 changed files with 279 additions and 372 deletions
+7 -6
View File
@@ -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
}