nf-core / tools

Python package with helper tools for the nf-core community.
https://nf-co.re
MIT License
242 stars 191 forks source link

Unwanted side effects during update #1537

Open fabianegli opened 2 years ago

fabianegli commented 2 years ago

The modules_json_up_to_date() function installs modules that are listed in modules.json but can not be found in the directory structure. I think running this command in the update routine for another package should be considered an unwanted side effect.

https://github.com/nf-core/tools/blob/e0d00d3e09a996f59eb5ce6ebc4795452a5b1d39/nf_core/modules/update.py#L44-L45

There is some inherent link between the nf-core modules update command and this function.

ewels commented 2 years ago

Where else would you recommend this running? I guess it could exit with an error instead of changing things, but we need to be able to run it somewhere.