diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 45adbe8..4b8dfd3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -152,7 +152,7 @@ jobs: run: | uv run pytest env: - BIO2ZARR_ZARR_FORMAT: ${{ matrix.zarr-format }} + BIO2ZARR_DEFAULT_ZARR_FORMAT: ${{ matrix.zarr-format }} test-azure-emulator: name: Test Azure emulator @@ -183,4 +183,4 @@ jobs: run: | uv run pytest -q tests/test_azure.py env: - BIO2ZARR_ZARR_FORMAT: "3" + BIO2ZARR_DEFAULT_ZARR_FORMAT: "3" diff --git a/README.md b/README.md index 71e63dd..4786710 100644 --- a/README.md +++ b/README.md @@ -85,8 +85,8 @@ NA00003 # Create some VCZ data % rm -rf data % mkdir data -% BIO2ZARR_ZARR_FORMAT=3 uv run vcf2zarr convert --no-progress --samples-chunk-size=4 tests/data/vcf/sample-part1.vcf.gz data/sample-part1.vcf.vcz -% BIO2ZARR_ZARR_FORMAT=3 uv run vcf2zarr convert --no-progress tests/data/vcf/sample-part2.vcf.gz data/sample-part2.vcf.vcz +% uv run vcf2zarr convert --no-progress --zarr-format=3 --samples-chunk-size=4 tests/data/vcf/sample-part1.vcf.gz data/sample-part1.vcf.vcz +% uv run vcf2zarr convert --no-progress --zarr-format=3 tests/data/vcf/sample-part2.vcf.gz data/sample-part2.vcf.vcz # Copy first vcz to an icechunk store % uv run vczstore copy-store-to-icechunk data/sample-part1.vcf.vcz data/store.vcz diff --git a/tests/test_append.py b/tests/test_append.py index dc6f899..b979962 100644 --- a/tests/test_append.py +++ b/tests/test_append.py @@ -131,7 +131,7 @@ def test_append_icechunk(tmp_path): # note that vcz1 is in icechunk, but the dataset being appended, vcz2, needn't be vcz1 = convert_vcf_to_vcz_icechunk("sample-part1.vcf.gz", tmp_path) - vcz2 = convert_vcf_to_vcz("sample-part2.vcf.gz", tmp_path) + vcz2 = convert_vcf_to_vcz("sample-part2.vcf.gz", tmp_path, zarr_format=3) print(vcz1) print(vcz2) diff --git a/tests/test_azure.py b/tests/test_azure.py index a2b4507..bbbae70 100644 --- a/tests/test_azure.py +++ b/tests/test_azure.py @@ -56,12 +56,12 @@ def _convert_vcf_to_vcz_zarr3(vcf_name, tmp_path): vcf_path = pathlib.Path("tests/data/vcf") / vcf_name output = (tmp_path / vcf_path.name).with_suffix(".vcz") env = dict(os.environ) - env["BIO2ZARR_ZARR_FORMAT"] = "3" completed = subprocess.run( [ "vcf2zarr", "convert", "--no-progress", + "--zarr-format=3", "--worker-processes=0", str(vcf_path), str(output), diff --git a/tests/test_normalise.py b/tests/test_normalise.py index 03152d2..c3c2cbb 100644 --- a/tests/test_normalise.py +++ b/tests/test_normalise.py @@ -350,7 +350,7 @@ def test_normalise_and_append_icechunk(tmp_path): # note that vcz0 is in icechunk, but the others needn't be vcz0 = convert_vcf_to_vcz_icechunk("sample-variants.vcf.gz", tmp_path, ploidy=2) - vcz1 = convert_vcf_to_vcz("sample-part1.vcf.gz", tmp_path) + vcz1 = convert_vcf_to_vcz("sample-part1.vcf.gz", tmp_path, zarr_format=3) vcz1_norm = zarr.storage.MemoryStore() with icechunk_transaction(vcz0, "main", message="append") as store: diff --git a/tests/utils.py b/tests/utils.py index 2710c4f..93c6e15 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -227,7 +227,12 @@ def vcz_path_cache(vcf_path): def convert_vcf_to_vcz( - vcf_name, tmpdir, variants_chunk_size=None, samples_chunk_size=None, ploidy=None + vcf_name, + tmpdir, + variants_chunk_size=None, + samples_chunk_size=None, + ploidy=None, + zarr_format=None, ): vcf_path = pathlib.Path("tests/data/vcf") / vcf_name output = (pathlib.Path(tmpdir) / vcf_path.name).with_suffix(".vcz") @@ -239,6 +244,7 @@ def convert_vcf_to_vcz( worker_processes=0, local_alleles=False, ploidy=ploidy, + zarr_format=zarr_format, ) return output @@ -300,6 +306,7 @@ def convert_vcf_to_vcz_icechunk( variants_chunk_size=variants_chunk_size, samples_chunk_size=samples_chunk_size, ploidy=ploidy, + zarr_format=3, ) ic_tmp_path = tmp_path / "icechunk" diff --git a/uv.lock b/uv.lock index e2bfd4f..5e9af44 100644 --- a/uv.lock +++ b/uv.lock @@ -52,8 +52,8 @@ wheels = [ [[package]] name = "bio2zarr" -version = "0.2.1.dev2" -source = { git = "https://github.com/sgkit-dev/bio2zarr.git#4b50f8803d05ac7ea0a3fa8537cc7c9a3389493f" } +version = "0.2.1.dev6" +source = { git = "https://github.com/sgkit-dev/bio2zarr.git#9c46eadcaefb9a114db879034f1810c1e9b95762" } dependencies = [ { name = "click" }, { name = "coloredlogs" },