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

Add integration test for post processing of flat flow cell demultiplexed with bclconvert #2236

Merged
merged 13 commits into from
Aug 1, 2023

Conversation

seallard
Copy link
Contributor

@seallard seallard commented Jul 9, 2023

Description

This PR adds an integration test for the post processing of a flow cell demultiplexed with bclconvert using the flat output directory structure. Part of project https://github.com/Clinical-Genomics/project-planning/issues/482.

Fixed

  • Add integration test for post processing of flat flow cell demultiplexed with bclconvert

This version is a

  • PATCH - when you make backwards compatible bug fixes or documentation/instructions

@seallard seallard requested a review from a team July 9, 2023 11:57
@seallard seallard marked this pull request as draft July 10, 2023 07:35
Copy link
Contributor

@Vince-janv Vince-janv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! If you want to avoid duplicating code I think you could make use of the parametrize functionality in pytest, to run the same test with separate inputs.

tests/conftest.py Outdated Show resolved Hide resolved
tests/meta/demultiplex/test_demux_post_processing.py Outdated Show resolved Hide resolved
@seallard
Copy link
Contributor Author

Nice! If you want to avoid duplicating code I think you could make use of the parametrize functionality in pytest, to run the same test with separate inputs.

I tried to find a way to parametrise a test with fixtures, but it is not supported yet by pytest directly as far as I understand pytest-dev/pytest#349

@Vince-janv
Copy link
Contributor

Nice! If you want to avoid duplicating code I think you could make use of the parametrize functionality in pytest, to run the same test with separate inputs.

I tried to find a way to parametrise a test with fixtures, but it is not supported yet by pytest directly as far as I understand pytest-dev/pytest#349

Right, we've encountered this before. What has been done before is creating a third fixture, aggregating them and then using the keys to parametrize. Feel free to implement it if you like it. Otherwise don't 😊

@pytest.fixture(name="flowcell_directories", scope="session")
fixture_flowcell_directories(flow_cell_directory_name_demultiplexed_with_bcl_convert_flat,flow_cell_directory_name_demultiplexed_with_bcl_convert_not_flat) -> dict:
    return {"FLAT":flow_cell_directory_name_demultiplexed_with_bcl_convert_flat,"TREE":flow_cell_directory_name_demultiplexed_with_bcl_convert_not_flat}

@pytest.mark.parametrize(
    "order_type",
    ["FLAT", "TREE"],
)
def test_whatever(
    structure: str,
    flowcell_directories: dict
    some_function(flowcell_directories[structure])

@Vince-janv Vince-janv force-pushed the add-integration-test-for-flat-bclconvert-output branch from 18fa59c to 16a35b3 Compare July 20, 2023 09:01
@Vince-janv Vince-janv marked this pull request as ready for review July 20, 2023 09:21
Copy link
Contributor

@ChrOertlin ChrOertlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, make it much easier and cleans up the fixtures. Just the sample_internal_id variables. I think I caught them all with my suggested commits.

tests/meta/demultiplex/test_demux_post_processing.py Outdated Show resolved Hide resolved
tests/meta/demultiplex/test_demux_post_processing.py Outdated Show resolved Hide resolved
tests/meta/demultiplex/conftest.py Outdated Show resolved Hide resolved
tests/meta/demultiplex/test_demux_post_processing.py Outdated Show resolved Hide resolved
tests/meta/demultiplex/test_demux_post_processing.py Outdated Show resolved Hide resolved
tests/meta/demultiplex/test_demux_post_processing.py Outdated Show resolved Hide resolved
tests/meta/demultiplex/test_demux_post_processing.py Outdated Show resolved Hide resolved
@sonarcloud
Copy link

sonarcloud bot commented Aug 1, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@seallard seallard merged commit 578bab0 into master Aug 1, 2023
@seallard seallard deleted the add-integration-test-for-flat-bclconvert-output branch August 1, 2023 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants