Merged
Conversation
sandragjacinto
approved these changes
Mar 3, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR changes RSS/Atom URL collection so the “accepted domain” is derived from Corpus.main_url rather than from the feed URL, and adds tests to cover cases where the corpus domain differs from the feed domain.
Changes:
- Update
RssURLCollector.collect()andAtomURLCollector.collect()to computedomainfromcorpus.main_url. - Update existing RSS/Atom collector tests to build
Corpuswithmain_url. - Add new tests ensuring collected document URLs follow the corpus domain even when the feed URL domain differs.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| welearn_datastack/collectors/rss_collector.py | Switches domain derivation to corpus.main_url for RSS link filtering. |
| welearn_datastack/collectors/atom_collector.py | Switches domain derivation to corpus.main_url for Atom link filtering. |
| tests/url_collector/test_rss_collector.py | Extends setup to include main_url and adds a “different domain” test. |
| tests/url_collector/test_atom_collector.py | Extends setup to include main_url and adds a “different domain” test. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
This pull request updates the logic for determining the domain in both the Atom and RSS URL collectors to use the
main_urlfrom theCorpusobject, rather than the feed URL. It also expands the test coverage to ensure correct behavior when the corpus domain differs from the feed domain.Domain resolution changes:
collectmethods in bothAtomURLCollector(welearn_datastack/collectors/atom_collector.py) andRssURLCollector(welearn_datastack/collectors/rss_collector.py) to derive the domain fromcorpus.main_urlinstead offeed_url. This ensures that collected document URLs are always based on the intended corpus domain. [1] [2]Test improvements:
test_atom_collector.pyandtest_rss_collector.pyto initialize theCorpuswith amain_urlfield, aligning with the new domain resolution logic. [1] [2]test_atom_collector.pyandtest_rss_collector.pyto verify that URL collection works correctly when the corpus domain is different from the feed domain. These tests check that the resulting document URLs use themain_urlfrom the corpus. [1] [2]