Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paint soco black #706

Merged
merged 8 commits into from Mar 22, 2020
Merged

Conversation

KennethNielsen
Copy link
Member

Yeah. There is finally a PR to paint SoCo black.

black is "the uncomprimising code formatter" (https://github.com/psf/black) and its sole purpose is to format all code into a consistent style. black is uncompromising, in that it allows very little customization, but personally I find that I much prefer to have a codestyle tool that can't be modified, to debating which style is best. From my perspective, codestyle consistency is a hell of a lot more important that the itty bitty details of the style.

But perhaps the biggest advantage of black is that it almost removes code style discussions from reviews. I set it up so that there is a travisCI check that checks that the branch is black formatted. As those of that have gone through a review with me will know, I do care about style, but implementing it this way will remove the need to comment on codestyle to the point where I can just refer to the tool.

I painted both soco, the examples and the tests black. As an added advantage to this, black formatting the test code brought it within an hours of work to make it pass linting as well, which means that we now have linted test code as well 🤸‍♂️

Since this is code formatting, it touches just about all lines of code, which means that all other PRs will break, but I will help with that.

Let me know what you think.

@coveralls
Copy link

coveralls commented Mar 13, 2020

Coverage Status

Coverage increased (+0.05%) to 57.473% when pulling a39faf9 on KennethNielsen:paint_soco_black into e23a162 on SoCo:master.

@KennethNielsen
Copy link
Member Author

Ok. I need to wrestly with TravisCI a little more to get that to work (it is hard to test on my own computer). But the core of the PR is the same.

@KennethNielsen
Copy link
Member Author

Well, it only took 7 attempts ... but now the black checks on TravisCI are restricted to the Python versions that can run it. But now there is a functioning black check that will be executed when the pull request is made to check whether code was run through black.

Comments?

@pwt
Copy link
Contributor

pwt commented Mar 14, 2020

LGTM. Unit and integration tests are passing on my system (macOS, Python 3.7.7).

@KennethNielsen KennethNielsen added this to the 0.20 milestone Mar 22, 2020
@KennethNielsen KennethNielsen self-assigned this Mar 22, 2020
@KennethNielsen
Copy link
Member Author

I will start with merging this, thus probably breaking all other PR's in the progress. I will help with the rebasing as needed.

@KennethNielsen KennethNielsen merged commit daba00b into SoCo:master Mar 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants