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

GA to Lint + Format MegaBlocks #131

Merged
merged 46 commits into from
Aug 9, 2024
Merged

GA to Lint + Format MegaBlocks #131

merged 46 commits into from
Aug 9, 2024

Conversation

eitanturok
Copy link
Contributor

@eitanturok eitanturok commented Aug 1, 2024

This PR lints and formats MegaBlocks. Specifically, we:

  • Create a .pre-commit-config.yaml with all of the same hooks as composer except for pyright (will be done in a subsequent PR).
  • Formatted + Linted all code in MegaBlocks by running the pre-commit hooks. Changes include
    • adding a license
    • sorting imports
    • removing unusued imports
    • following style conventions in code
    • following style conventions in docstring
    • lint all python code
    • lint all yaml code
  • Added a Github Action to automatically perform code formatting + linting

Note: I made all the .sh files in the exp directory executable as per the check-executables-have-shebangs hook.

@eitanturok eitanturok requested review from vchiley and mihir-db August 1, 2024 15:16
@eitanturok eitanturok marked this pull request as ready for review August 1, 2024 15:17
@eitanturok eitanturok requested review from dakinggg and b-chu August 1, 2024 15:17
@eitanturok eitanturok requested a review from b-chu August 6, 2024 20:13
@eitanturok
Copy link
Contributor Author

eitanturok commented Aug 6, 2024

I addressed all of your comments @b-chu except for taking care of fixing the __init__.py files in MegaBlocks.

All the tests pass, so it seems like this isn't such a bad issue...

Copy link
Collaborator

@b-chu b-chu left a comment

Choose a reason for hiding this comment

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

Fix the init files. Names should definitely match

@eitanturok
Copy link
Contributor Author

I also added a contributing guide, style guide, and Pull_REQUEST template, all initially taken from composer.

@eitanturok eitanturok requested a review from b-chu August 8, 2024 12:46
Copy link
Contributor

@mvpatel2000 mvpatel2000 left a comment

Choose a reason for hiding this comment

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

can you change license to Databricks? Otherwise LGTM, would also like @b-chu to approve since large PR

.github/workflows/code-quality.yaml Outdated Show resolved Hide resolved
.github/workflows/pr-gpu.yaml Outdated Show resolved Hide resolved
Copy link
Collaborator

@b-chu b-chu left a comment

Choose a reason for hiding this comment

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

Fix all your file headers

@eitanturok
Copy link
Contributor Author

@mihir-db I changed the license.

@eitanturok eitanturok requested a review from b-chu August 8, 2024 20:10
Copy link
Collaborator

@b-chu b-chu left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

@eitanturok eitanturok merged commit 6adb1fb into databricks:main Aug 9, 2024
3 checks passed
@eitanturok eitanturok deleted the eitan-pre-commit branch August 9, 2024 15:59
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.

3 participants