nf-core / nf-core/tools

modules.json - inconsistent formatting across functions

Open Beginner friendly
#4,177 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description of the bug

Currently nf-core modules update runs prettier on modules.json, but for example modules patch does not.

For git history this leads to problems with actually viewing the diffs, as git sees it as the entire file being rewritten. Is there a reason for the inconsistent usage of prettier, or could it just be made the default?

Currently dump has a false default:

    def dump(self, run_prettier: bool = False) -> None:

And prettier is selectively run sporadically elsewhere in the code.

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

Start with the dump method shown in the issue and trace how nf-core modules update, modules patch, and dump-related code invoke formatting. Check the existing tests around these module commands, then make prettier handling consistent so generated modules.json diffs remain stable and verify the affected command behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, tooling
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
66/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.