Skip to content

Commit 3f0c0a8

Browse files
Rename vcf_partition to vcfpartition
Closes #172
1 parent f76c07a commit 3f0c0a8

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ jobs:
6060
python -m build
6161
python -m twine check --strict dist/*
6262
python -m pip install dist/*.whl
63-
- name: Check CLIs
63+
- name: Check vcf2zarr CLI
6464
run: |
6565
vcf2zarr --help
66+
python -m bio2zarr vcf2zarr --help
67+
- name: Check vcfpartition CLI
68+
run: |
69+
vcfpartition --help
70+
python -m bio2zarr vcfpartition --help

bio2zarr/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def bio2zarr():
1616
# up in the right way.
1717
bio2zarr.add_command(cli.vcf2zarr)
1818
bio2zarr.add_command(cli.plink2zarr)
19-
bio2zarr.add_command(cli.vcf_partition)
19+
bio2zarr.add_command(cli.vcfpartition)
2020

2121
if __name__ == "__main__":
2222
bio2zarr()

bio2zarr/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ def plink2zarr():
529529
@click.option("-i", "--index", type=click.Path(), default=None)
530530
@click.option("-n", "--num-parts", type=int, default=None)
531531
# @click.option("-s", "--part-size", type=int, default=None)
532-
def vcf_partition(vcf_path, index, num_parts):
532+
def vcfpartition(vcf_path, index, num_parts):
533533
indexed_vcf = vcf_utils.IndexedVcf(vcf_path, index)
534534
regions = indexed_vcf.partition_into_regions(num_parts=num_parts)
535535
click.echo("\n".join(map(str, regions)))

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ documentation = "https://sgkit-dev.github.io/bio2zarr/intro.html"
4747
[project.scripts]
4848
vcf2zarr = "bio2zarr.cli:vcf2zarr"
4949
plink2zarr = "bio2zarr.cli:plink2zarr"
50-
vcf_partition = "bio2zarr.cli:vcf_partition"
50+
vcfpartition = "bio2zarr.cli:vcfpartition"
5151

5252
[project.optional-dependencies]
5353
dev = [

tests/test_cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ def test_num_parts(self):
611611

612612
runner = ct.CliRunner(mix_stderr=False)
613613
result = runner.invoke(
614-
cli.vcf_partition, [path, "-n", "5"], catch_exceptions=False
614+
cli.vcfpartition, [path, "-n", "5"], catch_exceptions=False
615615
)
616616
assert list(result.stdout.splitlines()) == [
617617
"20:60001-278528",
@@ -623,7 +623,7 @@ def test_num_parts(self):
623623

624624

625625
@pytest.mark.parametrize(
626-
"cmd", [main.bio2zarr, cli.vcf2zarr, cli.plink2zarr, cli.vcf_partition]
626+
"cmd", [main.bio2zarr, cli.vcf2zarr, cli.plink2zarr, cli.vcfpartition]
627627
)
628628
def test_version(cmd):
629629
runner = ct.CliRunner(mix_stderr=False)

0 commit comments

Comments
 (0)