From 16bd7576a1c819ddba3baab03ea2ee145d8deb2a Mon Sep 17 00:00:00 2001 From: Franco Scaccheri Cassanello Date: Thu, 10 Oct 2019 11:30:38 -0300 Subject: [PATCH 1/2] Agrego calculo de porcentaje de downloadUrl validos. Contemplo este field en test existente --- pydatajson/indicators.py | 3 +++ tests/test_indicators.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/pydatajson/indicators.py b/pydatajson/indicators.py index 055c033..3eddae7 100644 --- a/pydatajson/indicators.py +++ b/pydatajson/indicators.py @@ -241,6 +241,9 @@ def _network_indicator_percentages(fields, network_indicators): 'datasets_con_datos_pct': (network_indicators.get('datasets_con_datos_cant'), network_indicators.get('datasets_sin_datos_cant')), + 'distribuciones_download_url_ok_pct': + (network_indicators.get('distribuciones_download_url_ok_cant'), + network_indicators.get('distribuciones_download_url_error_cant')), } for indicator in percentages: diff --git a/tests/test_indicators.py b/tests/test_indicators.py index 711f790..3d13ac1 100644 --- a/tests/test_indicators.py +++ b/tests/test_indicators.py @@ -299,6 +299,9 @@ def test_network_indicators(self): }, 'campos_optativos_pct': 0.3256, 'campos_recomendados_pct': 0.5072, + 'distribuciones_download_url_ok_cant': 6, + 'distribuciones_download_url_error_cant': 2, + 'distribuciones_download_url_ok_pct': 0.75 } for k, v in expected.items(): From e1ce5cc671c3ab1a2556375ed128fcca9eebd129 Mon Sep 17 00:00:00 2001 From: Franco Scaccheri Cassanello Date: Thu, 10 Oct 2019 12:36:28 -0300 Subject: [PATCH 2/2] Renombro archivo de tests --- ...ors_generator_tests.py => test_status_indicators_generator.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tests/{status_indicators_generator_tests.py => test_status_indicators_generator.py} (100%) diff --git a/tests/status_indicators_generator_tests.py b/tests/test_status_indicators_generator.py similarity index 100% rename from tests/status_indicators_generator_tests.py rename to tests/test_status_indicators_generator.py