nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: CartoDB/cartoframes
Pull request #1415 (2019-12-26 15:10:02)

Geographies filtered by provider
Solves https://github.com/CartoDB/cartoframes/issues/1248


Patch:
diff --git a/cartoframes/data/observatory/catalog/repository/geography_repo.py b/cartoframes/data/observatory/catalog/repository/geography_repo.py
index 5836f124..d48ccdf6 100644
--- a/cartoframes/data/observatory/catalog/repository/geography_repo.py
+++ b/cartoframes/data/observatory/catalog/repository/geography_repo.py
@@ -1,6 +1,6 @@
 from cartoframes.auth import Credentials
 
-from .constants import COUNTRY_FILTER, CATEGORY_FILTER
+from .constants import COUNTRY_FILTER, CATEGORY_FILTER, PROVIDER_FILTER
 from .entity_repo import EntityRepository
 
 from .....io.carto import read_carto
@@ -8,7 +8,7 @@ from .....io.carto import read_carto
 
 _GEOGRAPHY_ID_FIELD = 'id'
 _GEOGRAPHY_SLUG_FIELD = 'slug'
-_ALLOWED_FILTERS = [COUNTRY_FILTER, CATEGORY_FILTER]
+_ALLOWED_FILTERS = [COUNTRY_FILTER, CATEGORY_FILTER, PROVIDER_FILTER]
 
 _DO_CREDENTIALS = Credentials('do-metadata', 'default_public')
 


Test patch:
diff --git a/tests/unit/data/observatory/catalog/repository/test_geography_repo.py b/tests/unit/data/observatory/catalog/repository/test_geography_repo.py
index 31d034fd..df189e8a 100644
--- a/tests/unit/data/observatory/catalog/repository/test_geography_repo.py
+++ b/tests/unit/data/observatory/catalog/repository/test_geography_repo.py
@@ -79,7 +79,8 @@ class TestGeographyRepo(object):
         # Then
         mocked_repo.assert_called_once_with({
             'country_id': 'usa',
-            'category_id': 'demographics'
+            'category_id': 'demographics',
+            'provider_id': 'open_data'
         })
         assert geographies == test_geographies