Squash Odysseus development history

This commit is contained in:
pewdiepie-archdaemon
2026-09-11 06:04:19 +00:00
parent e5c99a5eee
commit 6ee6502010
2050 changed files with 538359 additions and 57745 deletions
+49 -1
View File
@@ -1,4 +1,4 @@
from src.search.ranking import rank_search_results
from services.search.ranking import rank_search_results
def test_news_queries_prefer_news_sources_over_sports_and_social_results():
@@ -37,3 +37,51 @@ def test_news_queries_prefer_news_sources_over_sports_and_social_results():
assert "https://www.cbc.ca/news/canada" in top_urls
assert "https://www.ctvnews.ca/canada" in top_urls
assert ranked[-1]["url"].startswith("https://sports.yahoo.com/")
def test_software_release_queries_prefer_official_github_releases():
results = [
{
"title": "ollama/ollama on GitHub | Release Alert",
"url": "https://releasealert.dev/github/ollama/ollama",
"snippet": "Latest releases for ollama/ollama on GitHub.",
},
{
"title": "Ollama Release Notes - August 2026 Latest Updates",
"url": "https://releasebot.io/updates/ollama",
"snippet": "Complete list of Ollama latest updates.",
},
{
"title": "Releases · ollama/ollama - GitHub",
"url": "https://github.com/ollama/ollama/releases",
"snippet": "Latest release v0.33.0.",
},
]
ranked = rank_search_results("latest ollama release version github", results)
assert ranked[0]["url"] == "https://github.com/ollama/ollama/releases"
def test_product_spec_queries_prefer_official_shop_or_specs_pages():
results = [
{
"title": "Surprise launch coverage for new creator laptop",
"url": "https://example-news.com/tech/surprise-launch-creator-laptop",
"snippet": "The laptop was announced yesterday and may ship later this year.",
},
{
"title": "Creator Laptop - Buy",
"url": "https://www.creatorlaptop.com/shop/buy-laptop",
"snippet": "Configure with 64GB RAM. See pricing, availability, and shipping options.",
},
{
"title": "Creator Laptop rumors and expected specs",
"url": "https://rumor.example.com/creator-laptop-expected-specs",
"snippet": "Rumored future models could include more memory.",
},
]
ranked = rank_search_results("current creator laptop memory price availability", results)
assert ranked[0]["url"] == "https://www.creatorlaptop.com/shop/buy-laptop"