p5py / p5

p5 is a Python package based on the core ideas of Processing.
https://p5.readthedocs.io
GNU General Public License v3.0
724 stars 120 forks source link

Setup pre-commit #452

Open tushar5526 opened 10 months ago

tushar5526 commented 10 months ago

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

adesh1998 commented 9 months ago

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

AdityyaX commented 9 months ago

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:

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.

tushar5526 commented 9 months ago

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