COSIMA / cosima-cookbook

Framework for indexing and querying ocean-sea ice model output.
https://cosima-recipes.readthedocs.io/en/latest/
Apache License 2.0
58 stars 25 forks source link

Format codebase (and check future contributions) with Black #222

Closed angus-g closed 4 years ago

angus-g commented 4 years ago

As suggested in #221, this PR reformats the entire working codebase (cosima_cookbook and test folders only) with one consistent style with Black. I've also added a format-checking step to Travis.

I'd recommend this be merged sooner, and then I'll rebase the existing PRs (which are both mine) on top of that, just so we can make sure we have the best git-blame-ability. It might also be worth noting for the future that we can get git to ignore the reformat commit: https://github.com/psf/black#migrating-your-code-style-without-ruining-git-blame

Closes #221.

aidanheerdegen commented 4 years ago

I you really don't mind rebasing then it is up to you.

Something to bear in mind with git blame

The one caveat is that GitHub and GitLab do not yet support ignoring revisions using their native UI of blame. So blame information will be cluttered with a reformatting commit on those platforms. (If you'd like this feature, there's an open issue for GitLab and please let GitHub know!)