-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove the graphviz dependency from nf-core #1512
Remove the graphviz dependency from nf-core #1512
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a mention of the change to the changelog.
Hah, ok apparently
So the linting needs to be updated too.. (Yay for CI tests that check this stuff!) Code is here: tools/nf_core/lint/nextflow_config.py Lines 230 to 235 in f705faa
|
I think the linting test should accept all documented file extensions. Any objections? |
I am not entirely happy with the wording in my changes of the changelog, but am too tired to figure that out now. I also wonder if maybe the removal of the only dependency of the default pipeline template besides Java itself doesn't warrant a minor release instead of a patch release, i.e. 2.4.0 instead of 2.3.2. This however is up for discussion and https://semver.org/#what-should-i-do-if-i-update-my-own-dependencies-without-changing-the-public-api is not decisive on this issue. |
So many bugs in so little code. Time to call it a day. |
Codecov Report
@@ Coverage Diff @@
## dev #1512 +/- ##
==========================================
+ Coverage 64.91% 64.92% +0.01%
==========================================
Files 52 52
Lines 6060 6062 +2
==========================================
+ Hits 3934 3936 +2
Misses 2126 2126
Continue to review full report at Codecov.
|
I think we'll decide the the type of release when we'll do it, so no need to worry about that yourself (for now) |
CHANGELOG.md
Outdated
This patch release to removes the Graphviz dependency from default pipeline template. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This patch release to removes the Graphviz dependency from default pipeline template. |
I think info in the ## Template
are enough
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the current form it is quite redundant, but this change might need some visibility. Not just because it removes the dependency, but because it should probably mention in the more prominent sentence that the default DAG graph format has changed and that user configs need to change to keep getting the SVG output.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok for me then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a sentence clarifying the change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please double check if it makes sense. I am not yet familiar enough with nextflow to judge what I am writing about configs ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After that, if you think it's ready to merge, I am all for it.
Should this PR be hashtagged in the |
If you want to, yes, go for it, otherwise, we can merge |
* add link to PR
Congrats on the PR @fabianegli |
Thank you. That was very quick. I am very happy right now. 🥳 Thank you for the feedback, help and review @ewels and @maxulysse! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, only just got to this and it's already been merged. I think we should revert the change in behaviour about accepting additional file formats though sorry 😞
@@ -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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not a patch release for just this PR 😉 This is just one change in the release. The bullet point below was sufficient, I think you can remove this paragraph.
### 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)). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻
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"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Too late to the party, but I think we need to revert this sorry.
Whilst it's perfectly valid to accept all, we specifically want to enforce a single standard for nf-core pipelines. People can override in their own configs and even ignore this linting test if it's a problem.
If we allow all formats, then there's nothing to stop people from (probably accidentally) missing this change and continuing with .svg
and the problems that this PR is trying to solve. We explicitly want to force people to change to the format that we think is best for nf-core pipelines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am fine with reverting this PR, allowing html only and removing the first sentence in the changelog. I think it is/was mostly necessary because of the multiple allowed formats.
The feedback is already implemented on the previous branch. I am not familiar with the GitHub web interface for the revert. May I try? |
The current default DAG image format SVG requires Graphviz. Using the HTML version removes the Graphviz dependency.
It is now common to see the Warning about the missing Graphviz dependency when running nf-core pipelines. In my limited experience it is often the only warning and often not a very useful at that because the DAG is not a main product of the pipeline in most use cases.
To have the DAG image output as HTML should be fine, since most computers who can display a PNG will also have a browser that can render a HTML file.
Because the Graphviz dependency is on the host system rather than in a container, this means the hassle of installation is left with the user. A big part of Nextflow/nf-core is that it abstracts installations away from users. I consider the Graphviz dependency a clear anti-pattern for Nextflow and nf-core.
Because this makes life easier for users, no additional docs are needed.
This PR arouse out of me seeing
in a nextflow log on a LSF cluster and the discussion on Slack that followed.
An alternative solution might be to use a Graphviz DSL2 module to produce the PNG and remove the dependency on the host system in the most Nextflow way possible.
PR checklist
CHANGELOG.md
is updateddocs
is updated