def test_download_configs(self, outdir): download_obj = DownloadWorkflow(pipeline="nf-core/methylseq", revision="1.6") download_obj.outdir = outdir download_obj.download_configs() assert os.path.exists( os.path.join(outdir, "configs", "nfcore_custom.config"))
def test_download_configs(self): outdir = tempfile.mkdtemp() download_obj = DownloadWorkflow(pipeline="nf-core/methylseq", release="1.6") download_obj.outdir = outdir download_obj.download_configs() assert os.path.exists( os.path.join(outdir, "configs", "nfcore_custom.config"))
def test_wf_use_local_configs(self): # Get a workflow and configs test_outdir = tempfile.mkdtemp() download_obj = DownloadWorkflow(pipeline="dummy", release="1.2.0", outdir=test_outdir) shutil.copytree(PATH_WORKING_EXAMPLE, os.path.join(test_outdir, 'workflow')) download_obj.download_configs() # Test the function download_obj.wf_use_local_configs() wf_config = nf_core.utils.fetch_wf_config( os.path.join(test_outdir, 'workflow')) assert wf_config['params.custom_config_base'] == "'../configs/'"
def test_wf_use_local_configs(self): # Get a workflow and configs test_pipeline_dir = os.path.join(tempfile.mkdtemp(), "nf-core-testpipeline") create_obj = nf_core.create.PipelineCreate("testpipeline", "This is a test pipeline", "Test McTestFace", outdir=test_pipeline_dir) create_obj.init_pipeline() test_outdir = tempfile.mkdtemp() download_obj = DownloadWorkflow(pipeline="dummy", release="1.2.0", outdir=test_outdir) shutil.copytree(test_pipeline_dir, os.path.join(test_outdir, "workflow")) download_obj.download_configs() # Test the function download_obj.wf_use_local_configs() wf_config = nf_core.utils.fetch_wf_config( os.path.join(test_outdir, "workflow")) assert wf_config["params.custom_config_base"] == "'../configs/'"
def test_wf_use_local_configs(self, tmp_path): # Get a workflow and configs test_pipeline_dir = os.path.join(tmp_path, "nf-core-testpipeline") create_obj = nf_core.create.PipelineCreate("testpipeline", "This is a test pipeline", "Test McTestFace", outdir=test_pipeline_dir) create_obj.init_pipeline() with tempfile.TemporaryDirectory() as test_outdir: download_obj = DownloadWorkflow(pipeline="dummy", revision="1.2.0", outdir=test_outdir) shutil.copytree(test_pipeline_dir, os.path.join(test_outdir, "workflow")) download_obj.download_configs() # Test the function download_obj.wf_use_local_configs() wf_config = nf_core.utils.fetch_wf_config(os.path.join( test_outdir, "workflow"), cache_config=False) assert wf_config[ "params.custom_config_base"] == f"'{test_outdir}/workflow/../configs/'"
def test_download_configs(self): download_obj = DownloadWorkflow(pipeline="dummy", release="1.2.0", outdir=tempfile.mkdtemp()) download_obj.download_configs()