Skip to content

feature(github): added github action to check formatting in Python files - #223

Merged
varundhall merged 10 commits into
mainfrom
add_python_format_check
Aug 6, 2025
Merged

feature(github): added github action to check formatting in Python files#223
varundhall merged 10 commits into
mainfrom
add_python_format_check

Conversation

@varundhall

@varundhall varundhall commented Aug 6, 2025

Copy link
Copy Markdown
Collaborator

Jira ticket

Link https://fivetran.atlassian.net/browse/RD-1000217

Description of Change

Added Github action to check formatting in Python files.

Testing

Committed an incorrect file 0961f88

Check fails with:
image

Diff uploaded as artifact

image

Script fixes the formatting issues properly: a7d6710

@varundhall
varundhall requested a review from a team as a code owner August 6, 2025 04:41
@github-actions

github-actions Bot commented Aug 6, 2025

Copy link
Copy Markdown

🧹 Python Code Quality Check

⚠️ Flake8 has detected issues, please fix the issues before merging:

📎 Download full report from workflow artifacts.

📌 Only Python files changed in this PR were checked.

🔍 See how this check works

This comment is auto-updated with every commit.

Comment thread .github/workflows/check-python-formatting.yml Outdated

@fivetran-rishabhghosh fivetran-rishabhghosh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed offline let's merge this with the existing workflow

Comment thread .github/workflows/code-quality-check.yml

This comment was marked as outdated.

Comment thread .github/workflows/code-quality-check.yml
@fivetran-satvikpatil
fivetran-satvikpatil self-requested a review August 6, 2025 09:35
@varundhall
varundhall force-pushed the add_python_format_check branch 4 times, most recently from 69fb7dc to 92544ed Compare August 6, 2025 09:42
@varundhall
varundhall force-pushed the add_python_format_check branch from 92544ed to 4bf599b Compare August 6, 2025 09:42
@varundhall
varundhall requested a review from Copilot August 6, 2025 09:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds a GitHub Action to check Python code formatting using Black, alongside the existing Flake8 linting. The workflow now validates formatting compliance and provides clear guidance for fixing issues.

  • Integrates Black formatting checks into the existing code quality workflow
  • Creates a script to automatically fix Python formatting issues
  • Updates workflow exclusions to skip README update requirements for script changes

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
scripts/fix-python-formatting.sh New script to install Black and format Python files with line length 99
.github/workflows/enforce-readme-update.yml Excludes 'scripts' directory from README update requirements
.github/workflows/code-quality-check.yml Integrates Black formatting checks with artifact uploads and enhanced error handling

Comment thread scripts/fix-python-formatting.sh
Comment thread .github/workflows/code-quality-check.yml
Comment thread .github/workflows/code-quality-check.yml
Comment thread .github/workflows/code-quality-check.yml
@varundhall
varundhall merged commit e942a8c into main Aug 6, 2025
1 check passed
@varundhall
varundhall deleted the add_python_format_check branch August 6, 2025 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants