You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2021/07/09 11:59:59 UTC

[GitHub] [incubator-mxnet] mozga-intel opened a new pull request #20429: [WIP] Flake8' tool to perform additional formatting and semantic checking of code.

mozga-intel opened a new pull request #20429:
URL: https://github.com/apache/incubator-mxnet/pull/20429


   ## Description ##
   There is used flake8' tool to perform additional formatting and semantic checking of code. This pull request contains a pre-commit git hook, a requirement file, .flake8 file with a flake8 configuration. 
   
   1. Since Flake8 needs to be installed with an appropriate configuration, the file with the requirements has to be run: 
   ```
   pip install -r requirements-flake8.txt
   ```
   2. After that, we need to set up a symbolic link to a given file: To create a symbolic link to a given file, open your terminal and type:
   ```
   ln -s ../../tools/git-pre-commit .git/hooks/pre-commit
   ```
   3. If you have not set up the pre-commit hooks, you can run it locally in your local branch.
   
   ## Future consideration ##
   1. Flake8 tool should be run also on a CI. 
   2. *.py files need to be adjusted firstly. Flake8 check the entire file. 
   3. Add a pre-commit configuration: [pre-commit manager] 
      3.1: Create a file named `.pre-commit -config.yaml`.
      3.2: Set up the full set of options for a given file. 
   
   ## Checklist ##
   ### Essentials ###
   - [ ] PR's title starts with a category (e.g. [BUGFIX], [MODEL], [TUTORIAL], [FEATURE], [DOC], etc)
   - [ ] Changes are complete (i.e. I finished coding on this PR)
   - [ ] All changes have test coverage
   - [ ] Code is well-documented
   
   ### Changes ###
   - [ ] Feature1, tests, (and when applicable, API doc)
   - [ ] Feature2, tests, (and when applicable, API doc)
   
   ## Comments ##
   - If this change is a backward incompatible change, why must this change be made.
   - Interesting edge cases to note here
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mozga-intel removed a comment on pull request #20429: Flake8' tool to perform additional formatting and semantic checking of code.

Posted by GitBox <gi...@apache.org>.
mozga-intel removed a comment on pull request #20429:
URL: https://github.com/apache/incubator-mxnet/pull/20429#issuecomment-891612691


   @mxnet-bot run ci [sanity]


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20429: Flake8' tool to perform additional formatting and semantic checking of code.

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20429:
URL: https://github.com/apache/incubator-mxnet/pull/20429#issuecomment-891612766


   Jenkins CI successfully triggered : [sanity]


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20429: Flake8' tool to perform additional formatting and semantic checking of code.

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20429:
URL: https://github.com/apache/incubator-mxnet/pull/20429#issuecomment-891737278


   Jenkins CI successfully triggered : [miscellaneous, centos-gpu, windows-cpu, unix-cpu, sanity, edge, windows-gpu, website, centos-cpu, unix-gpu, clang]


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mozga-intel edited a comment on pull request #20429: Flake8' tool to perform additional formatting and semantic checking of code.

Posted by GitBox <gi...@apache.org>.
mozga-intel edited a comment on pull request #20429:
URL: https://github.com/apache/incubator-mxnet/pull/20429#issuecomment-893488176


   Following the pull-request description, running flake8 on the current master produces a bunch of errors (pasted below). At some point of time, some checking has not been enabled yet. Please have a look at the log below:
   ```
   [2021-08-04T10:47:16.901Z] ./tests/python/gpu/test_numpy_fallback.py:54:31: E231 missing whitespace after ','
   
   [2021-08-04T10:47:16.901Z] ./tests/python/gpu/test_numpy_fallback.py:54:34: E225 missing whitespace around operator
   
   [2021-08-04T10:47:16.901Z] ./tests/python/gpu/test_numpy_fallback.py:64:27: E231 missing whitespace after ','
   
   [2021-08-04T10:47:16.901Z] ./tests/python/gpu/test_numpy_fallback.py:64:31: E231 missing whitespace after ','
   
   [2021-08-04T10:47:16.901Z] ./tests/python/gpu/test_numpy_fallback.py:64:34: E225 missing whitespace around operator
   
   [2021-08-04T10:47:16.901Z] ./tests/python/gpu/test_numpy_fallback.py:70:12: F632 use ==/!= to compare constant literals (str, bytes, int, float, tuple)
   
   [2021-08-04T10:47:16.901Z] ./tests/python/gpu/test_numpy_fallback.py:73:40: C416 Unnecessary list comprehension - rewrite using list().
   
   [2021-08-04T10:47:16.901Z] ./tests/python/gpu/test_numpy_fallback.py:78:24: E231 missing whitespace after ','
   
   [2021-08-04T10:47:16.901Z] ./tests/python/gpu/test_numpy_fallback.py:78:26: E231 missing whitespace after ','
   
   [2021-08-04T10:47:16.901Z] ./tests/python/gpu/test_numpy_fallback.py:78:29: E231 missing whitespace after ','
   
   [2021-08-04T10:47:16.901Z] ./tests/python/gpu/test_numpy_fallback.py:78:32: E231 missing whitespace after ','
   
   ```
   
   To pass sanity-check, adjusting those ones to the flake8' report is needed. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mozga-intel commented on pull request #20429: Flake8' tool to perform additional formatting and semantic checking of code.

Posted by GitBox <gi...@apache.org>.
mozga-intel commented on pull request #20429:
URL: https://github.com/apache/incubator-mxnet/pull/20429#issuecomment-893488176


   Following the pull-request description, running flake8 on the current master produces a bunch of errors (pasted below). At some point of time, some checking has not been enabled yet. Please have a look at the log below:
   ```
   [2021-08-04T10:47:16.901Z] ./tests/python/gpu/test_numpy_fallback.py:54:31: E231 missing whitespace after ','
   
   [2021-08-04T10:47:16.901Z] ./tests/python/gpu/test_numpy_fallback.py:54:34: E225 missing whitespace around operator
   
   [2021-08-04T10:47:16.901Z] ./tests/python/gpu/test_numpy_fallback.py:64:27: E231 missing whitespace after ','
   
   [2021-08-04T10:47:16.901Z] ./tests/python/gpu/test_numpy_fallback.py:64:31: E231 missing whitespace after ','
   
   [2021-08-04T10:47:16.901Z] ./tests/python/gpu/test_numpy_fallback.py:64:34: E225 missing whitespace around operator
   
   [2021-08-04T10:47:16.901Z] ./tests/python/gpu/test_numpy_fallback.py:70:12: F632 use ==/!= to compare constant literals (str, bytes, int, float, tuple)
   
   [2021-08-04T10:47:16.901Z] ./tests/python/gpu/test_numpy_fallback.py:73:40: C416 Unnecessary list comprehension - rewrite using list().
   
   [2021-08-04T10:47:16.901Z] ./tests/python/gpu/test_numpy_fallback.py:78:24: E231 missing whitespace after ','
   
   [2021-08-04T10:47:16.901Z] ./tests/python/gpu/test_numpy_fallback.py:78:26: E231 missing whitespace after ','
   
   [2021-08-04T10:47:16.901Z] ./tests/python/gpu/test_numpy_fallback.py:78:29: E231 missing whitespace after ','
   
   [2021-08-04T10:47:16.901Z] ./tests/python/gpu/test_numpy_fallback.py:78:32: E231 missing whitespace after ','
   
   ```
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mozga-intel commented on pull request #20429: [Feature] Flake8' tool to perform additional formatting and semantic checking of code.

Posted by GitBox <gi...@apache.org>.
mozga-intel commented on pull request #20429:
URL: https://github.com/apache/incubator-mxnet/pull/20429#issuecomment-947972890


   Close this PR as it is flake8 is replaced by #20684


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20429: [WIP] Flake8' tool to perform additional formatting and semantic checking of code.

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20429:
URL: https://github.com/apache/incubator-mxnet/pull/20429#issuecomment-878840870


   Jenkins CI successfully triggered : [unix-gpu]


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mozga-intel commented on pull request #20429: [WIP] Flake8' tool to perform additional formatting and semantic checking of code.

Posted by GitBox <gi...@apache.org>.
mozga-intel commented on pull request #20429:
URL: https://github.com/apache/incubator-mxnet/pull/20429#issuecomment-878840795


   @mxnet-bot run ci [unix-gpu]


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mozga-intel commented on pull request #20429: Flake8' tool to perform additional formatting and semantic checking of code.

Posted by GitBox <gi...@apache.org>.
mozga-intel commented on pull request #20429:
URL: https://github.com/apache/incubator-mxnet/pull/20429#issuecomment-891737191


   @mxnet-bot run ci [all]


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mozga-intel closed pull request #20429: [Feature] Flake8' tool to perform additional formatting and semantic checking of code.

Posted by GitBox <gi...@apache.org>.
mozga-intel closed pull request #20429:
URL: https://github.com/apache/incubator-mxnet/pull/20429


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mozga-intel commented on pull request #20429: Flake8' tool to perform additional formatting and semantic checking of code.

Posted by GitBox <gi...@apache.org>.
mozga-intel commented on pull request #20429:
URL: https://github.com/apache/incubator-mxnet/pull/20429#issuecomment-891612691


   @mxnet-bot run ci [sanity]


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20429: [WIP] Flake8' tool to perform additional formatting and semantic checking of code.

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20429:
URL: https://github.com/apache/incubator-mxnet/pull/20429#issuecomment-877134355


   Hey @mozga-intel , Thanks for submitting the PR 
   All tests are already queued to run once. If tests fail, you can trigger one or more tests again with the following commands: 
   - To trigger all jobs: @mxnet-bot run ci [all] 
   - To trigger specific jobs: @mxnet-bot run ci [job1, job2] 
   *** 
   **CI supported jobs**: [windows-gpu, unix-cpu, unix-gpu, website, clang, windows-cpu, centos-gpu, edge, centos-cpu, sanity, miscellaneous]
   *** 
   _Note_: 
    Only following 3 categories can trigger CI :PR Author, MXNet Committer, Jenkins Admin. 
   All CI tests must pass before the PR can be merged. 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org