From fcacf060789438c66775d533df70d537b254f7ca Mon Sep 17 00:00:00 2001 From: PeninsulaInd Date: Fri, 20 Feb 2026 21:08:56 -0600 Subject: [PATCH] Add --tier1-count flag to ingest-cora command Allows overriding the default random 10-12 T1 article count. Usage: ingest-cora ... --tier1-count 5 Co-Authored-By: Claude Opus 4.6 --- src/cli/commands.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cli/commands.py b/src/cli/commands.py index 181ee00..0b9fc39 100644 --- a/src/cli/commands.py +++ b/src/cli/commands.py @@ -112,7 +112,7 @@ def create_job_file_for_project( click.echo("Warning: No domains with custom hostnames found. Job file not created.", err=True) return None - t1_count = random.randint(10, 12) + t1_count = tier1_count if tier1_count is not None else random.randint(10, 12) t2_count = random.randint(30, 45) if random_deployment_targets is not None: num_targets = min(random_deployment_targets, len(available_domains)) @@ -1080,9 +1080,10 @@ def sync_sites(admin_user: Optional[str], admin_password: Optional[str], dry_run @click.option('--tier1-branded-ratio', '-t', default=None, type=float, help='Ratio of branded anchor text for tier1 (optional, only prompts if provided)') @click.option('--tier1-branded-plus-ratio', '-bp', default=None, type=float, help='Ratio of branded+ anchor text for tier1 (optional, applied to remaining slots after branded)') @click.option('--random-deployment-targets', '-r', type=int, help='Number of random deployment targets to select (default: random 2-3)') +@click.option('--tier1-count', type=int, help='Number of tier1 articles (default: random 10-12)') @click.option('--username', '-u', help='Username for authentication') @click.option('--password', '-p', help='Password for authentication') -def ingest_cora(file_path: str, name: str, money_site_url: Optional[str], custom_anchors: Optional[str], tier1_branded_ratio: float, tier1_branded_plus_ratio: Optional[float], random_deployment_targets: Optional[int], username: Optional[str], password: Optional[str]): +def ingest_cora(file_path: str, name: str, money_site_url: Optional[str], custom_anchors: Optional[str], tier1_branded_ratio: float, tier1_branded_plus_ratio: Optional[float], random_deployment_targets: Optional[int], tier1_count: Optional[int], username: Optional[str], password: Optional[str]): """Ingest a CORA .xlsx report and create a new project""" try: if not username or not password: