Skip to content

Conversation

@cka-y
Copy link
Contributor

@cka-y cka-y commented Nov 25, 2025

Summary:
This pull request updates the reverse geolocation batch processing logic to support an additional use_cache parameter, allowing requests to control caching behavior. It also updates the admin level configuration for several countries. The main changes are grouped below:

Reverse Geolocation Batch API Improvements:

  • The parse_request_parameters function now supports a use_cache boolean parameter, which is parsed from the incoming request and passed through the batch processing pipeline. [1] [2]
  • The reverse_geolocation_batch function and create_http_processor_task now accept and forward the use_cache parameter, ensuring it is included in downstream processing tasks and HTTP payloads. [1] [2]

Testing Updates:

  • Unit tests for request parsing and batch processing have been updated to verify correct handling of the new use_cache parameter. [1] [2]

Configuration Updates:

  • The locality_admin_levels.json file has been updated to add admin level mappings for France (FR) and the United States (US).

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Run the unit tests with ./scripts/api-tests.sh to make sure you didn't break anything
  • Add or update any needed documentation to the repo
  • Format the title like "feat: [new feature short description]". Title must follow the Conventional Commit Specification(https://www.conventionalcommits.org/en/v1.0.0/).
  • Linked all relevant issues
  • Include screenshot(s) showing how this pull request works and fixes the issue(s)

@cka-y cka-y linked an issue Nov 25, 2025 that may be closed by this pull request
@cka-y cka-y requested a review from Copilot November 26, 2025 14:38
@cka-y cka-y marked this pull request as ready for review November 26, 2025 14:39
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for a use_cache parameter in the batch reverse geolocation processing pipeline and updates admin level configurations for France and the United States. The changes enable callers to control whether caching should be used during reverse geolocation operations, with the parameter being threaded through the request parsing, batch processing, and task creation functions.

  • New use_cache boolean parameter added to batch reverse geolocation API
  • Admin level mappings added for FR (level 8) and US (levels 5, 8)
  • Tests updated to verify correct handling of the new parameter

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
functions-python/reverse_geolocation_populate/src/locality_admin_levels.json Added admin level configurations for France (level 8) and United States (levels 5, 8)
functions-python/reverse_geolocation/src/reverse_geolocation_batch.py Extended parse_request_parameters to parse use_cache from requests and propagated the parameter through reverse_geolocation_batch and create_http_processor_task
functions-python/reverse_geolocation/tests/test_reverse_geolocation_batch.py Updated test assertions to handle the new third return value from parse_request_parameters and updated mock return values to match the new function signature

@cka-y cka-y changed the title feat: add admin level for the US and France + support use_cache param in batch extraction feat: add admin levels for the US and France + support use_cache param in batch extraction Nov 26, 2025
@cka-y cka-y merged commit c52699b into main Nov 26, 2025
3 checks passed
@cka-y cka-y deleted the feat/1473 branch November 26, 2025 15:34
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.

Add admin level 8 to France and US feed locations

3 participants