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

[GitHub] [submarine] KUAN-HSUN-LI opened a new pull request #736: SUBMARINE-1008. Submarine python code formatter and linter

KUAN-HSUN-LI opened a new pull request #736:
URL: https://github.com/apache/submarine/pull/736


   ### What is this PR for?
   Currently, submarine python code format doesn't work well.
   1. Replace `yapf` with `black`
   2. Upgrade `isort`
   3. Use `flake8` linter
   4. Format the code in dev-support, submarine-sdk and website
   5. Only check lint in dev-support, submarine-sdk since python code in website has its' style. (import not at top of file)
   6. Update the SDK development guide
   
   ### What type of PR is it?
   [Improvement]
   
   ### Todos
   
   
   ### What is the Jira issue?
   https://issues.apache.org/jira/browse/SUBMARINE-1008
   
   ### How should this be tested?
   I have updated the ci in GitHub Actions.
   
   ### Screenshots (if appropriate)
   Original `dev-support/style-check/python/lint.sh` result. I have fixed all of the errors in the below images
   ![螢幕擷取畫面 2021-09-06 094648](https://user-images.githubusercontent.com/38066413/132158081-bdcfe866-08b6-44fa-a5d2-23f9cec3aaa9.png)
   ![image](https://user-images.githubusercontent.com/38066413/132158044-ae18abed-469f-4cf9-a866-b0144a8f2698.png)
   
   
   ### Questions:
   * Do the license files need updating? No
   * Are there breaking changes for older versions? Yes
   * Does this need new documentation? Yes
   


-- 
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@submarine.apache.org

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



[GitHub] [submarine] KUAN-HSUN-LI commented on pull request #736: SUBMARINE-1008. Submarine python code formatter and linter

Posted by GitBox <gi...@apache.org>.
KUAN-HSUN-LI commented on pull request #736:
URL: https://github.com/apache/submarine/pull/736#issuecomment-913477851


   @pingsutw Thanks for your review. I have removed the useless file and update the doc in `0.6.0` version.


-- 
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@submarine.apache.org

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



[GitHub] [submarine] asfgit closed pull request #736: SUBMARINE-1008. Submarine python code formatter and linter

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #736:
URL: https://github.com/apache/submarine/pull/736


   


-- 
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@submarine.apache.org

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



[GitHub] [submarine] KUAN-HSUN-LI commented on a change in pull request #736: SUBMARINE-1008. Submarine python code formatter and linter

Posted by GitBox <gi...@apache.org>.
KUAN-HSUN-LI commented on a change in pull request #736:
URL: https://github.com/apache/submarine/pull/736#discussion_r702731731



##########
File path: .github/workflows/python.yml
##########
@@ -40,9 +40,9 @@ jobs:
           pip install --no-cache-dir torch==1.5.0
           pip install --no-cache-dir ./submarine-sdk/pysubmarine/.
           pip install -r ./submarine-sdk/pysubmarine/github-actions/test-requirements.txt
-          pip install -r ./submarine-sdk/pysubmarine/github-actions/lint-requirements.txt
+          pip install -r ./dev-support/style-check/python/lint-requirements.txt
       - name: Check python sdk code style
-        run: ./submarine-sdk/pysubmarine/github-actions/lint.sh
+        run: ./dev-support/style-check/python/lint.sh

Review comment:
       OK. I will remove it and also remove the `auto-format.sh` in `./submarine-sdk/pysubmarine/github-actions/`.




-- 
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@submarine.apache.org

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



[GitHub] [submarine] pingsutw commented on pull request #736: SUBMARINE-1008. Submarine python code formatter and linter

Posted by GitBox <gi...@apache.org>.
pingsutw commented on pull request #736:
URL: https://github.com/apache/submarine/pull/736#issuecomment-913506722


   Thanks~
   Will merge it if no more comment


-- 
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@submarine.apache.org

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



[GitHub] [submarine] pingsutw commented on a change in pull request #736: SUBMARINE-1008. Submarine python code formatter and linter

Posted by GitBox <gi...@apache.org>.
pingsutw commented on a change in pull request #736:
URL: https://github.com/apache/submarine/pull/736#discussion_r702710272



##########
File path: .github/workflows/python.yml
##########
@@ -40,9 +40,9 @@ jobs:
           pip install --no-cache-dir torch==1.5.0
           pip install --no-cache-dir ./submarine-sdk/pysubmarine/.
           pip install -r ./submarine-sdk/pysubmarine/github-actions/test-requirements.txt
-          pip install -r ./submarine-sdk/pysubmarine/github-actions/lint-requirements.txt
+          pip install -r ./dev-support/style-check/python/lint-requirements.txt
       - name: Check python sdk code style
-        run: ./submarine-sdk/pysubmarine/github-actions/lint.sh
+        run: ./dev-support/style-check/python/lint.sh

Review comment:
       Could we remove `lint-requirements.txt` and `lint.sh` in `./submarine-sdk/pysubmarine/github-actions/`




-- 
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@submarine.apache.org

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