p5 icon indicating copy to clipboard operation
p5 copied to clipboard

Setup pre-commit

Open tushar5526 opened this issue 1 year ago • 3 comments

Set up pre-commit to run black, flake8, pytest (if possible) before commits.

tushar5526 avatar Nov 17 '23 16:11 tushar5526

I would like to work on this issue but I do have one question. How to test the changes like how would i get to know that git commit is working fine

adesh1998 avatar Nov 24 '23 06:11 adesh1998

Subject: Request to Assign Issue: Set Up Pre-commit for Black, Flake8, and pytest

Hi @tushar5526 sir,

I hope this message finds you well. I wanted to discuss the implementation of a pre-commit setup within our repository to streamline our coding standards and ensure consistency across commits.

Overview of Implementation:

  • Black: For code formatting and maintaining a consistent style.
  • Flake8: To perform linting checks and ensure adherence to coding standards.
  • pytest: If applicable, to run tests before each commit, ensuring that new changes do not break existing functionality.

This integration aligns with our goal of maintaining a high-quality codebase and minimizing manual efforts in code formatting and checks.

Expected Behavior:

  1. Black: Automatically formats the code according to its defined style guide, ensuring consistent formatting across the codebase.
  2. Flake8: Checks the codebase for linting issues and ensures compliance with coding standards specified in the configuration.
  3. pytest (if applicable): Executes tests before each commit, verifying that new changes do not break existing functionality. Any failing tests should prevent the commit.

I'm eager to work on this issue and would greatly appreciate it if you could assign this issue to me.

AdityyaX avatar Dec 04 '23 19:12 AdityyaX

Assigned, it would be helpful if you can add in isort as well. We can skip pytest for now on each commits.

tushar5526 avatar Dec 04 '23 20:12 tushar5526