Beatriz Sá Vinhas
05/19/2026, 10:50 AMmodules.json fails if only subworkflows (and no modules) are installed from a repository. So we put together a fix to add support for this situation and improve the linting error messages returned - PR: Fix linting for modules.json to add support for only installing subworkflows from a repository. Could anyone take a look at the PR and let us know what you think? 🙂Beatriz Sá Vinhas
05/19/2026, 11:20 AMlint_obj that is essentially created from a pipeline generated from the template itself.
https://github.com/nf-core/tools/blob/b6c5737fde996c824b87d19d1c51a29b4810db1d/tests/pipelines/lint/test_modules_json.py#L6
That means that there are no specific fixtures for modules.json files that we could alter to simulate the different conditions.
How would you go about creating tests with this setup? 🤔Beatriz Sá Vinhas
05/19/2026, 11:22 AMmodules.json file from <http://self.wf|self.wf>_path?mashehu
05/19/2026, 11:34 AMtest_mod_json_with_empty_modules_value test in test_modules_json.py that does already the modification for modules.json. but for your PR we should also remove all files in modules/nf-core to have the modules directory and modules.json correctly in sync.Beatriz Sá Vinhas
05/19/2026, 11:36 AMmashehu
05/19/2026, 11:39 AMBeatriz Sá Vinhas
05/19/2026, 1:15 PMmod_json_obj with only "workflows" entries for all repos. But how can this be fed into the lint_obj to then run self.lint_obj.modules_json() ?mashehu
05/19/2026, 3:02 PMtests/pipelines/lint/test_modules_json.py have a look at https://github.com/nf-core/tools/blob/dev/tests/pipelines/lint/test_nfcore_yml.py where we change elements in the yml and then reread it in linting. you should be able to do something similar with the modules.json file. Sorry again for pointing you in the wrong wayBeatriz Sá Vinhas
05/20/2026, 9:16 AMtest_modules_json_with_only_subworkflow_entries and am planning to add a test_modules_json_empty_file_fail . Let me know if you think more conditions should be checked!Beatriz Sá Vinhas
05/20/2026, 9:37 AM