INNER CODE UNIT · Python

validate_arguments

PKU-EMBL/BASALT · BASALT_setup_China_mainland.py:599

def validate_arguments(args: argparse.Namespace) -> None:
    """Reject conflicting or unsafe option combinations."""
    if not args.dry_run and sys.platform != "linux":
        raise InstallationError(
            "BASALT's Conda installation is supported on Linux. Use --dry-run "
            "to inspect commands on another platform."
        )
    if args.channel and len(args.channel) < 2:
        raise InstallationError(
            "Repeat --channel for both conda-forge and Bioconda, in that order."
        )
    if args.model_source == "archive" and not args.model_archive:
        raise InstallationError("--model-source archive requires --model-archive.")
    if args.model_source == "url" and not args.model_url:
        raise InstallationError("--model-source url requires --model-url.")
    if args.model_archive and args.model_source not in ("auto", "archive"):
        raise InstallationError(
            "--model-archive is only compatible with --model-source archive/auto."

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…