Merge pull request #49 from OCHA-DAP/main #315
11 errors, 3 pass in 33m 41s
14 tests 3 ✅ 33m 41s ⏱️
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_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 0x7f0c6f16d640>
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 0x7f0c6ec8b290>
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 0x7f0c6f16cd10>
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 0x7f0c6ec865d0>
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 59s]
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 0x7f0c6f16deb0>
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 0x7f0c6f0b96d0>
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 55s]
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 0x7f0c6f16d340>
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 0x7f0c69cb81a0>
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 34s]
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 0x7f0c6f16c6b0>
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 0x7f0c52d09af0>
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 0x7f0c7054e7b0>
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 0x7f0c41f74560>
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_poverty_rate[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 0x7f0c6f16db50>
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 0x7f0c45155130>
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 0x7f0c71155d60>
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 0x7f0c2acb5790>
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 0x7f0c6f16c9e0>
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 0x7f0c26803140>
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 55s]
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 0x7f0c6f16d010>
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 0x7f0c1e1be090>
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 36s]
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 0x7f0c6f16d940>
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 0x7f0c225bcce0>
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