flowcraft icon indicating copy to clipboard operation
flowcraft copied to clipboard

Template tests

Open tiagofilipe12 opened this issue 6 years ago • 2 comments

This PR is a first implementation of the tests for python templates available in flowcraft (related with issue #148 ). The basic idea is to place each test under flowcraft.tests.template_tests in order to separate these tests from the core flowcraft tests.

For now I have just added some tests to the mash_screen, mash_dist and mapping_patlas components, for example to check if files are generated. More complex templates might require other kinds of tests. But the idea here is to make your python templates as tested as possible in order to allow others to contribute without breaking functionality of the components.

I have also changed the import in all templates so that they can be imported by pytest while running the tests.


This change is Reviewable

tiagofilipe12 avatar Nov 05 '18 13:11 tiagofilipe12

Codecov Report

Merging #163 into dev will increase coverage by 8.33%. The diff coverage is 78.74%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #163      +/-   ##
==========================================
+ Coverage   43.67%   52.01%   +8.33%     
==========================================
  Files          64       70       +6     
  Lines        5946     6287     +341     
==========================================
+ Hits         2597     3270     +673     
+ Misses       3349     3017     -332
Impacted Files Coverage Δ
flowcraft/tests/test_pipeline_parser.py 100% <ø> (ø) :arrow_up:
flowcraft/tests/test_sanity.py 96.15% <ø> (ø) :arrow_up:
flowcraft/templates/process_newick.py 0% <0%> (ø) :arrow_up:
flowcraft/templates/pipeline_status.py 0% <0%> (ø) :arrow_up:
flowcraft/templates/trimmomatic.py 0% <0%> (ø) :arrow_up:
flowcraft/templates/fastqc_report.py 0% <0%> (ø) :arrow_up:
flowcraft/templates/process_mapping.py 0% <0%> (ø) :arrow_up:
flowcraft/templates/downsample_fastq.py 0% <0%> (ø) :arrow_up:
flowcraft/templates/process_assembly_mapping.py 0% <0%> (ø) :arrow_up:
flowcraft/templates/process_viral_assembly.py 0% <0%> (ø) :arrow_up:
... and 36 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a3eb1af...f34f0ab. Read the comment docs.

codecov-io avatar Nov 05 '18 13:11 codecov-io

Does anyone still remember why is this pending? :laughing:

tiagofilipe12 avatar Jan 21 '19 22:01 tiagofilipe12