p5py/p5

Setup pre-commit

tushar5526 opened this issue · 3 comments

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

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

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.

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