nf-core / nf-core/tools

Template fix-linting: add black + isort

Open
#1,815 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

automation infrastructure template
Dominant language
Python
Stars
322
Forks
255
Avg merge
2d 3h
Merged PRs (30d)
5

Description

Since we now have consistent linting for black and isort within pipelines (compared to tools), it would be great if the @nf-core-bot fix linting command also fixed black and isort there.

The nf-core/tools workflow already does this:

https://github.com/nf-core/tools/blob/07e4f383eb9060cdaf85f65a4babfe0f0bd96e15/.github/workflows/fix-linting.yml#L35-L49

Just need to add it to the template.

Note it's not super trivial, as the template currently has a check to see if prettier did anything, before trying to fix it and commit it. I'm not sure if we need that or not. Looks like I wrote the code, but I don't remember why I had the check for one and not the other 🤔 My guess is that we can drop that check and make it look exactly like the tools workflow.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compare the template at nf_core/pipeline-template/.github/workflows/fix-linting.yml with the nf-core/tools workflow linked in the issue, especially lines 35-49. Check how the existing prettier-change check affects committing fixes. Done means the template's @nf-core-bot fix linting workflow also runs black and isort and commits their changes consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, python
Domain
ci-cd, tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.