From 050a88e80419acd747704c82d1a431601c1aaafe Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 17 Jul 2025 19:20:09 +0100 Subject: Turn arguments of the encrypt subcommand into options. Prefixed options are easier to follow than the order of positional arguments. * pyhegp/pyhegp.py (encrypt): Turn summary, key and ciphertext arguments into options. --- pyhegp/pyhegp.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pyhegp/pyhegp.py b/pyhegp/pyhegp.py index 0c0d237..2f0bdb4 100644 --- a/pyhegp/pyhegp.py +++ b/pyhegp/pyhegp.py @@ -90,9 +90,15 @@ def pool(pooled_summary_file, summary_files): @main.command() @click.argument("genotype-file", type=click.File("r")) -@click.argument("summary-file", type=click.File("rb")) -@click.argument("key-path", type=click.Path()) -@click.argument("ciphertext-path", type=click.Path()) +@click.option("--summary", "-s", "summary_file", type=click.File("rb"), + help="Summary statistics file", + required=True) +@click.option("--key", "-k", "key_path", type=click.Path(), + help="Output key", + required=True) +@click.option("--output", "-o", "ciphertext_path", type=click.Path(), + default="-", + help="Output ciphertext") def encrypt(genotype_file, summary_file, key_path, ciphertext_path): genotype = read_genotype(genotype_file) summary = read_summary(summary_file) -- cgit v1.2.3