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

Adopt lintrunner and enable github actions lint checks 1/2 #16

Merged
merged 6 commits into from
Jun 4, 2024

Conversation

justinchuby
Copy link
Contributor

@justinchuby justinchuby commented May 25, 2024

Type of Change

CI

Description

  • Adopt lintrunner as standard ONNX tooling and enable github actions lint checks.
  • Use black and isort to format the code base. The CI will enforce formatting from now on.
  • Removed .pre-commit-config.yaml. Checks can be supported with lintrunner.

This is the first of two PRs. The second PR will enable more ruff rules and apply autofixes.

Fixes #5

Expected Behavior & Potential Risk

Auto-formatted code.

How has this PR been tested?

CI

Dependency Change?

+dev dependencies: lintrunner, lintrunner-adapters

@justinchuby justinchuby requested a review from thuang6 May 25, 2024 00:28
@justinchuby justinchuby force-pushed the justinchu/lintrunner branch from 2a7753d to b212929 Compare May 25, 2024 00:30
Signed-off-by: Justin Chu <[email protected]>
@justinchuby justinchuby force-pushed the justinchu/lintrunner branch from b212929 to cb05f01 Compare May 25, 2024 00:30
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@@ -1,7 +1,6 @@
[tool.isort]
profile = "black"
line_length = 120
known_first_party = ["neural_compressor"]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is automatic.

rev: v1.5.0
hooks:
- id: yesqa
name: Unused noqa
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is handled by ruff

@chensuyue
Copy link
Collaborator

@justinchuby, Although I got the admin permission, I am not able to install this APP.
image

If the tool is not allowed to be installed, let's remove ".pre-commit-config.yaml" directly.

@justinchuby
Copy link
Contributor Author

SGTM. Just did

Signed-off-by: Justin Chu <[email protected]>
@chensuyue chensuyue merged commit 0f8c3a6 into main Jun 4, 2024
4 checks passed
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.

Consider leveraging lintrunner for the linting needs
2 participants