Skip to content

TD -> TCD in p-codes #1419

TD -> TCD in p-codes

TD -> TCD in p-codes #1419

GitHub Actions / Test Results failed Feb 17, 2025 in 0s

13 errors, 3 pass in 1m 9s

16 tests    3 ✅  1m 9s ⏱️
 1 suites   0 💤
 1 files     0 ❌  13 🔥

Results for commit 9f52f58.

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_sector_currency[themes_to_run0] (tests.test_main.TestHAPIPipelines) with error

test-results.xml [took 4s]
Raw output
failed on setup with "KeyError: 'TCD12'"
self = <tests.test_main.TestHAPIPipelines object at 0x7fb3c431b3e0>
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 = {'nothing': None}

    @pytest.fixture(scope="function")
    def pipelines(self, configuration, folder, themes_to_run):
        with HDXErrorHandler() 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,
                    )

tests/test_main.py:101: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
src/hapi/pipelines/app/pipelines.py:89: in __init__
    self._adminone.output_admin_name_mappings()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <hdx.location.adminlevel.AdminLevel object at 0x7fb3c365a120>

    def output_admin_name_mappings(self) -> List[str]:
        """Output log of name mappings
    
        Returns:
            List[str]: List of mappings
        """
        output = []
        for name, pcode in self.admin_name_mappings.items():
>           line = f"{name}: {self.pcode_to_name[pcode]} ({pcode})"
E           KeyError: 'TCD12'

../../../.local/share/hatch/env/virtual/hapi-pipelines/zEFzVURN/hatch-test.py3.12/lib/python3.12/site-packages/hdx/location/adminlevel.py:921: KeyError

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 4s]
Raw output
failed on setup with "KeyError: 'TCD12'"
self = <tests.test_main.TestHAPIPipelines object at 0x7fb3c3f37290>
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() 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,
                    )

tests/test_main.py:101: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
src/hapi/pipelines/app/pipelines.py:89: in __init__
    self._adminone.output_admin_name_mappings()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <hdx.location.adminlevel.AdminLevel object at 0x7fb3c1b58e90>

    def output_admin_name_mappings(self) -> List[str]:
        """Output log of name mappings
    
        Returns:
            List[str]: List of mappings
        """
        output = []
        for name, pcode in self.admin_name_mappings.items():
>           line = f"{name}: {self.pcode_to_name[pcode]} ({pcode})"
E           KeyError: 'TCD12'

../../../.local/share/hatch/env/virtual/hapi-pipelines/zEFzVURN/hatch-test.py3.12/lib/python3.12/site-packages/hdx/location/adminlevel.py:921: KeyError

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 4s]
Raw output
failed on setup with "KeyError: 'TCD12'"
self = <tests.test_main.TestHAPIPipelines object at 0x7fb3c3f36690>
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() 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,
                    )

tests/test_main.py:101: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
src/hapi/pipelines/app/pipelines.py:89: in __init__
    self._adminone.output_admin_name_mappings()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <hdx.location.adminlevel.AdminLevel object at 0x7fb3c2fb2e40>

    def output_admin_name_mappings(self) -> List[str]:
        """Output log of name mappings
    
        Returns:
            List[str]: List of mappings
        """
        output = []
        for name, pcode in self.admin_name_mappings.items():
>           line = f"{name}: {self.pcode_to_name[pcode]} ({pcode})"
E           KeyError: 'TCD12'

../../../.local/share/hatch/env/virtual/hapi-pipelines/zEFzVURN/hatch-test.py3.12/lib/python3.12/site-packages/hdx/location/adminlevel.py:921: KeyError

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 4s]
Raw output
failed on setup with "KeyError: 'TCD12'"
self = <tests.test_main.TestHAPIPipelines object at 0x7fb3c3f374a0>
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() 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,
                    )

tests/test_main.py:101: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
src/hapi/pipelines/app/pipelines.py:89: in __init__
    self._adminone.output_admin_name_mappings()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <hdx.location.adminlevel.AdminLevel object at 0x7fb3c3f9a420>

    def output_admin_name_mappings(self) -> List[str]:
        """Output log of name mappings
    
        Returns:
            List[str]: List of mappings
        """
        output = []
        for name, pcode in self.admin_name_mappings.items():
>           line = f"{name}: {self.pcode_to_name[pcode]} ({pcode})"
E           KeyError: 'TCD12'

../../../.local/share/hatch/env/virtual/hapi-pipelines/zEFzVURN/hatch-test.py3.12/lib/python3.12/site-packages/hdx/location/adminlevel.py:921: KeyError

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 4s]
Raw output
failed on setup with "KeyError: 'TCD12'"
self = <tests.test_main.TestHAPIPipelines object at 0x7fb3c3f35d60>
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() 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,
                    )

tests/test_main.py:101: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
src/hapi/pipelines/app/pipelines.py:89: in __init__
    self._adminone.output_admin_name_mappings()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <hdx.location.adminlevel.AdminLevel object at 0x7fb3c3da0890>

    def output_admin_name_mappings(self) -> List[str]:
        """Output log of name mappings
    
        Returns:
            List[str]: List of mappings
        """
        output = []
        for name, pcode in self.admin_name_mappings.items():
>           line = f"{name}: {self.pcode_to_name[pcode]} ({pcode})"
E           KeyError: 'TCD12'

../../../.local/share/hatch/env/virtual/hapi-pipelines/zEFzVURN/hatch-test.py3.12/lib/python3.12/site-packages/hdx/location/adminlevel.py:921: KeyError

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 4s]
Raw output
failed on setup with "KeyError: 'TCD12'"
self = <tests.test_main.TestHAPIPipelines object at 0x7fb3c3f36e10>
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() 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,
                    )

tests/test_main.py:101: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
src/hapi/pipelines/app/pipelines.py:89: in __init__
    self._adminone.output_admin_name_mappings()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <hdx.location.adminlevel.AdminLevel object at 0x7fb3c30fcb90>

    def output_admin_name_mappings(self) -> List[str]:
        """Output log of name mappings
    
        Returns:
            List[str]: List of mappings
        """
        output = []
        for name, pcode in self.admin_name_mappings.items():
>           line = f"{name}: {self.pcode_to_name[pcode]} ({pcode})"
E           KeyError: 'TCD12'

../../../.local/share/hatch/env/virtual/hapi-pipelines/zEFzVURN/hatch-test.py3.12/lib/python3.12/site-packages/hdx/location/adminlevel.py:921: KeyError

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 4s]
Raw output
failed on setup with "KeyError: 'TCD12'"
self = <tests.test_main.TestHAPIPipelines object at 0x7fb3c3f37080>
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() 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,
                    )

tests/test_main.py:101: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
src/hapi/pipelines/app/pipelines.py:89: in __init__
    self._adminone.output_admin_name_mappings()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <hdx.location.adminlevel.AdminLevel object at 0x7fb3c3e7c7a0>

    def output_admin_name_mappings(self) -> List[str]:
        """Output log of name mappings
    
        Returns:
            List[str]: List of mappings
        """
        output = []
        for name, pcode in self.admin_name_mappings.items():
>           line = f"{name}: {self.pcode_to_name[pcode]} ({pcode})"
E           KeyError: 'TCD12'

../../../.local/share/hatch/env/virtual/hapi-pipelines/zEFzVURN/hatch-test.py3.12/lib/python3.12/site-packages/hdx/location/adminlevel.py:921: KeyError

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 4s]
Raw output
failed on setup with "KeyError: 'TCD12'"
self = <tests.test_main.TestHAPIPipelines object at 0x7fb3c3f376e0>
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() 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,
                    )

tests/test_main.py:101: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
src/hapi/pipelines/app/pipelines.py:89: in __init__
    self._adminone.output_admin_name_mappings()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <hdx.location.adminlevel.AdminLevel object at 0x7fb3c2167830>

    def output_admin_name_mappings(self) -> List[str]:
        """Output log of name mappings
    
        Returns:
            List[str]: List of mappings
        """
        output = []
        for name, pcode in self.admin_name_mappings.items():
>           line = f"{name}: {self.pcode_to_name[pcode]} ({pcode})"
E           KeyError: 'TCD12'

../../../.local/share/hatch/env/virtual/hapi-pipelines/zEFzVURN/hatch-test.py3.12/lib/python3.12/site-packages/hdx/location/adminlevel.py:921: KeyError

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 4s]
Raw output
failed on setup with "KeyError: 'TCD12'"
self = <tests.test_main.TestHAPIPipelines object at 0x7fb3c3f37950>
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_prices': None}

    @pytest.fixture(scope="function")
    def pipelines(self, configuration, folder, themes_to_run):
        with HDXErrorHandler() 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,
                    )

tests/test_main.py:101: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
src/hapi/pipelines/app/pipelines.py:89: in __init__
    self._adminone.output_admin_name_mappings()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <hdx.location.adminlevel.AdminLevel object at 0x7fb3c2fb16a0>

    def output_admin_name_mappings(self) -> List[str]:
        """Output log of name mappings
    
        Returns:
            List[str]: List of mappings
        """
        output = []
        for name, pcode in self.admin_name_mappings.items():
>           line = f"{name}: {self.pcode_to_name[pcode]} ({pcode})"
E           KeyError: 'TCD12'

../../../.local/share/hatch/env/virtual/hapi-pipelines/zEFzVURN/hatch-test.py3.12/lib/python3.12/site-packages/hdx/location/adminlevel.py:921: KeyError

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 4s]
Raw output
failed on setup with "KeyError: 'TCD12'"
self = <tests.test_main.TestHAPIPipelines object at 0x7fb3c3f36150>
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': None}

    @pytest.fixture(scope="function")
    def pipelines(self, configuration, folder, themes_to_run):
        with HDXErrorHandler() 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,
                    )

tests/test_main.py:101: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
src/hapi/pipelines/app/pipelines.py:89: in __init__
    self._adminone.output_admin_name_mappings()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <hdx.location.adminlevel.AdminLevel object at 0x7fb3c30fcec0>

    def output_admin_name_mappings(self) -> List[str]:
        """Output log of name mappings
    
        Returns:
            List[str]: List of mappings
        """
        output = []
        for name, pcode in self.admin_name_mappings.items():
>           line = f"{name}: {self.pcode_to_name[pcode]} ({pcode})"
E           KeyError: 'TCD12'

../../../.local/share/hatch/env/virtual/hapi-pipelines/zEFzVURN/hatch-test.py3.12/lib/python3.12/site-packages/hdx/location/adminlevel.py:921: KeyError

Check failure on line 0 in tests.test_main.TestHAPIPipelines

See this annotation in the file changed.

@github-actions github-actions / Test Results

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

test-results.xml [took 4s]
Raw output
failed on setup with "KeyError: 'TCD12'"
self = <tests.test_main.TestHAPIPipelines object at 0x7fb3c4dbf230>
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 = {'nothing': None}

    @pytest.fixture(scope="function")
    def pipelines(self, configuration, folder, themes_to_run):
        with HDXErrorHandler() 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,
                    )

tests/test_main.py:101: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
src/hapi/pipelines/app/pipelines.py:89: in __init__
    self._adminone.output_admin_name_mappings()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <hdx.location.adminlevel.AdminLevel object at 0x7fb3c1da2b70>

    def output_admin_name_mappings(self) -> List[str]:
        """Output log of name mappings
    
        Returns:
            List[str]: List of mappings
        """
        output = []
        for name, pcode in self.admin_name_mappings.items():
>           line = f"{name}: {self.pcode_to_name[pcode]} ({pcode})"
E           KeyError: 'TCD12'

../../../.local/share/hatch/env/virtual/hapi-pipelines/zEFzVURN/hatch-test.py3.12/lib/python3.12/site-packages/hdx/location/adminlevel.py:921: KeyError

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 4s]
Raw output
failed on setup with "KeyError: 'TCD12'"
self = <tests.test_main.TestHAPIPipelines object at 0x7fb3c3f36a80>
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() 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,
                    )

tests/test_main.py:101: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
src/hapi/pipelines/app/pipelines.py:89: in __init__
    self._adminone.output_admin_name_mappings()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <hdx.location.adminlevel.AdminLevel object at 0x7fb3c180c3e0>

    def output_admin_name_mappings(self) -> List[str]:
        """Output log of name mappings
    
        Returns:
            List[str]: List of mappings
        """
        output = []
        for name, pcode in self.admin_name_mappings.items():
>           line = f"{name}: {self.pcode_to_name[pcode]} ({pcode})"
E           KeyError: 'TCD12'

../../../.local/share/hatch/env/virtual/hapi-pipelines/zEFzVURN/hatch-test.py3.12/lib/python3.12/site-packages/hdx/location/adminlevel.py:921: KeyError

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 4s]
Raw output
failed on setup with "KeyError: 'TCD12'"
self = <tests.test_main.TestHAPIPipelines object at 0x7fb3c3f36390>
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() 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,
                    )

tests/test_main.py:101: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
src/hapi/pipelines/app/pipelines.py:89: in __init__
    self._adminone.output_admin_name_mappings()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <hdx.location.adminlevel.AdminLevel object at 0x7fb3c247b020>

    def output_admin_name_mappings(self) -> List[str]:
        """Output log of name mappings
    
        Returns:
            List[str]: List of mappings
        """
        output = []
        for name, pcode in self.admin_name_mappings.items():
>           line = f"{name}: {self.pcode_to_name[pcode]} ({pcode})"
E           KeyError: 'TCD12'

../../../.local/share/hatch/env/virtual/hapi-pipelines/zEFzVURN/hatch-test.py3.12/lib/python3.12/site-packages/hdx/location/adminlevel.py:921: KeyError