Skip to content

Add Lint Workflow - #123

Merged
Devis Lucato (dluc) merged 13 commits into
microsoft:python-previewfrom
AdityaGudimella:python-preview
Mar 24, 2023
Merged

Devis Lucato (dluc) merged 13 commits into
microsoft:python-previewfrom
AdityaGudimella:python-preview

Conversation

@AdityaGudimella

Copy link
Copy Markdown
Contributor

Motivation and Context

This PR adds a Lint Github workflow so that code style rules can be enforced for PRs.

  1. This forms a baseline workflow that can be used as a template for future workflows that will be added.
  2. It helps enforce code style rules. Currently it only checks PyCodeStyle and PyFlakes. Others will be added in the future.
  3. Contributes to automated testing
  4. Does not fix any open issue.

Description

Added Ruff as a dev dependency. Added Github workflow which runs Ruff.

Contribution Checklist

@AdityaGudimella Aditya Gudimella (AdityaGudimella) changed the title Add Lint Workflow using Ruff Add Lint Workflow Mar 20, 2023
@lemillermicrosoft Lee Miller (lemillermicrosoft) added the python Pull requests for the Python Semantic Kernel label Mar 20, 2023
@jjhenkel

Copy link
Copy Markdown

This would be awesome to have! Looks great!

(Alex Chao (@alexchaomander) and Devis Lucato (@dluc) how do we want to do reviews on the Python side of things? Are there designated folks from the main SK team that are going to sign off, or are those of us working on SK Python going to be the ones to approve? Could do both? Thoughts?)

@dluc

Copy link
Copy Markdown
Contributor

Jordan Henkel (@jjhenkel) I'm all for merging this, could you test and approve?

Are there designated folks from the main SK team that are going to sign off, or are those of us working on SK Python going to be the ones to approve? Could do both? Thoughts?

no one designated, but having your approvals would be a great plus at least as a sign that everything is in order. While we're in preview we can move fast. We love small PRs, please help with that :-) I'll help with design and sync across languages.

@dluc Devis Lucato (dluc) added the PR: ready for review All feedback addressed, ready for reviews label Mar 21, 2023
@jjhenkel

Copy link
Copy Markdown

Aditya Gudimella (@AdityaGudimella) I was able to run this locally via act to test things out, but only after a few small tweaks to the workflow. I'm not sure if they're necessary, or just required for local testing. If it wont hurt the workflow, it would be nice to have it be testable locally via a tool like act!

@AdityaGudimella

Copy link
Copy Markdown
Contributor Author

Jordan Henkel (@jjhenkel) There are a couple of ways to do what you want. Please tell me which one you prefer.

  1. Use a separate tool to run tests locally.
  2. Use a single tool (like nox) that can be used locally and will also be used in the github actions.
  3. Make a simple cli that runs the different tests and use it both locally and in the workflow.

I personally prefer Option 2 because it keeps things consistent between the workflows and local development. Also what is act? Could you provide a link to it please?

@jjhenkel

Copy link
Copy Markdown

Aditya Gudimella (@AdityaGudimella) when I refer to testing here I just mean testing the workflow yml you wrote (not tests for the code). I was using this tool: https://github.com/nektos/act to verify things locally (and, to get things to run, I needed to make those small changes)

@AdityaGudimella

Copy link
Copy Markdown
Contributor Author

This is super cool and super useful! Let me add support to this right away!

Comment thread .github/workflows/lint.yml Resolved
Comment thread .github/workflows/lint.yml Resolved
Comment thread .github/workflows/lint.yml Resolved
Comment thread .github/workflows/lint.yml Resolved
@dluc
Devis Lucato (dluc) merged commit 79d24c1 into microsoft:python-preview Mar 24, 2023
Devis Lucato (dluc) added a commit that referenced this pull request Apr 12, 2023
### Motivation and Context
This PR adds a Lint Github workflow so that code style rules can be
enforced for PRs.

1. This forms a baseline workflow that can be used as a template for
future workflows that will be added.
2. It helps enforce code style rules. Currently it only checks
PyCodeStyle and PyFlakes. Others will be added in the future.
3. Contributes to automated testing
4. Does not fix any open issue.

### Description
Added Ruff as a dev dependency. Added Github workflow which runs Ruff.

---------

Co-authored-by: Aditya Gudimella <[email protected]>
Co-authored-by: Devis Lucato <[email protected]>
Devis Lucato (dluc) added a commit that referenced this pull request Apr 13, 2023
### Motivation and Context
This PR adds a Lint Github workflow so that code style rules can be
enforced for PRs.

1. This forms a baseline workflow that can be used as a template for
future workflows that will be added.
2. It helps enforce code style rules. Currently it only checks
PyCodeStyle and PyFlakes. Others will be added in the future.
3. Contributes to automated testing
4. Does not fix any open issue.

### Description
Added Ruff as a dev dependency. Added Github workflow which runs Ruff.

---------

Co-authored-by: Aditya Gudimella <[email protected]>
Co-authored-by: Devis Lucato <[email protected]>
Devis Lucato (dluc) added a commit that referenced this pull request Apr 13, 2023
### Motivation and Context
This PR adds a Lint Github workflow so that code style rules can be
enforced for PRs.

1. This forms a baseline workflow that can be used as a template for
future workflows that will be added.
2. It helps enforce code style rules. Currently it only checks
PyCodeStyle and PyFlakes. Others will be added in the future.
3. Contributes to automated testing
4. Does not fix any open issue.

### Description
Added Ruff as a dev dependency. Added Github workflow which runs Ruff.

---------

Co-authored-by: Aditya Gudimella <[email protected]>
Co-authored-by: Devis Lucato <[email protected]>
Desmond Howard (dehoward) pushed a commit to lemillermicrosoft/semantic-kernel that referenced this pull request Jun 1, 2023
### Motivation and Context
This PR adds a Lint Github workflow so that code style rules can be
enforced for PRs.

1. This forms a baseline workflow that can be used as a template for
future workflows that will be added.
2. It helps enforce code style rules. Currently it only checks
PyCodeStyle and PyFlakes. Others will be added in the future.
3. Contributes to automated testing
4. Does not fix any open issue.

### Description
Added Ruff as a dev dependency. Added Github workflow which runs Ruff.

---------

Co-authored-by: Aditya Gudimella <[email protected]>
Co-authored-by: Devis Lucato <[email protected]>
John (johnoliver) pushed a commit to johnoliver/semantic-kernel that referenced this pull request Jun 5, 2024
### Motivation and Context
This PR adds a Lint Github workflow so that code style rules can be
enforced for PRs.

1. This forms a baseline workflow that can be used as a template for
future workflows that will be added.
2. It helps enforce code style rules. Currently it only checks
PyCodeStyle and PyFlakes. Others will be added in the future.
3. Contributes to automated testing
4. Does not fix any open issue.

### Description
Added Ruff as a dev dependency. Added Github workflow which runs Ruff.

---------

Co-authored-by: Aditya Gudimella <[email protected]>
Co-authored-by: Devis Lucato <[email protected]>

@pixelbits-mk Mike Kang (pixelbits-mk) left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ APPROVED - AI Code Review

📋 Summary

Simple change detected - This PR is a straightforward addition of linting configuration and CI workflow. The changes are infrastructure/tooling focused: adding Ruff linter as a dev dependency, configuring a GitHub Actions workflow for linting, and making a minor formatting fix. No architectural, security, performance, or complex development patterns are involved. The changes are well-structured and follow good DevOps practices. Inspirational review included to acknowledge the valuable contribution toward code quality automation.

🌟 Your thoughtful implementation of parallel lint jobs for both Ruff and Black shows excellent attention to CI/CD scalability, setting up a robust foundation that will help the entire team maintain high code quality standards.


🤖 Generated by AI Code Review Agent

@pixelbits-mk Mike Kang (pixelbits-mk) left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ APPROVED - AI Code Review

📋 Summary

Simple change detected - This PR is a straightforward addition of linting configuration and CI workflow. The changes are purely infrastructure/tooling focused, adding Ruff linter and Black formatter checks via GitHub Actions. There's one minor code style fix (removing blank line) but no functional changes. No specialized reviews needed as this doesn't impact architecture, security, performance or complex development patterns. However, always good to acknowledge the developer's initiative in improving code quality through automated checks!

🌟 Your thoughtful implementation of separate 'ruff' and 'black' jobs in the workflow shows excellent attention to separation of concerns, making the linting process both modular and maintainable for future contributors.


🤖 Generated by AI Code Review Agent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: ready for review All feedback addressed, ready for reviews python Pull requests for the Python Semantic Kernel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants