nf_core.bump_version

Bumps the version number in all appropriate files for a nf-core pipeline.

nf_core.pipelines.bump_version.bump_nextflow_version(pipeline_obj:Pipeline, new_version: str) → None

Bumps the required Nextflow version number of a pipeline.

  • Parameters:
    • pipeline_obj (nf_core.utils.Pipeline) – A Pipeline object that holds information about the pipeline contents and build files.
    • new_version (str) – The new version tag for the required Nextflow version.

nf_core.pipelines.bump_version.bump_pipeline_version(pipeline_obj:Pipeline, new_version: str) → None

Bumps a pipeline version number.

  • Parameters:
    • pipeline_obj (nf_core.utils.Pipeline) – A Pipeline object that holds information about the pipeline contents and build files.
    • new_version (str) – The new version tag for the pipeline. Semantic versioning only.

nf_core.pipelines.bump_version.handle_error(message: str, required: bool)

nf_core.pipelines.bump_version.log_change(old_content: str, new_content: str)

nf_core.pipelines.bump_version.update_file_version(filename: str | Path, pipeline_obj:Pipeline, patterns: List[Tuple[str, str]], required: bool = True, yaml_key: List[str] | None = None) → None

Updates a file with a new version number.

  • Parameters:
    • filename (str) – The name of the file to update.
    • pipeline_obj (nf_core.utils.Pipeline) – A Pipeline object that holds information about the pipeline contents.
    • patterns (List *[*Tuple *[*str , str ] ]) – A list of tuples containing the regex patterns to match and the replacement strings.
    • required (bool , optional) – Whether the file is required to exist. Defaults to True.
    • yaml_key (Optional *[*List *[*str ] ] , optional) – The YAML key to update. Defaults to None.

nf_core.pipelines.bump_version.update_text_file(fn: Path, patterns: List[Tuple[str, str]], required: bool)

Updates a text file with a new version number.

  • Parameters:
    • fn (Path) – The name of the file to update.
    • patterns (List *[*Tuple *[*str , str ] ]) – A list of tuples containing the regex patterns to match and the replacement strings.
    • required (bool) – Whether the file is required to exist.

nf_core.pipelines.bump_version.update_yaml_file(fn: Path, patterns: List[Tuple[str, str]], yaml_key: List[str], required: bool)

Updates a YAML file with a new version number.

  • Parameters:
    • fn (Path) – The name of the file to update.
    • patterns (List *[*Tuple *[*str , str ] ]) – A list of tuples containing the regex patterns to match and the replacement strings.
    • yaml_key (List *[*str ]) – The YAML key to update.
    • required (bool) – Whether the file is required to exist.