datactive / bigbang

Scientific analysis of collaborative communities
http://datactive.github.io/bigbang/
MIT License
149 stars 52 forks source link

Setting up pre-commit routine to ensure coherent python formatting #401

Closed Christovis closed 3 years ago

Christovis commented 3 years ago

I would like to make a suggestion regarding the code format. Reading and reviewing code can be made easier if the merged code has same formatting as the master branch (as outlined in, e.g., here).

What do you think about it?

If you like the idea, I will create a PR.

sbenthall commented 3 years ago

I'm in favor of this!

npdoty commented 3 years ago

👍 Also, if we just documented what style guidelines we should follow (is it just PEP8?), what it applies to and what tool to run on our machines before committing, I could do that when I'm developing and before I commit. We should probably have that in the README in any case.

Christovis commented 3 years ago

I have created the PR. Have a look and see if you like it. On another branch I am working on something for Niels I also included isort, another handy automation of the order of package imports.

Yes having some style guidelines in the README is really helpful (the minimal guideline should be for code and doc-strings).

Christovis commented 3 years ago

This enhancement was implemented wit #403 and #408 .