diff --git a/nf_core/create.py b/nf_core/create.py index a7ba8d14d8..08b9676c9c 100644 --- a/nf_core/create.py +++ b/nf_core/create.py @@ -57,7 +57,7 @@ def __init__( default_branch=None, ): self.template_params, skip_paths_keys, self.template_yaml = self.create_param_dict( - name, description, author, version, template_yaml_path, plain + name, description, author, version, template_yaml_path, plain, outdir if outdir else "." ) skippable_paths = { @@ -90,14 +90,20 @@ def __init__( outdir = os.path.join(os.getcwd(), self.template_params["name_noslash"]) self.outdir = Path(outdir) - def create_param_dict(self, name, description, author, version, template_yaml_path, plain): + def create_param_dict(self, name, description, author, version, template_yaml_path, plain, pipeline_dir): """Creates a dictionary of parameters for the new pipeline. Args: + name (str): Name for the pipeline. + description (str): Description for the pipeline. + author (str): Authors name of the pipeline. + version (str): Version flag. template_yaml_path (str): Path to YAML file containing template parameters. + plain (bool): If true the pipeline template will be initialized plain, without customisation. + pipeline_dir (str): Path to the pipeline directory. """ # Try reading config file - _, config_yml = nf_core.utils.load_tools_config() + _, config_yml = nf_core.utils.load_tools_config(pipeline_dir) # Obtain template customization info from template yaml file or `.nf-core.yml` config file try: diff --git a/nf_core/sync.py b/nf_core/sync.py index d56f7d64c7..d1e73c786c 100644 --- a/nf_core/sync.py +++ b/nf_core/sync.py @@ -82,7 +82,7 @@ def __init__( self.gh_repo = gh_repo self.pr_url = "" - self.config_yml_path, self.config_yml = nf_core.utils.load_tools_config() + self.config_yml_path, self.config_yml = nf_core.utils.load_tools_config(self.pipeline_dir) # Throw deprecation warning if template_yaml_path is set if template_yaml_path is not None: