Skip to content

Commit

Permalink
Merge pull request #1512 from fabianegli/fabianegli-remove-graphviz-d…
Browse files Browse the repository at this point in the history
…ependency

Remove the graphviz dependency from nf-core
  • Loading branch information
maxulysse authored Apr 12, 2022
2 parents 821b34d + e298fe9 commit 2a1d1be
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

## v2.4dev

This patch release to removes the Graphviz dependency from default pipeline template by setting the defaul DAG format to HTML. To keep the previous behaviour, the "dag.file" file extension needs to be changed to ".svg" in the nextflow.config.

### Template

- Set the default DAG graphic output to HTML to have a default that does not depend on Graphviz being installed on the host system ([#1512](https://github.com/nf-core/tools/pull/1512)).
- Fix bug in pipeline readme logo URL
- Fix Prettier formatting bug in completion email HTML template ([#1509](https://github.com/nf-core/tools/issues/1509))
- Removed retry strategy for AWS tests CI, as Nextflow now handles spot instance retries itself
Expand Down
10 changes: 7 additions & 3 deletions nf_core/lint/nextflow_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,14 @@ def nextflow_config(self):

# Check that the DAG filename ends in ``.svg``
if "dag.file" in self.nf_config:
if self.nf_config["dag.file"].strip("'\"").endswith(".svg"):
passed.append("Config ``dag.file`` ended with ``.svg``")
_, dag_file_suffix = os.path.splitext(self.nf_config["dag.file"].strip("'\""))
allowed_dag_file_suffixes = [".dot", ".html", ".pdf", ".png", ".svg", ".gexf"]
if dag_file_suffix in allowed_dag_file_suffixes:
passed.append(f"Config ``dag.file`` ended with ``.{dag_file_suffix}``")
else:
failed.append("Config ``dag.file`` did not end with ``.svg``")
failed.append(
f"Config ``dag.file`` ended with ``.{dag_file_suffix}`` but needs to be one of {allowed_dag_file_suffixes!r}"
)

# Check that the minimum nextflowVersion is set properly
if "manifest.nextflowVersion" in self.nf_config:
Expand Down
2 changes: 1 addition & 1 deletion nf_core/pipeline-template/nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ trace {
}
dag {
enabled = true
file = "${params.tracedir}/pipeline_dag_${trace_timestamp}.svg"
file = "${params.tracedir}/pipeline_dag_${trace_timestamp}.html"
}

manifest {
Expand Down

0 comments on commit 2a1d1be

Please sign in to comment.