Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Lint Workflow #123

Merged
merged 13 commits into from
Mar 24, 2023
Merged

Conversation

AdityaGudimella
Copy link
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 AdityaGudimella changed the title Add Lint Workflow using Ruff Add Lint Workflow Mar 20, 2023
@lemillermicrosoft lemillermicrosoft added the python Pull requests for the Python Semantic Kernel label Mar 20, 2023
@jjhenkel
Copy link

This would be awesome to have! Looks great!

(@alexchaomander and @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
dluc previously approved these changes Mar 21, 2023
@dluc
Copy link
Contributor

dluc commented Mar 21, 2023

@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 dluc added the PR: ready for review All feedback addressed, ready for reviews label Mar 21, 2023
@jjhenkel
Copy link

@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
Contributor Author

@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

@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
Contributor Author

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

.github/workflows/lint.yml Show resolved Hide resolved
.github/workflows/lint.yml Outdated Show resolved Hide resolved
.github/workflows/lint.yml Outdated Show resolved Hide resolved
.github/workflows/lint.yml Show resolved Hide resolved
@dluc dluc merged commit 79d24c1 into microsoft:python-preview Mar 24, 2023
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 <adgudime@microsoft.com>
Co-authored-by: Devis Lucato <dluc@users.noreply.github.com>
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 <adgudime@microsoft.com>
Co-authored-by: Devis Lucato <dluc@users.noreply.github.com>
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 <adgudime@microsoft.com>
Co-authored-by: Devis Lucato <dluc@users.noreply.github.com>
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 <adgudime@microsoft.com>
Co-authored-by: Devis Lucato <dluc@users.noreply.github.com>
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 <adgudime@microsoft.com>
Co-authored-by: Devis Lucato <dluc@users.noreply.github.com>
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.

4 participants