about summary refs log tree commit diff
diff options
context:
space:
mode:
authorArun Isaac2025-09-02 21:35:29 +0100
committerArun Isaac2025-09-02 22:32:03 +0100
commit5d0eca109a50e2349a35571577b14589cb5b75a9 (patch)
treeba6dc7ceacdac66e962f5527a7e7e41c197e2102
parent831f3da094834547fd9a2d357a8006c065a85289 (diff)
downloadpyhegp-5d0eca109a50e2349a35571577b14589cb5b75a9.tar.gz
pyhegp-5d0eca109a50e2349a35571577b14589cb5b75a9.tar.lz
pyhegp-5d0eca109a50e2349a35571577b14589cb5b75a9.zip
Rename cat subcommand to cat-genotype.
A cat-phenotype subcommand is coming. Hence rename this.
-rw-r--r--README.md2
-rw-r--r--pyhegp/pyhegp.py4
-rw-r--r--tests/test_pyhegp.py2
3 files changed, 4 insertions, 4 deletions
diff --git a/README.md b/README.md
index ee7057f..2b3ab5d 100644
--- a/README.md
+++ b/README.md
@@ -87,7 +87,7 @@ pyhegp encrypt -s complete-summary genotype.tsv
 ```
 Finally, the data owners share the encrypted data `genotype.tsv.hegp` with the broker who concatenates it and shares it with all parties.
 ```
-pyhegp cat -o complete-genotype.tsv.hegp genotype1.tsv.hegp genotype2.tsv.hegp ...
+pyhegp cat-genotype -o complete-genotype.tsv.hegp genotype1.tsv.hegp genotype2.tsv.hegp ...
 ```
 Note that all data sharing is carried out-of-band and is outside the scope of `pyhegp`.
 
diff --git a/pyhegp/pyhegp.py b/pyhegp/pyhegp.py
index 98e904c..8217040 100644
--- a/pyhegp/pyhegp.py
+++ b/pyhegp/pyhegp.py
@@ -187,13 +187,13 @@ def encrypt_command(genotype_file, summary_file, key_file):
     with ciphertext_path.open("w") as ciphertext_file:
         write_genotype(ciphertext_file, encrypted_genotype)
 
-@main.command("cat")
+@main.command("cat-genotype")
 @click.option("--output", "-o", "output_file",
               type=click.File("wb"),
               default="-",
               help="output file")
 @click.argument("ciphertext-files", type=click.File("rb"), nargs=-1)
-def cat_command(output_file, ciphertext_files):
+def cat_genotype_command(output_file, ciphertext_files):
     write_genotype(output_file,
                    cat_genotype([read_genotype(file)
                                  for file in ciphertext_files]))
diff --git a/tests/test_pyhegp.py b/tests/test_pyhegp.py
index 88f13ef..d34c331 100644
--- a/tests/test_pyhegp.py
+++ b/tests/test_pyhegp.py
@@ -221,7 +221,7 @@ def test_joint_workflow(tmp_path):
         assert ciphertext.exists()
     complete_ciphertext = tmp_path / "complete-genotype.tsv.hegp"
     result = runner.invoke(
-        main, ["cat",
+        main, ["cat-genotype",
                "-o", complete_ciphertext,
                *(str(tmp_path / f"genotype{i}.tsv.hegp") for i in range(4))])
     assert result.exit_code == 0