You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kibble.apache.org by GitBox <gi...@apache.org> on 2020/10/09 13:18:11 UTC

[GitHub] [kibble] michalslowikowski00 opened a new pull request #44: Add pre-commit

michalslowikowski00 opened a new pull request #44:
URL: https://github.com/apache/kibble/pull/44


   Hello.
   
   I would like to add pre-commit to the project.
   IMHO this is a great and helpful tool for checking code before committing.
   I have add few checks.
   
   What do you think about it? 
   
   PR contains:
   - pre-commit setup
   - pre-commit checks: black, isort, flake8, pydocstyle


----------------------------------------------------------------
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.

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



[GitHub] [kibble] turbaszek commented on a change in pull request #44: Add pre-commit

Posted by GitBox <gi...@apache.org>.
turbaszek commented on a change in pull request #44:
URL: https://github.com/apache/kibble/pull/44#discussion_r502523893



##########
File path: .pre-commit-config.yaml
##########
@@ -0,0 +1,50 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+repos:
+  - repo: https://github.com/pre-commit/pre-commit-hooks
+    rev: v2.3.0
+    hooks:
+      - id: check-yaml
+      - id: end-of-file-fixer
+      - id: trailing-whitespace
+  - repo: https://github.com/psf/black
+    rev: 19.3b0
+    hooks:
+      - id: black
+        name: Black
+        types: [python]
+  - repo: https://github.com/timothycrosley/isort
+    rev: 5.5.4
+    hooks:
+      - id: isort
+        name: Isort
+        types: [python]
+  - repo: https://gitlab.com/pycqa/flake8
+    rev: 3.8.4
+    hooks:
+      - id: flake8
+        name: Flake8
+        types: [python]
+  - repo: https://github.com/pycqa/pydocstyle
+    rev: 5.1.1
+    hooks:
+      - id: pydocstyle
+        name: Pydocstyle
+        types: [python]
+        args:
+          - --convention=pep257

Review comment:
       I would be in favor of introducing them in follow up PRs.




----------------------------------------------------------------
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.

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



[GitHub] [kibble] sharanf commented on pull request #44: Add pre-commit

Posted by GitBox <gi...@apache.org>.
sharanf commented on pull request #44:
URL: https://github.com/apache/kibble/pull/44#issuecomment-706545049


   @michalslowikowski00 @turbaszek thanks for helping move this initiative forward. I have highlighted that this work is now in progress and if anyone wants to contribute to this effort then they can join this conversation. 


----------------------------------------------------------------
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.

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



[GitHub] [kibble] michalslowikowski00 commented on a change in pull request #44: Add pre-commit

Posted by GitBox <gi...@apache.org>.
michalslowikowski00 commented on a change in pull request #44:
URL: https://github.com/apache/kibble/pull/44#discussion_r502779964



##########
File path: .pre-commit-config.yaml
##########
@@ -0,0 +1,50 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+repos:
+  - repo: https://github.com/pre-commit/pre-commit-hooks
+    rev: v2.3.0
+    hooks:
+      - id: check-yaml
+      - id: end-of-file-fixer
+      - id: trailing-whitespace
+  - repo: https://github.com/psf/black
+    rev: 19.3b0
+    hooks:
+      - id: black
+        name: Black
+        types: [python]
+  - repo: https://github.com/timothycrosley/isort
+    rev: 5.5.4
+    hooks:
+      - id: isort
+        name: Isort
+        types: [python]
+  - repo: https://gitlab.com/pycqa/flake8
+    rev: 3.8.4
+    hooks:
+      - id: flake8
+        name: Flake8
+        types: [python]
+  - repo: https://github.com/pycqa/pydocstyle
+    rev: 5.1.1
+    hooks:
+      - id: pydocstyle
+        name: Pydocstyle
+        types: [python]
+        args:
+          - --convention=pep257

Review comment:
       I agree. I will move these hooks to separate PR.




----------------------------------------------------------------
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.

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



[GitHub] [kibble] sharanf merged pull request #44: Add pre-commit

Posted by GitBox <gi...@apache.org>.
sharanf merged pull request #44:
URL: https://github.com/apache/kibble/pull/44


   


----------------------------------------------------------------
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.

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



[GitHub] [kibble] michalslowikowski00 commented on a change in pull request #44: Add pre-commit

Posted by GitBox <gi...@apache.org>.
michalslowikowski00 commented on a change in pull request #44:
URL: https://github.com/apache/kibble/pull/44#discussion_r502780386



##########
File path: .pre-commit-config.yaml
##########
@@ -0,0 +1,50 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+repos:

Review comment:
       Can we leave this hook in this PR?
   
   ```
   - repo: https://github.com/pre-commit/pre-commit-hooks
       rev: v2.3.0
       hooks:
         - id: check-yaml
         - id: end-of-file-fixer
         - id: trailing-whitespace
   ```




----------------------------------------------------------------
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.

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



[GitHub] [kibble] michalslowikowski00 commented on a change in pull request #44: Add pre-commit

Posted by GitBox <gi...@apache.org>.
michalslowikowski00 commented on a change in pull request #44:
URL: https://github.com/apache/kibble/pull/44#discussion_r502779899



##########
File path: .pre-commit-config.yaml
##########
@@ -0,0 +1,50 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+repos:

Review comment:
       Cool. I wasn't sure which python do we want to support.




----------------------------------------------------------------
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.

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



[GitHub] [kibble] turbaszek commented on a change in pull request #44: Add pre-commit

Posted by GitBox <gi...@apache.org>.
turbaszek commented on a change in pull request #44:
URL: https://github.com/apache/kibble/pull/44#discussion_r502783247



##########
File path: .pre-commit-config.yaml
##########
@@ -0,0 +1,50 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+repos:

Review comment:
       Sounds reasonable to me but as mentioned in https://github.com/apache/kibble/pull/44#pullrequestreview-505801054 it would be good to run `pre-commit run --all-files` to check all files 




----------------------------------------------------------------
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.

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



[GitHub] [kibble] turbaszek commented on a change in pull request #44: Add pre-commit

Posted by GitBox <gi...@apache.org>.
turbaszek commented on a change in pull request #44:
URL: https://github.com/apache/kibble/pull/44#discussion_r502523330



##########
File path: .pre-commit-config.yaml
##########
@@ -0,0 +1,50 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+repos:

Review comment:
       ```suggestion
   ---
   default_stages: [commit, push]
   default_language_version:
     # force all unspecified python hooks to run python3
     python: python3
   minimum_pre_commit_version: "1.20.0"
   repos:
   ```




----------------------------------------------------------------
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.

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



[GitHub] [kibble] sharanf commented on pull request #44: Add pre-commit

Posted by GitBox <gi...@apache.org>.
sharanf commented on pull request #44:
URL: https://github.com/apache/kibble/pull/44#issuecomment-706551127


   I will merge what has been done far.


----------------------------------------------------------------
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.

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