From 0ce2b0ece71cd7ca89b0105f3be25abf501cb611 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Bournhonesque?= Date: Wed, 8 Mar 2023 17:44:28 +0900 Subject: [PATCH] docs: add documentation in metrics.py --- robotoff/metrics.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/robotoff/metrics.py b/robotoff/metrics.py index 9f9e60cb90..4ea29bbc9e 100644 --- a/robotoff/metrics.py +++ b/robotoff/metrics.py @@ -98,6 +98,11 @@ def ensure_influx_database(): def get_product_count(country_tag: str) -> int: + """Return the number of products in Product Opener for a specific country. + + :param country_tag: ISO 2-letter country code + :return: the number of products currently in Product Opener + """ r = http_session.get( settings.BaseURLProvider.country(country_tag) + "/3.json?fields=null", auth=settings._off_request_auth,