Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fragment LC tests #947

Merged
merged 11 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
timeout-minutes: 20
run: |
PYTHONPATH=$PWD/gnomad_methods:$PWD/seqr-loading-pipelines \
coverage run -m pytest test --junitxml=test-execution.xml
coverage run -m pytest -n auto test --junitxml=test-execution.xml

rc=$?
coverage xml
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repos:
- id: detect-private-key
- id: debug-statements
- id: check-added-large-files
exclude: '\.*.interval_list'
exclude: '\.*.interval_list|test/data/large_cohort/compressed_dirs/.*'

- repo: https://github.com/populationgenomics/pre-commits
rev: "v0.1.3"
Expand Down
1 change: 0 additions & 1 deletion cpg_workflows/jobs/vep.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ def vep_one(
vep_image = image_path(f'vep_{vep_version}')
vep_mount_path = to_path(reference_path(f'vep_{vep_version}_mount'))
assert all([vep_image, vep_mount_path])
logging.info(f'Using VEP {vep_version}')

j = b.new_job('VEP', (job_attrs or {}) | dict(tool=f'VEP {vep_version}'))
j.image(vep_image)
Expand Down
5 changes: 1 addition & 4 deletions cpg_workflows/large_cohort/dense_subset.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@
from cpg_workflows.utils import can_reuse


def run(
vds_path: str,
out_dense_mt_path: str,
) -> hl.MatrixTable:
def run(vds_path: str, out_dense_mt_path: str) -> hl.MatrixTable:
"""
Filter a sparse VariantDataset to a set of predetermined QC sites
and return a dense MatrixTable with split multiallelics.
Expand Down
3 changes: 2 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ pre-commit
pylint
bump2version
black
pytest
pytest>8
pytest_mock
pytest-xdist>=3.6.0
mypy
cpg-utils>=5.0.11
tenacity
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
license='MIT',
packages=find_packages(),
install_requires=[
'cpg-utils>=5.0.11',
'cpg-utils>=5.1.1',
'cyvcf2==0.30.18',
'analysis-runner>=2.43.3',
'hail==0.2.132', # Pin Hail at CPG's installed version
Expand All @@ -40,6 +40,7 @@
extras_require={
'test': [
'pytest',
'pytest-xdist',
'pytest-mock',
'coverage',
],
Expand Down
9 changes: 9 additions & 0 deletions test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,19 @@
import cpg_workflows.metamist
import cpg_workflows.stages.gatk_sv
import cpg_workflows.workflow
from cpg_utils.hail_batch import start_query_context


@pytest.fixture(autouse=True, scope='session')
def start_up_query():
"""Start up the query backend once per session."""
start_query_context()
yield


@pytest.fixture(autouse=True, scope='function')
def pre_and_post_test():

# Set a dummy google cloud project to avoid errors when running tests for tests
# that use the google cloud.
with mock.patch.dict(
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading