gridhead / sanctuary-zero

A command-line bound implementation of secure synchronous lightweight chatroom with zero logging and total transience built using WebSockets, Fernet Cryptography, Asyncio and Prompt Toolkit
GNU General Public License v3.0
58 stars 34 forks source link

Add flake8/black support for code styling and linting #82

Open vinmay opened 4 years ago

vinmay commented 4 years ago

@t0xic0der Could we add lint support so that we can have a style guide in place for the project? As the contributors increasing, this will help maintain the decorum of the code.

gridhead commented 4 years ago

@vinmay you are right. That needs to be maintained. What service are we opting for to implement this?

Some alternatives I had in mind were CodeClimate, Travis CI and Circle CI for they provide for free pipelines on open-source repositories without any additional charges.

gridhead commented 4 years ago

@VaibhavSaini19 and @s-katte have exhaustive experience in this too. What do you folks think?

VaibhavSaini19 commented 4 years ago

Yes, it would be great to add a formatter / linter to maintain consistency across the project. I think Prettier and Pylinter would do the job. Prettier is available on GitHub Actions, haven't checked about a linter for python, though. Don't have much idea about the other CI tools either

vinmay commented 4 years ago

I was thinking of just a linter but yes, something with respect to a CI/CD pipeline would also be great. Circle CI or Travis CI would be my go to options. Other than those 2, I think Jenkins would be another option. I haven't worked with CodeClimate, so I am not sure about that. I am quiet sure there will be other projects that use these CI/CD pipelines for Linters as well, they should have good support.

gridhead commented 4 years ago

Yes @vinmay, a linter would be in order and that is what we'd be equipping for CI. For every push made to master or pull request created, the CI would automate a lint check and see if the merge is viable or not.

vinmay commented 4 years ago

@t0xic0der This also makes me think, should the structure of the repo change as well? I mean have a client/sever is separate folders, add a setup.py file as well? I know we are digressing from the topic but getting these things together along with having a CI pipeline also makes sense.

Let me know how this sounds -

  1. Add lint checking to comply with PEP8
  2. Add a Setup Script that can also help in building a distributable?
  3. Add tests
  4. Add CI
gridhead commented 4 years ago

@t0xic0der This also makes me think, should the structure of the repo change as well? I mean have a client/sever is separate folders, add a setup.py file as well? I know we are digressing from the topic but getting these things together along with having a CI pipeline also makes sense.

These are all valid points, though digressing from the context of this specific issue. Please go ahead and create a new issue for these concerns where we can discuss about them. We need to tackle the points that you have mentioned in a specific order to yield the best results from the integration pipelines.

vinmay commented 4 years ago

@t0xic0der Sure thing. I will create a few issues for these. Thank you !

amaank404 commented 3 years ago

I have a very simple idea, we can simply use inbuilt GitHub actions with tool black, isort. I can get this done anytime I get assigned. I already have this in my repo so it is just like copy paste