uiowaSEP2024 / 002_ImagePro

Image processing backend
1 stars 0 forks source link

Initial PRE-COMMIT setup with black #3

Closed mbrzus closed 7 months ago

mbrzus commented 7 months ago

If this feature request related to a problem? Please describe.

This feature request is focused on the implementation of PRE_COMMIT with the Black code formatter, ensuring a consistent code formatting standard throughout our codebase. This initiative is aimed at enhancing code readability and simplifying the process of maintaining and reviewing our project's source code.

Alternatives Considered If Applicable

Rationale

Implementing PRE_COMMIT with the Black code formatter would be beneficial for the following reasons:

This feature aligns with our project's goals of maintaining high-quality code and improving development efficiency.

Implementation Ideas

To implement this feature, we can follow these steps:

  1. Install Black as a development dependency in our repository.
  2. Create a .pre-commit-config.yaml file in the root directory of the repository.
  3. Configure a pre-commit hook to run Black on all staged files.
  4. Add a pre-commit hook to the repository's Git hooks.
  5. Document the usage of PRE_COMMIT and Black in our project's README or documentation.

Sample .pre-commit-config.yaml:

-   repo: https://github.com/pre-commit/mirrors-black
    rev: v21.12b0
    hooks:
    -   id: black

Additional Context

More information can be found here: