Thanks to visit codestin.com
Credit goes to github.com

Skip to content
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 @@ -7,6 +7,7 @@
* Fixed template creation error regarding file permissions [[#932](https://github.com/nf-core/tools/issues/932)]
* Split the `create-lint-wf` tests up into separate steps in GitHub Actions to make the CI results easier to read
* Added automated PR comments to the Markdown, YAML and Python lint CI tests to explain failures (tools and pipeline template)
* Make `nf-core lint` summary table borders coloured according to overall pass / fail status

## [v1.13.1 - Copper Crocodile Patch :crocodile: :pirate_flag:](https://github.com/nf-core/tools/releases/tag/1.13.1) - [2021-03-19]

Expand Down
4 changes: 2 additions & 2 deletions nf_core/bump_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ def bump_nextflow_version(pipeline_obj, new_version):
pipeline_obj,
[
(
r"nxf_ver: \[[\'\"]?{}[\'\"]?, ''\]".format(current_version.replace(".", r"\.")),
"nxf_ver: ['{}', '']".format(new_version),
r"nxf_ver: \[[\'\"]?{}[\'\"]?, '21.03.0-edge'\]".format(current_version.replace(".", r"\.")),
"nxf_ver: ['{}', '21.03.0-edge']".format(new_version),
)
],
)
Expand Down
6 changes: 5 additions & 1 deletion nf_core/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,11 @@ def render_template(self):
except (AttributeError, UnicodeDecodeError) as e:
log.debug(f"Copying file without Jinja: '{output_path}' - {e}")
shutil.copy(template_fn_path, output_path)
continue

# Something else went wrong
except Exception as e:
log.error(f"Copying raw file as error rendering with Jinja: '{output_path}' - {e}")
shutil.copy(template_fn_path, output_path)

# Mirror file permissions
template_stat = os.stat(template_fn_path)
Expand Down
15 changes: 8 additions & 7 deletions nf_core/lint/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,14 +318,15 @@ def _s(some_list):
console.print(table)

# Summary table
table = Table(box=rich.box.ROUNDED)
table.add_column("[bold green]LINT RESULTS SUMMARY".format(len(self.passed)), no_wrap=True)
table.add_row(r"[✔] {:>3} Test{} Passed".format(len(self.passed), _s(self.passed)), style="green")
summary_colour = "red" if len(self.failed) > 0 else "green"
table = Table(box=rich.box.ROUNDED, style=summary_colour)
table.add_column(f"LINT RESULTS SUMMARY".format(len(self.passed)), no_wrap=True)
table.add_row(r"[green][✔] {:>3} Test{} Passed".format(len(self.passed), _s(self.passed)))
if len(self.fix):
table.add_row(r"[?] {:>3} Test{} Fixed".format(len(self.fixed), _s(self.fixed)), style="bright_blue")
table.add_row(r"[?] {:>3} Test{} Ignored".format(len(self.ignored), _s(self.ignored)), style="grey58")
table.add_row(r"[!] {:>3} Test Warning{}".format(len(self.warned), _s(self.warned)), style="yellow")
table.add_row(r"[✗] {:>3} Test{} Failed".format(len(self.failed), _s(self.failed)), style="red")
table.add_row(r"[bright blue][?] {:>3} Test{} Fixed".format(len(self.fixed), _s(self.fixed)))
table.add_row(r"[grey58][?] {:>3} Test{} Ignored".format(len(self.ignored), _s(self.ignored)))
table.add_row(r"[yellow][!] {:>3} Test Warning{}".format(len(self.warned), _s(self.warned)))
table.add_row(r"[red][✗] {:>3} Test{} Failed".format(len(self.failed), _s(self.failed)))
console.print(table)

if len(self.could_fix):
Expand Down