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

unit tests for scripting templates #148

Open
tiagofilipe12 opened this issue Oct 13, 2018 · 2 comments
Open

unit tests for scripting templates #148

tiagofilipe12 opened this issue Oct 13, 2018 · 2 comments
Assignees

Comments

@tiagofilipe12
Copy link
Collaborator

Now that we removed the dependency on the submodule and have the python templates within the repo, maybe we should start thinking in adding unit tests for some of the scripts that are used within a given nextflow template. This would be nice to assure that we don't break any part of the code that is required, after updating the module for some reason. For instance, I need that the object returned from the plasmid modules return a given json file so that it can be loaded into patlas.site. But others may have other reasons or just to maintain a healthier code that others can contribute in the future.

@tiagofilipe12
Copy link
Collaborator Author

Started playing around with these tests and it will require a little handling on the imports, since the relative path for the imports is different from the templates.

Previous import:

from flowcraft_utils.flowcraft_base import get_logger, MainWrapper

In order to work within the tests folder:

try:
    from flowcraft_utils.flowcraft_base import get_logger, MainWrapper
except ImportError:
    from flowcraft.templates.flowcraft_utils.flowcraft_base import get_logger, MainWrapper

@tiagofilipe12
Copy link
Collaborator Author

tiagofilipe12 commented Nov 5, 2018

List of templates that have tests:

  • assembly_report.py
  • downsample_fastq.py
  • fasta_spliter.py (this isn't being used as a template but rather executed within the nextflow process)
  • fastqc.py
  • fastqc_report.py
  • integrity_coverage.py
  • mapping2json.py
  • mashdist2json.py
  • mashscreen2json.py
  • megahit.py
  • metaspades.py
  • pATLAS_consensus_json.py
  • pipeline_report.py
  • process_abricate.py
  • process_assembly.py
  • process_assembly_mapping,py
  • process_mapping.py
  • process_newick.py
  • process_viral_assembly.py
  • skesa.py
  • spades.py
  • split_fasta.py
  • trimmomatic.py
  • trimmomatic_report.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants