tpaviot/ProcessScheduler

[Suggestion] Using Sourcery

dreinon opened this issue · 11 comments

I suggest looking into Sourcery, a tool that I recently discovered and that works super nice in helping you to write better and cleaner code.

It suggests you refactors to make the code cleaner and more readable, and also rates your methods in the following way:
image

They have plugins for github too.

ok thank you for the pointer, I didnt' know about this new tool. I will add a github hook, let's see the output

Here is the sourcerly PR for master branch refactoring

#86

interesting indeed

right, very interesting, what's your opinion about it?
IMO, it's worth applying the PR changes since they are automatic, and it is also worth starting using sourcery to make cleaner code, although I would not spend the huge amount of time that refactoring all the current methods would need to increase sourcery score.

right, we already are using many different tools related to software quality. The processscheduler code is not that bad so far. Running sourcery from time to time as I did, by requesting the refactoring of a branch, is enough IMO.

I agree. Although, it might be interesting starting to use it directly in the editor. I don't know which editor you use but sourcery is available for PyCharm and VSCode, and for Vim and Sublime in BETA.

SublimeText.

Testing the code in my editor, I see black has done an awesome job and that it works pretty nicely :)
Although, there are some small things that still appear in my editor like the following:
image

It's no big deal but it would be nice to have flake8 checking these things.
I found a github action ready to go here and a plugin for sublime in case you were interested too here.

Thanks!

Right, I understand!
Should I close this issue?

Yes, please