Since most of us use different editors and/or have different coding habits there is an inconsistency in the format of the code pushed to the repo.
One solution would be to run something like black before any push and add it to the CI/CD pipeline. I just tried it and though it works fine for python code, it's not working for Snakefiles. Do you have any idea of how to improve this?
Edited
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related.
Learn more.
I had tried the same with flake8, which does not format the code like blackdoes, but will still warm about various code issues, including violations of PEP8. Same problem: doesn't really work with Snakemake files, because of their own non-standard Python syntax.
Tried to find a linter for Snakemake files, didn't find anything. Best I can suggest for the moment is to use a linter during coding (e.g., flake8 is pretty good, not too demanding) and fix all issues except for those that are caused by the specific Snakemake syntax. I've done a pass recently on the main Snakefile and ended up with only the Snakemake-specific code raising flags. Of course that was before the new code got merged on since Friday... :-)
Anyway, let's discuss this during the next session. We could at least enforce linter passes on any Python code that is not in the Snakemake files. And recommend people to use linters in their editors (also available for markdown, YAML etc)