# Path: virtool/config/cls.py
# class Config:
#     db_connection_string: str
#     db_name: str
#     dev: bool
#     postgres_connection_string: str
#     redis_connection_string: str
#     b2c_client_id: str = None
#     b2c_client_secret: str = None
#     b2c_tenant: str = None
#     b2c_user_flow: str = None
#     base_url: str = ""
#     data_path: Path = None
#     fake: bool = False
#     fake_path: Path = None
#     force_version: str = None
#     host: str = None
#     no_check_files: bool = False
#     no_check_db: bool = False
#     no_fetching: bool = False
#     no_sentry: bool = False
#     port: int = 9950
#     proxy: str = None
#     use_b2c: bool = False
#     verbose: bool = False
#     sentry_dsn: str = "https://9a2f8d1a3f7a431e873207a70ef3d44d:ca6db07b82934005beceae93560a6794@sentry.io/220532"


import io
import json
import re
import aiohttp
import virtool.errors
from logging import getLogger
from typing import Tuple
from zipfile import ZipFile
from virtool.config.cls import Config
from virtool.http.proxy import ProxyRequest
    return {
        **cleaned,
        **hsps,
        "name": hit["description"][0].get("sciname", "No name"),
        "len": hit["len"],
    }


async def check_rid(config: Config, rid: str) -> bool:
    """
    Check if the BLAST process identified by the passed RID is ready.

    :param rid: the RID to check
    :param config: the application configuration object
    :return: ``True`` if ready, ``False`` otherwise

    """
    params = {"CMD": "Get", "RID": rid, "FORMAT_OBJECT": "SearchInfo"}

    async with aiohttp.ClientSession() as session, ProxyRequest(
        config, session.get, BLAST_URL, params=params
    ) as resp:
        if resp.status != 200:
            raise virtool.errors.NCBIError(
                f"RID check request returned status {resp.status}"
            )

        return "Status=WAITING" not in await resp.text()



# Path: virtool/config/cls.py
# class Config:
#     db_connection_string: str
#     db_name: str
#     dev: bool
#     postgres_connection_string: str
#     redis_connection_string: str
#     b2c_client_id: str = None
#     b2c_client_secret: str = None
#     b2c_tenant: str = None
#     b2c_user_flow: str = None
#     base_url: str = ""
#     data_path: Path = None
#     fake: bool = False
#     fake_path: Path = None
#     force_version: str = None
#     host: str = None
#     no_check_files: bool = False
#     no_check_db: bool = False
#     no_fetching: bool = False
#     no_sentry: bool = False
#     port: int = 9950
#     proxy: str = None
#     use_b2c: bool = False
#     verbose: bool = False
#     sentry_dsn: str = "https://9a2f8d1a3f7a431e873207a70ef3d44d:ca6db07b82934005beceae93560a6794@sentry.io/220532"


# Path: virtool/blast/utils.py
import io
import json
import re
import aiohttp
import virtool.errors
from logging import getLogger
from typing import Tuple
from zipfile import ZipFile
from virtool.config.cls import Config
from virtool.http.proxy import ProxyRequest

    return {
        **cleaned,
        **hsps,
        "name": hit["description"][0].get("sciname", "No name"),
        "len": hit["len"],
    }


async def check_rid(config: Config, rid: str) -> bool:
    """
    Check if the BLAST process identified by the passed RID is ready.

    :param rid: the RID to check
    :param config: the application configuration object
    :return: ``True`` if ready, ``False`` otherwise

    """
    params = {"CMD": "Get", "RID": rid, "FORMAT_OBJECT": "SearchInfo"}

    async with aiohttp.ClientSession() as session, ProxyRequest(
        config, session.get, BLAST_URL, params=params
    ) as resp:
        if resp.status != 200:
            raise virtool.errors.NCBIError(
                f"RID check request returned status {resp.status}"
            )

        return "Status=WAITING" not in await resp.text()



async def initialize_ncbi_blast(config: Config, sequence: str) -> Tuple[str, int]: