Skip to content
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

Updated URL for pipeline lint test docs #1451

Merged
merged 2 commits into from
Mar 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
* Prevent module linting KeyError edge case ([#1321](https://github.com/nf-core/tools/issues/1321))
* Bump-versions: Don't trim the trailing newline on files, causes editorconfig linting to fail ([#1265](https://github.com/nf-core/tools/issues/1265))
* Handle exception in `nf-core list` when a broken git repo is found ([#1273](https://github.com/nf-core/tools/issues/1273))
* Updated URL for pipeline lint test docs ([#1348](https://github.com/nf-core/tools/issues/1348))
* Updated `nf-core create` to tolerate failures and retry when fetching pipeline logos from the website ([#1369](https://github.com/nf-core/tools/issues/1369))

### Modules
Expand Down
12 changes: 9 additions & 3 deletions nf_core/lint/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@
import git
import json
import logging
import os
import re
import rich
import rich.progress
import yaml

import nf_core.utils
import nf_core.lint_utils
import nf_core.modules.lint
from nf_core import __version__
from nf_core.lint_utils import console

log = logging.getLogger(__name__)
Expand Down Expand Up @@ -331,7 +330,14 @@ def format_result(test_results, table):
string for the terminal with appropriate ASCII colours.
"""
for eid, msg in test_results:
table.add_row(Markdown("[{0}](https://nf-co.re/tools-docs/lint_tests/{0}.html): {1}".format(eid, msg)))
tools_version = __version__
if "dev" in __version__:
tools_version = "latest"
table.add_row(
Markdown(
f"[{eid}](https://nf-co.re/tools/docs/{tools_version}/pipeline_lint_tests/{eid}.html): {msg}"
)
)
return table

def _s(some_list):
Expand Down