feat(contests): Cache full contest details from WA7BNM#259
Draft
arunderwood wants to merge 2 commits intomainfrom
Draft
feat(contests): Cache full contest details from WA7BNM#259arunderwood wants to merge 2 commits intomainfrom
arunderwood wants to merge 2 commits intomainfrom
Conversation
Add daily background job to scrape WA7BNM Contest Calendar detail pages and populate bands, modes, sponsor, officialRulesUrl, and extended metadata for contest series. Key changes: - Add ContestSeriesEntity to model WA7BNM's series concept - Add ContestSeriesClient HTML scraper with Jsoup for parsing - Add ContestSeriesRefreshTask scheduled daily at 4am UTC - Add wa7bnmRef field to ContestEntity for series linkage - Add database migration for contest_series tables - Configure Resilience4j circuit breaker for fault tolerance Rate limiting: 5 seconds between requests to be respectful to WA7BNM. Change detection: Uses "Revision Date" field to skip unchanged series. Closes #196
Add comprehensive tests for fallback parsing paths: - Definition list format (dt/dd elements) - Bold text format (b/strong elements) - parseContestName fallback when no h1 element - parseRulesUrl fallback for non-table links - Edge cases for empty fields and null parents Extract duplicate string literals to constants.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #259 +/- ##
============================================
- Coverage 92.33% 92.24% -0.10%
Complexity 768 768
============================================
Files 111 115 +4
Lines 2441 2759 +318
Branches 291 342 +51
============================================
+ Hits 2254 2545 +291
- Misses 134 146 +12
- Partials 53 68 +15
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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.
Summary
Implements GitHub issue #196 - Add a daily background job to scrape WA7BNM contest detail pages and populate
bands,modes,sponsor,officialRulesUrl, and extended metadata.Key changes:
ContestSeriesentity to model WA7BNM's series concept (deduplicates scraping)ContestSeriesRefreshTask) runs at 4am UTCContestSeriesClientscrapes detail pages using JsoupWA7BNM Integration Details
Integration Overview
NextSkip integrates with WA7BNM Contest Calendar in two ways:
Rate Limiting
nextskip.contests.series.rate-limit-seconds)Data Usage
calendarSourceUrlTechnical Implementation
ContestSeriesentityFiles Changed
New Files
008-contest-series-table.yamlContestSeriesEntity.javaContestSeriesRepository.javaContestSeriesDto.javaContestSeriesClient.javaContestSeriesRefreshTask.javaContestSeriesClientTest.javaContestSeriesRefreshTaskTest.javaContestSeriesEntityIntegrationTest.javaModified Files
ContestEntity.javawa7bnmReffieldContestRefreshService.javawa7bnmReffrom URLContestRepository.javaapplication.ymlbuild.gradleTest Plan
./gradlew bootRunand verify no startup errors