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

Add pre-commit hooks and formatting on code #139

Closed
ljvmiranda921 opened this issue Jun 18, 2018 · 0 comments
Closed

Add pre-commit hooks and formatting on code #139

ljvmiranda921 opened this issue Jun 18, 2018 · 0 comments
Assignees
Labels
admin System-related and potential overrides

Comments

@ljvmiranda921
Copy link
Owner

ljvmiranda921 commented Jun 18, 2018

Is your feature request related to a problem? Please describe.
We can streamline code review if the formatting is done automatically, and stylistic problems (e.g., flake8) are done on the contributor's side. I don't want to sound very nitpicky during code reviews whenever I point out formatting mistakes. So let's automate that part.

Describe the solution you'd like

  • Add pre-commit hooks, describe how to do this on CONTRIBUTING.md
  • Add flake8 and black formatting styles on top-level directory
  • Add black badge on README
@ljvmiranda921 ljvmiranda921 added the admin System-related and potential overrides label Jun 18, 2018
@ljvmiranda921 ljvmiranda921 self-assigned this Jun 18, 2018
@ljvmiranda921 ljvmiranda921 modified the milestone: Version Release (v0.2.0) Jun 18, 2018
ljvmiranda921 pushed a commit that referenced this issue Jun 18, 2018
This commit formats the majority of pyswarms code using the
black formatter. This will be our new formatter from this point
forward.

Signed-off-by: Lester James V. Miranda <[email protected]>
ljvmiranda921 pushed a commit that referenced this issue Jun 18, 2018
This commit adds the .flake8 and pyproject.toml to specify flake8
and black configuration. In addition, we updated the code to reflect
the warnings found in flake8.

Signed-off-by: Lester James V. Miranda <[email protected]>
ljvmiranda921 pushed a commit that referenced this issue Jun 18, 2018
In this commit, we explicitly say that we are using black as our
code formatter.

Signed-off-by: Lester James V. Miranda <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
admin System-related and potential overrides
Projects
None yet
Development

No branches or pull requests

1 participant