Merge pull request #49 from OCHA-DAP/main #315
11 errors, 3 pass in 34m 15s
14 tests 3 ✅ 34m 15s ⏱️
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_conflict_event[themes_to_run0] (tests.test_main.TestHAPIPipelines) with error
test-results.xml [took 7m 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 0x7f5c24c8d670>
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 0x7f5c247be5d0>
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 1m 2s]
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 0x7f5c24c8db80>
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 0x7f5c248b3320>
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 1m 0s]
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 0x7f5c25007fe0>
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 0x7f5c1160ad80>
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 43s]
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 0x7f5c24c8d970>
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 0x7f5c1169b7d0>
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 56s]
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 0x7f5c24c8c650>
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 0x7f5c0b8ce750>
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 11s]
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 0x7f5c2538e810>
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 0x7f5c03c53260>
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 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 0x7f5c24c8d340>
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 0x7f5c0c783950>
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 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 0x7f5c24c8d070>
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 0x7f5bf9268da0>
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 0x7f5c24c8c440>
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 0x7f5bf0112330>
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 0x7f5c24c8c920>
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 0x7f5bf72a5640>
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 53s]
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 0x7f5c24c8cd40>
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 0x7f5bc84f6ff0>
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