hooks.sync_nextflow_version

hooks.sync_nextflow_version

Synchronize manifest.version in nextflow.config with the repo VERSION file.

Whenever the VERSION file is updated, the manifest.version entry in nextflow.config will be updated to match it.

Usage with pre-commit

Add this to your .pre-commit-config.yaml file:

- repo: https://github.com/CCBR/Tools
  rev: v0.7.0
  hooks:
    - id: sync-nextflow-version

Functions

Name Description
sync_nextflow_version Synchronize manifest.version in repo-root nextflow.config with VERSION.
update_manifest_version Update manifest.version in a nextflow config string.

sync_nextflow_version

hooks.sync_nextflow_version.sync_nextflow_version()

Synchronize manifest.version in repo-root nextflow.config with VERSION.

update_manifest_version

hooks.sync_nextflow_version.update_manifest_version(config_text, version)

Update manifest.version in a nextflow config string.

Parameters

Name Type Description Default
config_text str Text from a nextflow.config file. required
version str Version string to write into manifest.version. required

Returns

Name Type Description
tuple[str, bool] A tuple containing the updated config text and whether the text changed.

Raises

Name Type Description
ValueError If the config does not contain manifest.version.