|
81 | 81 | # https://github.com/coverallsapp/github-action
|
82 | 82 | fail-on-error: false
|
83 | 83 |
|
| 84 | + optional_dependencies: |
| 85 | + name: Optional dependencies |
| 86 | + runs-on: ubuntu-latest |
| 87 | + steps: |
| 88 | + - uses: actions/checkout@v4 |
| 89 | + - uses: actions/setup-python@v5 |
| 90 | + with: |
| 91 | + python-version: '3.12' |
| 92 | + - name: Check optional dependencies |
| 93 | + run: | |
| 94 | + python -m venv env-tskit |
| 95 | + source env-tskit/bin/activate |
| 96 | + python -m pip install . |
| 97 | + python -m bio2zarr tskit2zarr convert tests/data/ts/example.trees ts.vcz 2>&1 | tee ts.txt || echo $? > ts_exit.txt |
| 98 | + test "$(cat ts_exit.txt)" = "1" |
| 99 | + grep -q "This process requires the optional tskit module. Install it with: pip install bio2zarr\[tskit\]" ts.txt |
| 100 | + python -m pip install '.[tskit]' |
| 101 | + python -m bio2zarr tskit2zarr convert tests/data/ts/example.trees ts.vcz |
| 102 | + deactivate |
| 103 | +
|
| 104 | + python -m venv env-plink |
| 105 | + source env-plink/bin/activate |
| 106 | + python -m pip install . |
| 107 | + python -m bio2zarr plink2zarr convert tests/data/plink/example.bed plink.vcz 2>&1 | tee plink.txt || echo $? > plink_exit.txt |
| 108 | + test "$(cat plink_exit.txt)" = "1" |
| 109 | + grep -q "This process requires the optional bed_reader module. Install it with: pip install bio2zarr\[plink\]" plink.txt |
| 110 | + python -m pip install '.[plink]' |
| 111 | + python -m bio2zarr plink2zarr convert tests/data/plink/example.bed plink.vcz |
| 112 | + deactivate |
| 113 | +
|
| 114 | + python -m venv env-vcf |
| 115 | + source env-vcf/bin/activate |
| 116 | + python -m pip install . |
| 117 | + python -m bio2zarr vcf2zarr convert tests/data/vcf/sample.vcf.gz sample.vcz 2>&1 | tee vcf.txt || echo $? > vcf_exit.txt |
| 118 | + test "$(cat vcf_exit.txt)" = "1" |
| 119 | + grep -q "This process requires the optional cyvcf2 module. Install it with: pip install bio2zarr\[vcf\]" vcf.txt |
| 120 | + python -m pip install '.[vcf]' |
| 121 | + python -m bio2zarr vcf2zarr convert tests/data/vcf/sample.vcf.gz sample.vcz |
| 122 | + deactivate |
| 123 | +
|
84 | 124 | packaging:
|
85 | 125 | name: Packaging
|
86 | 126 | runs-on: ubuntu-latest
|
|
0 commit comments