Skip to content

Merge pull request #49 from OCHA-DAP/main #315

Merge pull request #49 from OCHA-DAP/main

Merge pull request #49 from OCHA-DAP/main #315

GitHub Actions / Test Results failed Jan 16, 2025 in 0s

11 errors, 3 pass in 33m 36s

14 tests    3 ✅  33m 36s ⏱️
 1 suites   0 💤
 1 files     0 ❌  11 🔥

Results for commit 95f7c02.

Annotations

Check failure on line 0 in tests.test_main.TestHAPIPipelines

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_funding[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 0x7f1524495250>
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 0x7f1523fb1670>
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

See this annotation in the file changed.

@github-actions 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 0x7f1524494380>
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 0x7f1520b7fd10>
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

See this annotation in the file changed.

@github-actions 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 0x7f152f2762a0>
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 0x7f151c557fe0>
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

See this annotation in the file changed.

@github-actions 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 0x7f15244945f0>
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 0x7f151f0931a0>
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

See this annotation in the file changed.

@github-actions 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 0x7f1524494a40>
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 0x7f1508d0fb00>
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

See this annotation in the file changed.

@github-actions 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 0x7f1524494f80>
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 0x7f1503fb1f10>
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

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_food_prices[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 0x7f1524495ac0>
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 0x7f14f267b890>
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

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_operational_presence[themes_to_run0] (tests.test_main.TestHAPIPipelines) with error

test-results.xml [took 1m 9s]
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 0x7f1524453f50>
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 0x7f14dff053a0>
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

See this annotation in the file changed.

@github-actions 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 0x7f1524494cb0>
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 0x7f14da9123c0>
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

See this annotation in the file changed.

@github-actions 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 0x7f1524495850>
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 0x7f14f61ad760>
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

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_conflict_event[themes_to_run0] (tests.test_main.TestHAPIPipelines) with error

test-results.xml [took 7m 39s]
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 0x7f1524495520>
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 0x7f14d81200b0>
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

See this annotation in the file changed.

@github-actions 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