Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add country to weather suggestions #6419

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

0c0w3
Copy link
Contributor

@0c0w3 0c0w3 commented Oct 19, 2024

I just saw that Merino expects a country to be passed along with city and region in weather requests. Rather than assuming "US" and hardcoding that in desktop, which would be fine for now, let's just go ahead and add the matching geoname's country code to Suggestion::Weather. It's a small change.

This doesn't modify query parsing at all. Country names still aren't supported in queries. We can cross that bridge if/when we come to it.

Pull Request checklist

  • Breaking changes: This PR follows our breaking change policy
    • This PR follows the breaking change policy:
      • This PR has no breaking API changes, or
      • There are corresponding PRs for our consumer applications that resolve the breaking changes and have been approved
  • Quality: This PR builds and tests run cleanly
    • Note:
      • For changes that need extra cross-platform testing, consider adding [ci full] to the PR title.
      • If this pull request includes a breaking change, consider cutting a new release after merging.
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry in CHANGELOG.md or an explanation of why it does not need one
    • Any breaking changes to Swift or Kotlin binding APIs are noted explicitly
  • Dependencies: This PR follows our dependency management guidelines
    • Any new dependencies are accompanied by a summary of the due diligence applied in selecting them.

Branch builds: add [firefox-android: branch-name] to the PR title.

I just saw that Merino expects a country to be passed along with city and region
in weather requests. Rather than assuming "US" and hardcoding that in desktop,
which would be fine for now, let's just go ahead and add the matching geoname's
country code to `Suggestion::Weather`. It's a small change.

This doesn't modify query parsing at all. Country names still aren't supported
in queries. We can cross that bridge if/when we come to it.
@0c0w3 0c0w3 requested review from bendk and ncloudioj October 19, 2024 00:00
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 21.99%. Comparing base (63bb952) to head (4903619).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6419   +/-   ##
=======================================
  Coverage   21.99%   21.99%           
=======================================
  Files         342      342           
  Lines       30729    30729           
=======================================
  Hits         6759     6759           
  Misses      23970    23970           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants