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

[Discussion] Decide on coding styles and apply PyCQA + Pytest #11

Open
whatnick opened this issue Apr 3, 2021 · 4 comments
Open

[Discussion] Decide on coding styles and apply PyCQA + Pytest #11

whatnick opened this issue Apr 3, 2021 · 4 comments

Comments

@whatnick
Copy link

whatnick commented Apr 3, 2021

To improve consistency and readbility with external contributions let us add

  • A contributors file
  • Add some combination of linting and code-quality analysis via CI
  • Start working on a small test suite to check stability on PR's

I would work on all these as time allows.

@j0ono0 j0ono0 self-assigned this Apr 7, 2021
@j0ono0
Copy link
Owner

j0ono0 commented Apr 7, 2021

They all sound like things I should read up on!
I'm regularly rewriting large chunks of the core code - might be a good time to learn, and implement, testing processes and try out some linting.

@j0ono0
Copy link
Owner

j0ono0 commented Apr 7, 2021

@whatnick any recommendations on style/linting to conform to?
[EDIT]
I'm trying out flake8
...Now trying out Black.
Looks like Black did everything except long docs strings when cross-checked with flake8.
Black looks good at first glance, I'll try it out more on my local dev files. Looks like it is the 'cool kid on the block' too and got a mention by Guido van Rossum in a github discussion thread. <+2 appeal>

I'm open to suggestion on what will be appealing for other developers. What's typical implementation? Auto format on git push/pull requests? check and pass/reject on submission?

@j0ono0 j0ono0 removed their assignment Apr 8, 2021
@whatnick
Copy link
Author

whatnick commented Apr 8, 2021

Typical PyCQA settings are

  • A pre-commit hook on developer machines to reject failing code
  • A lint github action on push / on PR to maintain clean main branch from external contributions
  • Shed is a fully opinionated option, most projects I work on use isort, flake8, black and pylint. Pylint is perhaps the heaviest lift.

@j0ono0
Copy link
Owner

j0ono0 commented Apr 12, 2021

Checked out pylint - annoying. pedantic. -but- I can see the benefit and think It'll be worth enforcing style consistency with it. I've only read-up on isort but it also sounds like a good move - if only because I occasionally waste time pondering import sort order!

I'll see if I can get my current dev branch (0.0.9) into a passable format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants