Skip to content

Commit

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

revert to single dag.file file format for linting
  • Loading branch information
ewels authored Apr 14, 2022
2 parents 49e7fa6 + 9b3e7c6 commit 3586baf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
2 changes: 0 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

## 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)).
Expand Down
11 changes: 4 additions & 7 deletions nf_core/lint/nextflow_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,14 +229,11 @@ def nextflow_config(self):

# Check that the DAG filename ends in ``.svg``
if "dag.file" in self.nf_config:
_, 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}``")
default_dag_format = ".html"
if self.nf_config["dag.file"].strip("'\"").endswith(default_dag_format):
passed.append(f"Config ``dag.file`` ended with ``{default_dag_format}``")
else:
failed.append(
f"Config ``dag.file`` ended with ``.{dag_file_suffix}`` but needs to be one of {allowed_dag_file_suffixes!r}"
)
failed.append(f"Config ``dag.file`` did not end with ``{default_dag_format}``")

# Check that the minimum nextflowVersion is set properly
if "manifest.nextflowVersion" in self.nf_config:
Expand Down

0 comments on commit 3586baf

Please sign in to comment.