Merge pull request #49 from OCHA-DAP/main #315
11 errors, 3 pass in 33m 27s
14 tests 3 ✅ 33m 27s ⏱️
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 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 0x7f74f9f81ac0>
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 0x7f74f9b9dcd0>
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 0x7f74f9f4a810>
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 0x7f74f5dff470>
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 46s]
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 0x7f74f9f80c80>
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 0x7f74f394c800>
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 37s]
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 0x7f74f9f818b0>
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 0x7f74f1fdb6e0>
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 33s]
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 0x7f74f9f805c0>
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 0x7f74cd37d3d0>
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 41s]
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 0x7f74f9f81520>
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 0x7f74ebfe0290>
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 0x7f74f9f81d00>
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 0x7f74c598ce30>
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 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 0x7f74f9f80a40>
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 0x7f74be8353d0>
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 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 0x7f74f9f80f50>
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 0x7f74be8d8650>
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 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 0x7f74fb7620f0>
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 0x7f74b4aeb260>
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 0x7f74f9f812b0>
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 0x7f74d3c46000>
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