Makefile Linter | Python & Javascript#353
Open
BluThaitanium wants to merge 11 commits intoclaimed-framework:mainfrom
Open
Makefile Linter | Python & Javascript#353BluThaitanium wants to merge 11 commits intoclaimed-framework:mainfrom
BluThaitanium wants to merge 11 commits intoclaimed-framework:mainfrom
Conversation
0c80b67 to
94e47f8
Compare
Contributor
|
Wow! Thank you Phu. This is a massive change. I might need some more time to properly review :-) A few quick observations:
|
ckadner
reviewed
Jul 7, 2022
Contributor
Author
|
Contributor
|
Hi @BluThaitanium -- maybe we can add another Make target to actually fix the Python code violations. We could collaborate on that (seeing that I accidentally already committed onto your branch 8-)
i.e.: .PHONY: format_python
format_python: venv ## Correct Python code style violations
@which autoflake > /dev/null || pip install autoflake
@which autopep8 > /dev/null || pip install autopep8
@autoflake api tools/python -i --recursive --remove-all-unused-imports \
--ignore-init-module-imports --remove-unused-variables
@autopep8 api/ tools/python/ -i --recursive -a -a -a --experimental \
--select=E9,E2,E3,E5,F63,F7,F82,F4,F841,W291,W292 \
--exclude .git,__pycache__,docs/source/conf.py,old,build,dist,venv \
--max-line-length=140
@echo "$@: OK"After that I am down to this manageable number of code style violations: With the auto-fix we could also include the generated API code in the linting, and I could add it to the generate_code script later on to not repeatedly have the violations reappear. |
7659afe to
297931d
Compare
Signed-off-by: BluThaitanium <phuthai450@gmail.com>
Signed-off-by: BluThaitanium <phuthai450@gmail.com>
Signed-off-by: BluThaitanium <phuthai450@gmail.com>
Signed-off-by: BluThaitanium <phuthai450@gmail.com>
Signed-off-by: BluThaitanium <phuthai450@gmail.com>
* Update MLX setup instructions for KF 1.5 Signed-off-by: Christian Kadner <ckadner@us.ibm.com> Signed-off-by: BluThaitanium <phuthai450@gmail.com>
Signed-off-by: Jiaxuan-Yang <jiaxuan.yang@ibm.com> Signed-off-by: BluThaitanium <phuthai450@gmail.com>
Signed-off-by: BluThaitanium <phuthai450@gmail.com>
Signed-off-by: BluThaitanium <phuthai450@gmail.com>
* Also add combine lint target Signed-off-by: Christian Kadner <ckadner@us.ibm.com> Signed-off-by: BluThaitanium <phuthai450@gmail.com>
Signed-off-by: BluThaitanium <phuthai450@gmail.com>
297931d to
6ab3372
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Enforce code-style by creating a linting target in the Makefile. Lints Python and Javascript.
Addressed Issue #322
Changes
makecalls for Python (.py) and Javascript (.js, .jsx, .ts, .tsx)** Called via
make lint_pythonandmake lint_javascript** Linting via
flake8andeslint/dashboard/origin-mlx/.eslintrc.yml.pyfiles to meet flake8-PEP8 standardspackage-lock.jsonandpackage.jsonfor ReactJS support for eslintNotes
.eslintrc.yml'soverridesparameters store rules that require large changes to the current codebase. These rules are therefore disabled.venvin the main/mlx/directory