Merge pull request #49 from OCHA-DAP/main #315
11 errors, 3 pass in 33m 51s
14 tests 3 ✅ 33m 51s ⏱️
1 suites 0 💤
1 files 0 ❌ 11 🔥
Results for commit 95f7c02.
Annotations
Check failure on line 0 in tests.test_main.TestHAPIPipelines
github-actions / Test Results
test_poverty_rate[themes_to_run0] (tests.test_main.TestHAPIPipelines) with error
test-results.xml [took 44s]
Raw output
failed on setup with "TypeError: HDXErrorHandler.output_errors() takes 1 positional argument but 2 were given"
self = <tests.test_main.TestHAPIPipelines object at 0x7f47e7761880>
configuration = {'hdx_prod_site': {'url': 'https://data.humdata.org'}, 'hdx_demo_site': {'url': 'https://demo.data-humdata-org.ahconu.... markets', 'format': 'csv'}, 'unused_adm1': ['CIV', 'KEN'], 'unused_adm2': ['DOM', 'RUS', 'UGA'], 'adm1_only': ['SLV']}
folder = 'tests/fixtures', themes_to_run = {'poverty_rate': None}
@pytest.fixture(scope="function")
def pipelines(self, configuration, folder, themes_to_run):
with HDXErrorHandler(should_exit_on_error=False) as error_handler:
with temp_dir(
"TestHAPIPipelines",
delete_on_success=True,
delete_on_failure=False,
) as temp_folder:
db_uri = "postgresql+psycopg://postgres:postgres@localhost:5432/hapitest"
logger.info(f"Connecting to database {db_uri}")
with Database(
db_uri=db_uri,
recreate_schema=True,
prepare_fn=prepare_hapi_views,
) as database:
session = database.get_session()
today = parse_date("2023-10-11")
Read.create_readers(
temp_folder,
join(folder, "input"),
temp_folder,
False,
True,
today=today,
)
logger.info("Initialising pipelines")
pipelines = Pipelines(
configuration,
session,
today,
themes_to_run=themes_to_run,
error_handler=error_handler,
use_live=False,
)
logger.info("Running pipelines")
pipelines.run()
logger.info("Writing to database")
pipelines.output()
logger.info("Writing debug output")
pipelines.debug(temp_folder)
> pipelines.output_errors(err_to_hdx=False)
tests/test_main.py:114:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <hapi.pipelines.app.pipelines.Pipelines object at 0x7f47e728c560>
err_to_hdx = False
def output_errors(self, err_to_hdx: bool) -> None:
> self.error_handler.output_errors(err_to_hdx)
E TypeError: HDXErrorHandler.output_errors() takes 1 positional argument but 2 were given
src/hapi/pipelines/app/pipelines.py:397: TypeError
Check failure on line 0 in tests.test_main.TestHAPIPipelines
github-actions / Test Results
test_operational_presence[themes_to_run0] (tests.test_main.TestHAPIPipelines) with error
test-results.xml [took 1m 8s]
Raw output
failed on setup with "TypeError: HDXErrorHandler.output_errors() takes 1 positional argument but 2 were given"
self = <tests.test_main.TestHAPIPipelines object at 0x7f47e7737ec0>
configuration = {'hdx_prod_site': {'url': 'https://data.humdata.org'}, 'hdx_demo_site': {'url': 'https://demo.data-humdata-org.ahconu.... markets', 'format': 'csv'}, 'unused_adm1': ['CIV', 'KEN'], 'unused_adm2': ['DOM', 'RUS', 'UGA'], 'adm1_only': ['SLV']}
folder = 'tests/fixtures'
themes_to_run = {'operational_presence': ('AFG', 'MLI', 'NGA')}
@pytest.fixture(scope="function")
def pipelines(self, configuration, folder, themes_to_run):
with HDXErrorHandler(should_exit_on_error=False) as error_handler:
with temp_dir(
"TestHAPIPipelines",
delete_on_success=True,
delete_on_failure=False,
) as temp_folder:
db_uri = "postgresql+psycopg://postgres:postgres@localhost:5432/hapitest"
logger.info(f"Connecting to database {db_uri}")
with Database(
db_uri=db_uri,
recreate_schema=True,
prepare_fn=prepare_hapi_views,
) as database:
session = database.get_session()
today = parse_date("2023-10-11")
Read.create_readers(
temp_folder,
join(folder, "input"),
temp_folder,
False,
True,
today=today,
)
logger.info("Initialising pipelines")
pipelines = Pipelines(
configuration,
session,
today,
themes_to_run=themes_to_run,
error_handler=error_handler,
use_live=False,
)
logger.info("Running pipelines")
pipelines.run()
logger.info("Writing to database")
pipelines.output()
logger.info("Writing debug output")
pipelines.debug(temp_folder)
> pipelines.output_errors(err_to_hdx=False)
tests/test_main.py:114:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <hapi.pipelines.app.pipelines.Pipelines object at 0x7f47e728a6f0>
err_to_hdx = False
def output_errors(self, err_to_hdx: bool) -> None:
> self.error_handler.output_errors(err_to_hdx)
E TypeError: HDXErrorHandler.output_errors() takes 1 positional argument but 2 were given
src/hapi/pipelines/app/pipelines.py:397: TypeError
Check failure on line 0 in tests.test_main.TestHAPIPipelines
github-actions / Test Results
test_conflict_event[themes_to_run0] (tests.test_main.TestHAPIPipelines) with error
test-results.xml [took 7m 40s]
Raw output
failed on setup with "TypeError: HDXErrorHandler.output_errors() takes 1 positional argument but 2 were given"
self = <tests.test_main.TestHAPIPipelines object at 0x7f47e7761520>
configuration = {'hdx_prod_site': {'url': 'https://data.humdata.org'}, 'hdx_demo_site': {'url': 'https://demo.data-humdata-org.ahconu.... markets', 'format': 'csv'}, 'unused_adm1': ['CIV', 'KEN'], 'unused_adm2': ['DOM', 'RUS', 'UGA'], 'adm1_only': ['SLV']}
folder = 'tests/fixtures', themes_to_run = {'conflict_event': ('BFA', 'COL')}
@pytest.fixture(scope="function")
def pipelines(self, configuration, folder, themes_to_run):
with HDXErrorHandler(should_exit_on_error=False) as error_handler:
with temp_dir(
"TestHAPIPipelines",
delete_on_success=True,
delete_on_failure=False,
) as temp_folder:
db_uri = "postgresql+psycopg://postgres:postgres@localhost:5432/hapitest"
logger.info(f"Connecting to database {db_uri}")
with Database(
db_uri=db_uri,
recreate_schema=True,
prepare_fn=prepare_hapi_views,
) as database:
session = database.get_session()
today = parse_date("2023-10-11")
Read.create_readers(
temp_folder,
join(folder, "input"),
temp_folder,
False,
True,
today=today,
)
logger.info("Initialising pipelines")
pipelines = Pipelines(
configuration,
session,
today,
themes_to_run=themes_to_run,
error_handler=error_handler,
use_live=False,
)
logger.info("Running pipelines")
pipelines.run()
logger.info("Writing to database")
pipelines.output()
logger.info("Writing debug output")
pipelines.debug(temp_folder)
> pipelines.output_errors(err_to_hdx=False)
tests/test_main.py:114:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <hapi.pipelines.app.pipelines.Pipelines object at 0x7f47e770aa50>
err_to_hdx = False
def output_errors(self, err_to_hdx: bool) -> None:
> self.error_handler.output_errors(err_to_hdx)
E TypeError: HDXErrorHandler.output_errors() takes 1 positional argument but 2 were given
src/hapi/pipelines/app/pipelines.py:397: TypeError
Check failure on line 0 in tests.test_main.TestHAPIPipelines
github-actions / Test Results
test_humanitarian_needs[themes_to_run0] (tests.test_main.TestHAPIPipelines) with error
test-results.xml [took 54s]
Raw output
failed on setup with "TypeError: HDXErrorHandler.output_errors() takes 1 positional argument but 2 were given"
self = <tests.test_main.TestHAPIPipelines object at 0x7f47e77605f0>
configuration = {'hdx_prod_site': {'url': 'https://data.humdata.org'}, 'hdx_demo_site': {'url': 'https://demo.data-humdata-org.ahconu.... markets', 'format': 'csv'}, 'unused_adm1': ['CIV', 'KEN'], 'unused_adm2': ['DOM', 'RUS', 'UGA'], 'adm1_only': ['SLV']}
folder = 'tests/fixtures', themes_to_run = {'humanitarian_needs': None}
@pytest.fixture(scope="function")
def pipelines(self, configuration, folder, themes_to_run):
with HDXErrorHandler(should_exit_on_error=False) as error_handler:
with temp_dir(
"TestHAPIPipelines",
delete_on_success=True,
delete_on_failure=False,
) as temp_folder:
db_uri = "postgresql+psycopg://postgres:postgres@localhost:5432/hapitest"
logger.info(f"Connecting to database {db_uri}")
with Database(
db_uri=db_uri,
recreate_schema=True,
prepare_fn=prepare_hapi_views,
) as database:
session = database.get_session()
today = parse_date("2023-10-11")
Read.create_readers(
temp_folder,
join(folder, "input"),
temp_folder,
False,
True,
today=today,
)
logger.info("Initialising pipelines")
pipelines = Pipelines(
configuration,
session,
today,
themes_to_run=themes_to_run,
error_handler=error_handler,
use_live=False,
)
logger.info("Running pipelines")
pipelines.run()
logger.info("Writing to database")
pipelines.output()
logger.info("Writing debug output")
pipelines.debug(temp_folder)
> pipelines.output_errors(err_to_hdx=False)
tests/test_main.py:114:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <hapi.pipelines.app.pipelines.Pipelines object at 0x7f47cc9b4bf0>
err_to_hdx = False
def output_errors(self, err_to_hdx: bool) -> None:
> self.error_handler.output_errors(err_to_hdx)
E TypeError: HDXErrorHandler.output_errors() takes 1 positional argument but 2 were given
src/hapi/pipelines/app/pipelines.py:397: TypeError
Check failure on line 0 in tests.test_main.TestHAPIPipelines
github-actions / Test Results
test_population[themes_to_run0] (tests.test_main.TestHAPIPipelines) with error
test-results.xml [took 58s]
Raw output
failed on setup with "TypeError: HDXErrorHandler.output_errors() takes 1 positional argument but 2 were given"
self = <tests.test_main.TestHAPIPipelines object at 0x7f47eaa21df0>
configuration = {'hdx_prod_site': {'url': 'https://data.humdata.org'}, 'hdx_demo_site': {'url': 'https://demo.data-humdata-org.ahconu.... markets', 'format': 'csv'}, 'unused_adm1': ['CIV', 'KEN'], 'unused_adm2': ['DOM', 'RUS', 'UGA'], 'adm1_only': ['SLV']}
folder = 'tests/fixtures', themes_to_run = {'population': None}
@pytest.fixture(scope="function")
def pipelines(self, configuration, folder, themes_to_run):
with HDXErrorHandler(should_exit_on_error=False) as error_handler:
with temp_dir(
"TestHAPIPipelines",
delete_on_success=True,
delete_on_failure=False,
) as temp_folder:
db_uri = "postgresql+psycopg://postgres:postgres@localhost:5432/hapitest"
logger.info(f"Connecting to database {db_uri}")
with Database(
db_uri=db_uri,
recreate_schema=True,
prepare_fn=prepare_hapi_views,
) as database:
session = database.get_session()
today = parse_date("2023-10-11")
Read.create_readers(
temp_folder,
join(folder, "input"),
temp_folder,
False,
True,
today=today,
)
logger.info("Initialising pipelines")
pipelines = Pipelines(
configuration,
session,
today,
themes_to_run=themes_to_run,
error_handler=error_handler,
use_live=False,
)
logger.info("Running pipelines")
pipelines.run()
logger.info("Writing to database")
pipelines.output()
logger.info("Writing debug output")
pipelines.debug(temp_folder)
> pipelines.output_errors(err_to_hdx=False)
tests/test_main.py:114:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <hapi.pipelines.app.pipelines.Pipelines object at 0x7f47d3ed5040>
err_to_hdx = False
def output_errors(self, err_to_hdx: bool) -> None:
> self.error_handler.output_errors(err_to_hdx)
E TypeError: HDXErrorHandler.output_errors() takes 1 positional argument but 2 were given
src/hapi/pipelines/app/pipelines.py:397: TypeError
Check failure on line 0 in tests.test_main.TestHAPIPipelines
github-actions / Test Results
test_food_security[themes_to_run0] (tests.test_main.TestHAPIPipelines) with error
test-results.xml [took 1m 35s]
Raw output
failed on setup with "TypeError: HDXErrorHandler.output_errors() takes 1 positional argument but 2 were given"
self = <tests.test_main.TestHAPIPipelines object at 0x7f47e7760350>
configuration = {'hdx_prod_site': {'url': 'https://data.humdata.org'}, 'hdx_demo_site': {'url': 'https://demo.data-humdata-org.ahconu.... markets', 'format': 'csv'}, 'unused_adm1': ['CIV', 'KEN'], 'unused_adm2': ['DOM', 'RUS', 'UGA'], 'adm1_only': ['SLV']}
folder = 'tests/fixtures', themes_to_run = {'food_security': None}
@pytest.fixture(scope="function")
def pipelines(self, configuration, folder, themes_to_run):
with HDXErrorHandler(should_exit_on_error=False) as error_handler:
with temp_dir(
"TestHAPIPipelines",
delete_on_success=True,
delete_on_failure=False,
) as temp_folder:
db_uri = "postgresql+psycopg://postgres:postgres@localhost:5432/hapitest"
logger.info(f"Connecting to database {db_uri}")
with Database(
db_uri=db_uri,
recreate_schema=True,
prepare_fn=prepare_hapi_views,
) as database:
session = database.get_session()
today = parse_date("2023-10-11")
Read.create_readers(
temp_folder,
join(folder, "input"),
temp_folder,
False,
True,
today=today,
)
logger.info("Initialising pipelines")
pipelines = Pipelines(
configuration,
session,
today,
themes_to_run=themes_to_run,
error_handler=error_handler,
use_live=False,
)
logger.info("Running pipelines")
pipelines.run()
logger.info("Writing to database")
pipelines.output()
logger.info("Writing debug output")
pipelines.debug(temp_folder)
> pipelines.output_errors(err_to_hdx=False)
tests/test_main.py:114:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <hapi.pipelines.app.pipelines.Pipelines object at 0x7f47d2ec28a0>
err_to_hdx = False
def output_errors(self, err_to_hdx: bool) -> None:
> self.error_handler.output_errors(err_to_hdx)
E TypeError: HDXErrorHandler.output_errors() takes 1 positional argument but 2 were given
src/hapi/pipelines/app/pipelines.py:397: TypeError
Check failure on line 0 in tests.test_main.TestHAPIPipelines
github-actions / Test Results
test_national_risk[themes_to_run0] (tests.test_main.TestHAPIPipelines) with error
test-results.xml [took 47s]
Raw output
failed on setup with "TypeError: HDXErrorHandler.output_errors() takes 1 positional argument but 2 were given"
self = <tests.test_main.TestHAPIPipelines object at 0x7f47e7760a10>
configuration = {'hdx_prod_site': {'url': 'https://data.humdata.org'}, 'hdx_demo_site': {'url': 'https://demo.data-humdata-org.ahconu.... markets', 'format': 'csv'}, 'unused_adm1': ['CIV', 'KEN'], 'unused_adm2': ['DOM', 'RUS', 'UGA'], 'adm1_only': ['SLV']}
folder = 'tests/fixtures', themes_to_run = {'national_risk': None}
@pytest.fixture(scope="function")
def pipelines(self, configuration, folder, themes_to_run):
with HDXErrorHandler(should_exit_on_error=False) as error_handler:
with temp_dir(
"TestHAPIPipelines",
delete_on_success=True,
delete_on_failure=False,
) as temp_folder:
db_uri = "postgresql+psycopg://postgres:postgres@localhost:5432/hapitest"
logger.info(f"Connecting to database {db_uri}")
with Database(
db_uri=db_uri,
recreate_schema=True,
prepare_fn=prepare_hapi_views,
) as database:
session = database.get_session()
today = parse_date("2023-10-11")
Read.create_readers(
temp_folder,
join(folder, "input"),
temp_folder,
False,
True,
today=today,
)
logger.info("Initialising pipelines")
pipelines = Pipelines(
configuration,
session,
today,
themes_to_run=themes_to_run,
error_handler=error_handler,
use_live=False,
)
logger.info("Running pipelines")
pipelines.run()
logger.info("Writing to database")
pipelines.output()
logger.info("Writing debug output")
pipelines.debug(temp_folder)
> pipelines.output_errors(err_to_hdx=False)
tests/test_main.py:114:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <hapi.pipelines.app.pipelines.Pipelines object at 0x7f47c3a72a20>
err_to_hdx = False
def output_errors(self, err_to_hdx: bool) -> None:
> self.error_handler.output_errors(err_to_hdx)
E TypeError: HDXErrorHandler.output_errors() takes 1 positional argument but 2 were given
src/hapi/pipelines/app/pipelines.py:397: TypeError
Check failure on line 0 in tests.test_main.TestHAPIPipelines
github-actions / Test Results
test_idps[themes_to_run0] (tests.test_main.TestHAPIPipelines) with error
test-results.xml [took 1m 57s]
Raw output
failed on setup with "TypeError: HDXErrorHandler.output_errors() takes 1 positional argument but 2 were given"
self = <tests.test_main.TestHAPIPipelines object at 0x7f47e7760f80>
configuration = {'hdx_prod_site': {'url': 'https://data.humdata.org'}, 'hdx_demo_site': {'url': 'https://demo.data-humdata-org.ahconu.... markets', 'format': 'csv'}, 'unused_adm1': ['CIV', 'KEN'], 'unused_adm2': ['DOM', 'RUS', 'UGA'], 'adm1_only': ['SLV']}
folder = 'tests/fixtures', themes_to_run = {'idps': None}
@pytest.fixture(scope="function")
def pipelines(self, configuration, folder, themes_to_run):
with HDXErrorHandler(should_exit_on_error=False) as error_handler:
with temp_dir(
"TestHAPIPipelines",
delete_on_success=True,
delete_on_failure=False,
) as temp_folder:
db_uri = "postgresql+psycopg://postgres:postgres@localhost:5432/hapitest"
logger.info(f"Connecting to database {db_uri}")
with Database(
db_uri=db_uri,
recreate_schema=True,
prepare_fn=prepare_hapi_views,
) as database:
session = database.get_session()
today = parse_date("2023-10-11")
Read.create_readers(
temp_folder,
join(folder, "input"),
temp_folder,
False,
True,
today=today,
)
logger.info("Initialising pipelines")
pipelines = Pipelines(
configuration,
session,
today,
themes_to_run=themes_to_run,
error_handler=error_handler,
use_live=False,
)
logger.info("Running pipelines")
pipelines.run()
logger.info("Writing to database")
pipelines.output()
logger.info("Writing debug output")
pipelines.debug(temp_folder)
> pipelines.output_errors(err_to_hdx=False)
tests/test_main.py:114:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <hapi.pipelines.app.pipelines.Pipelines object at 0x7f47dd9b7440>
err_to_hdx = False
def output_errors(self, err_to_hdx: bool) -> None:
> self.error_handler.output_errors(err_to_hdx)
E TypeError: HDXErrorHandler.output_errors() takes 1 positional argument but 2 were given
src/hapi/pipelines/app/pipelines.py:397: TypeError
Check failure on line 0 in tests.test_main.TestHAPIPipelines
github-actions / Test Results
test_funding[themes_to_run0] (tests.test_main.TestHAPIPipelines) with error
test-results.xml [took 42s]
Raw output
failed on setup with "TypeError: HDXErrorHandler.output_errors() takes 1 positional argument but 2 were given"
self = <tests.test_main.TestHAPIPipelines object at 0x7f47e7761280>
configuration = {'hdx_prod_site': {'url': 'https://data.humdata.org'}, 'hdx_demo_site': {'url': 'https://demo.data-humdata-org.ahconu.... markets', 'format': 'csv'}, 'unused_adm1': ['CIV', 'KEN'], 'unused_adm2': ['DOM', 'RUS', 'UGA'], 'adm1_only': ['SLV']}
folder = 'tests/fixtures', themes_to_run = {'funding': ('AFG', 'BFA', 'UKR')}
@pytest.fixture(scope="function")
def pipelines(self, configuration, folder, themes_to_run):
with HDXErrorHandler(should_exit_on_error=False) as error_handler:
with temp_dir(
"TestHAPIPipelines",
delete_on_success=True,
delete_on_failure=False,
) as temp_folder:
db_uri = "postgresql+psycopg://postgres:postgres@localhost:5432/hapitest"
logger.info(f"Connecting to database {db_uri}")
with Database(
db_uri=db_uri,
recreate_schema=True,
prepare_fn=prepare_hapi_views,
) as database:
session = database.get_session()
today = parse_date("2023-10-11")
Read.create_readers(
temp_folder,
join(folder, "input"),
temp_folder,
False,
True,
today=today,
)
logger.info("Initialising pipelines")
pipelines = Pipelines(
configuration,
session,
today,
themes_to_run=themes_to_run,
error_handler=error_handler,
use_live=False,
)
logger.info("Running pipelines")
pipelines.run()
logger.info("Writing to database")
pipelines.output()
logger.info("Writing debug output")
pipelines.debug(temp_folder)
> pipelines.output_errors(err_to_hdx=False)
tests/test_main.py:114:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <hapi.pipelines.app.pipelines.Pipelines object at 0x7f47c3174980>
err_to_hdx = False
def output_errors(self, err_to_hdx: bool) -> None:
> self.error_handler.output_errors(err_to_hdx)
E TypeError: HDXErrorHandler.output_errors() takes 1 positional argument but 2 were given
src/hapi/pipelines/app/pipelines.py:397: TypeError
Check failure on line 0 in tests.test_main.TestHAPIPipelines
github-actions / Test Results
test_refugees_and_returnees[themes_to_run0] (tests.test_main.TestHAPIPipelines) with error
test-results.xml [took 15m 57s]
Raw output
failed on setup with "TypeError: HDXErrorHandler.output_errors() takes 1 positional argument but 2 were given"
self = <tests.test_main.TestHAPIPipelines object at 0x7f47e7760c50>
configuration = {'hdx_prod_site': {'url': 'https://data.humdata.org'}, 'hdx_demo_site': {'url': 'https://demo.data-humdata-org.ahconu.... markets', 'format': 'csv'}, 'unused_adm1': ['CIV', 'KEN'], 'unused_adm2': ['DOM', 'RUS', 'UGA'], 'adm1_only': ['SLV']}
folder = 'tests/fixtures', themes_to_run = {'refugees_and_returnees': None}
@pytest.fixture(scope="function")
def pipelines(self, configuration, folder, themes_to_run):
with HDXErrorHandler(should_exit_on_error=False) as error_handler:
with temp_dir(
"TestHAPIPipelines",
delete_on_success=True,
delete_on_failure=False,
) as temp_folder:
db_uri = "postgresql+psycopg://postgres:postgres@localhost:5432/hapitest"
logger.info(f"Connecting to database {db_uri}")
with Database(
db_uri=db_uri,
recreate_schema=True,
prepare_fn=prepare_hapi_views,
) as database:
session = database.get_session()
today = parse_date("2023-10-11")
Read.create_readers(
temp_folder,
join(folder, "input"),
temp_folder,
False,
True,
today=today,
)
logger.info("Initialising pipelines")
pipelines = Pipelines(
configuration,
session,
today,
themes_to_run=themes_to_run,
error_handler=error_handler,
use_live=False,
)
logger.info("Running pipelines")
pipelines.run()
logger.info("Writing to database")
pipelines.output()
logger.info("Writing debug output")
pipelines.debug(temp_folder)
> pipelines.output_errors(err_to_hdx=False)
tests/test_main.py:114:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <hapi.pipelines.app.pipelines.Pipelines object at 0x7f47a3093ad0>
err_to_hdx = False
def output_errors(self, err_to_hdx: bool) -> None:
> self.error_handler.output_errors(err_to_hdx)
E TypeError: HDXErrorHandler.output_errors() takes 1 positional argument but 2 were given
src/hapi/pipelines/app/pipelines.py:397: TypeError
Check failure on line 0 in tests.test_main.TestHAPIPipelines
github-actions / Test Results
test_food_prices[themes_to_run0] (tests.test_main.TestHAPIPipelines) with error
test-results.xml [took 57s]
Raw output
failed on setup with "TypeError: HDXErrorHandler.output_errors() takes 1 positional argument but 2 were given"
self = <tests.test_main.TestHAPIPipelines object at 0x7f47e7761a90>
configuration = {'hdx_prod_site': {'url': 'https://data.humdata.org'}, 'hdx_demo_site': {'url': 'https://demo.data-humdata-org.ahconu....markets.csv', 'headers': 1}, 'unused_adm1': ['CIV', 'KEN'], 'unused_adm2': ['DOM', 'RUS', 'UGA'], 'adm1_only': ['SLV']}
folder = 'tests/fixtures', themes_to_run = {'food_prices': None}
@pytest.fixture(scope="function")
def pipelines(self, configuration, folder, themes_to_run):
with HDXErrorHandler(should_exit_on_error=False) as error_handler:
with temp_dir(
"TestHAPIPipelines",
delete_on_success=True,
delete_on_failure=False,
) as temp_folder:
db_uri = "postgresql+psycopg://postgres:postgres@localhost:5432/hapitest"
logger.info(f"Connecting to database {db_uri}")
with Database(
db_uri=db_uri,
recreate_schema=True,
prepare_fn=prepare_hapi_views,
) as database:
session = database.get_session()
today = parse_date("2023-10-11")
Read.create_readers(
temp_folder,
join(folder, "input"),
temp_folder,
False,
True,
today=today,
)
logger.info("Initialising pipelines")
pipelines = Pipelines(
configuration,
session,
today,
themes_to_run=themes_to_run,
error_handler=error_handler,
use_live=False,
)
logger.info("Running pipelines")
pipelines.run()
logger.info("Writing to database")
pipelines.output()
logger.info("Writing debug output")
pipelines.debug(temp_folder)
> pipelines.output_errors(err_to_hdx=False)
tests/test_main.py:114:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <hapi.pipelines.app.pipelines.Pipelines object at 0x7f478dcf90a0>
err_to_hdx = False
def output_errors(self, err_to_hdx: bool) -> None:
> self.error_handler.output_errors(err_to_hdx)
E TypeError: HDXErrorHandler.output_errors() takes 1 positional argument but 2 were given
src/hapi/pipelines/app/pipelines.py:397: TypeError
Check notice on line 0 in .github
github-actions / Test Results
14 tests found
There are 14 tests, see "Raw output" for the full list of tests.
Raw output
tests.test_main.TestHAPIPipelines ‑ test_conflict_event[themes_to_run0]
tests.test_main.TestHAPIPipelines ‑ test_food_prices[themes_to_run0]
tests.test_main.TestHAPIPipelines ‑ test_food_security[themes_to_run0]
tests.test_main.TestHAPIPipelines ‑ test_funding[themes_to_run0]
tests.test_main.TestHAPIPipelines ‑ test_humanitarian_needs[themes_to_run0]
tests.test_main.TestHAPIPipelines ‑ test_idps[themes_to_run0]
tests.test_main.TestHAPIPipelines ‑ test_national_risk[themes_to_run0]
tests.test_main.TestHAPIPipelines ‑ test_operational_presence[themes_to_run0]
tests.test_main.TestHAPIPipelines ‑ test_population[themes_to_run0]
tests.test_main.TestHAPIPipelines ‑ test_poverty_rate[themes_to_run0]
tests.test_main.TestHAPIPipelines ‑ test_refugees_and_returnees[themes_to_run0]
tests.test_parse_tags ‑ test_get_gender_and_age_range
tests.test_parse_tags ‑ test_get_min_and_max_age
tests.test_process_config_defaults ‑ test_process_config_defaults