def _load_requirements(path_dir: str, file_name: str = "base.txt", unfreeze: bool = not _FREEZE_REQUIREMENTS) -> list:
    """Loading requirements from a file.

    >>> path_req = os.path.join(_PATH_ROOT, "requirements")
    >>> _load_requirements(path_req, "docs.txt")  # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
    ['sphinx>=4.0', ...]

    """
    with open(os.path.join(path_dir, file_name)) as file:
        lines = [ln.strip() for ln in file.readlines()]
    reqs = [_augment_requirement(ln, unfreeze=unfreeze) for ln in lines]
    reqs = [str(req) for req in reqs if req and not req.startswith("-r")]
    if unfreeze:
        # filter empty lines and containing @ which means redirect to some git/http
        reqs = [req for req in reqs if not any(c in req for c in ["@", "http://", "https://"])]
    return reqs
Loading requirements from a file.

    >>> path_req = os.path.join(_PATH_ROOT, "requirements")
    >>> _load_requirements(path_req, "docs.txt")  # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
    ['sphinx>=4.0', ...]

    
setup.py