You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hugegraph.apache.org by "ChenZiHong-Gavin (via GitHub)" <gi...@apache.org> on 2024/05/30 02:30:36 UTC

[PR] chore: introduce black for code format in github actions [incubator-hugegraph-ai]

ChenZiHong-Gavin opened a new pull request, #47:
URL: https://github.com/apache/incubator-hugegraph-ai/pull/47

   According to https://github.com/apache/incubator-hugegraph-ai/issues/46, I think black for code format can be supported by black integration with github actions([black.readthedocs.io/en/stable/integrations/github_actions.html](https://black.readthedocs.io/en/stable/integrations/github_actions.html)).
   
   the workflow fails if Black finds files that need to be formatted, as can be seen in https://github.com/ChenZiHong-Gavin/incubator-hugegraph-ai/pull/17
   ![image](https://github.com/apache/incubator-hugegraph-ai/assets/58508660/b42dde7d-b111-47a9-8d44-c9c0dd81a592)
   
   so i think everyone should run black in ./style/code_format_and_analysis.sh before commit. (Perhaps it would be better to automatically trigger [the process] through GitHub Hooks rather than running it manually.)
   
   after that, Black passes the workflow, as can be seen in https://github.com/ChenZiHong-Gavin/incubator-hugegraph-ai/pull/18
   ![image](https://github.com/apache/incubator-hugegraph-ai/assets/58508660/fd3a9749-40ea-402c-ba2d-7948d4386fc3)
   


-- 
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: issues-unsubscribe@hugegraph.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] chore: introduce black for code format in github actions [incubator-hugegraph-ai]

Posted by "ChenZiHong-Gavin (via GitHub)" <gi...@apache.org>.
ChenZiHong-Gavin commented on code in PR #47:
URL: https://github.com/apache/incubator-hugegraph-ai/pull/47#discussion_r1634051124


##########
.github/workflows/black.yml:
##########
@@ -0,0 +1,17 @@
+name: "Black Code Formatter"
+
+on:
+  push:
+    branches:

Review Comment:
   ok



##########
.github/workflows/black.yml:
##########


Review Comment:
   ok



-- 
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: issues-unsubscribe@hugegraph.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] chore: introduce black for code format in github actions [incubator-hugegraph-ai]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on code in PR #47:
URL: https://github.com/apache/incubator-hugegraph-ai/pull/47#discussion_r1629304017


##########
.github/workflows/black.yml:
##########


Review Comment:
   Note: next time we should enhance the filename `black.yml` (which is not easy to understand)



##########
.github/workflows/black.yml:
##########


Review Comment:
   Note: next time we should enhance the filename `black.yml` (which is not clear enough)



-- 
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: issues-unsubscribe@hugegraph.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] chore: introduce black for code format in github actions [incubator-hugegraph-ai]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on code in PR #47:
URL: https://github.com/apache/incubator-hugegraph-ai/pull/47#discussion_r1624273049


##########
.github/workflows/black.yml:
##########
@@ -0,0 +1,17 @@
+name: "Black Code Formatter"
+
+on:
+  push:
+    branches:
+      - 'release-*'
+  pull_request:
+
+jobs:
+  lint:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: psf/black@stable

Review Comment:
   Come to think of it, ASF/Apache seems to have some rules about external **action**, and those don't meet the requirements may be banned 🚫 (I found ↓)
   
   <img width="1135" alt="image" src="https://github.com/apache/incubator-hugegraph-ai/assets/17706099/74cb7163-0e57-406f-8d29-6376529a7b36">
   
   https://infra.apache.org/github-actions-policy.html
   
   (maybe we could search some apache's python project that use the same action/step?)
   
   ---
   
   Perhaps this is also the reason why we didn't see Black in our PR CI? (But it works fine in ur personal repo ↓)
   
   <img width="761" alt="image" src="https://github.com/apache/incubator-hugegraph-ai/assets/17706099/8cd01c9a-4203-4f5d-a4ee-28b45f67d812">
   



-- 
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: issues-unsubscribe@hugegraph.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] chore: introduce black for code format in github actions [incubator-hugegraph-ai]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on code in PR #47:
URL: https://github.com/apache/incubator-hugegraph-ai/pull/47#discussion_r1624273049


##########
.github/workflows/black.yml:
##########
@@ -0,0 +1,17 @@
+name: "Black Code Formatter"
+
+on:
+  push:
+    branches:
+      - 'release-*'
+  pull_request:
+
+jobs:
+  lint:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: psf/black@stable

Review Comment:
   Come to think of it, ASF/Apache seems to have some rules about external **action**, and those don't meet the requirements may be disabled (I found ↓)
   
   <img width="1135" alt="image" src="https://github.com/apache/incubator-hugegraph-ai/assets/17706099/74cb7163-0e57-406f-8d29-6376529a7b36">
   
   https://infra.apache.org/github-actions-policy.html



-- 
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: issues-unsubscribe@hugegraph.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] chore: introduce black for code format in github actions [incubator-hugegraph-ai]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on code in PR #47:
URL: https://github.com/apache/incubator-hugegraph-ai/pull/47#discussion_r1623746734


##########
.github/workflows/black.yml:
##########
@@ -0,0 +1,17 @@
+name: "Black"

Review Comment:
   The CI name could be easier to understand? 🤔 
   
   



-- 
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: issues-unsubscribe@hugegraph.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] chore: introduce black for code format in github actions [incubator-hugegraph-ai]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin merged PR #47:
URL: https://github.com/apache/incubator-hugegraph-ai/pull/47


-- 
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: issues-unsubscribe@hugegraph.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] chore: introduce black for code format in github actions [incubator-hugegraph-ai]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on code in PR #47:
URL: https://github.com/apache/incubator-hugegraph-ai/pull/47#discussion_r1629304017


##########
.github/workflows/black.yml:
##########


Review Comment:
   Note: next time we should enhance the filename `black.yml` is not easy to understand



##########
.github/workflows/black.yml:
##########
@@ -0,0 +1,17 @@
+name: "Black Code Formatter"
+
+on:
+  push:
+    branches:

Review Comment:
   and shall we add `main` branch 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: issues-unsubscribe@hugegraph.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] chore: introduce black for code format in github actions [incubator-hugegraph-ai]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on code in PR #47:
URL: https://github.com/apache/incubator-hugegraph-ai/pull/47#discussion_r1624273049


##########
.github/workflows/black.yml:
##########
@@ -0,0 +1,17 @@
+name: "Black Code Formatter"
+
+on:
+  push:
+    branches:
+      - 'release-*'
+  pull_request:
+
+jobs:
+  lint:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: psf/black@stable

Review Comment:
   Come to think of it, ASF/Apache seems to have some rules about external **action**, and those that don't meet the requirements be disabled (I found ↓)
   
   <img width="1135" alt="image" src="https://github.com/apache/incubator-hugegraph-ai/assets/17706099/74cb7163-0e57-406f-8d29-6376529a7b36">
   
   https://infra.apache.org/github-actions-policy.html



-- 
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: issues-unsubscribe@hugegraph.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] chore: introduce black for code format in github actions [incubator-hugegraph-ai]

Posted by "ChenZiHong-Gavin (via GitHub)" <gi...@apache.org>.
ChenZiHong-Gavin commented on PR #47:
URL: https://github.com/apache/incubator-hugegraph-ai/pull/47#issuecomment-2149283712

   > 😿 <img alt="image" width="1204" src="https://private-user-images.githubusercontent.com/17706099/336767192-3d8f3ca8-8631-4586-a7f8-0d69719a64cf.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTc1Nzg3NzAsIm5iZiI6MTcxNzU3ODQ3MCwicGF0aCI6Ii8xNzcwNjA5OS8zMzY3NjcxOTItM2Q4ZjNjYTgtODYzMS00NTg2LWE3ZjgtMGQ2OTcxOWE2NGNmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjA1VDA5MDc1MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk3MjBmYWVlYTUxZGUyODFjY2JjZTdjNDYxYjY5MDFhNDMxNDU3ODBmOWQyMThhNTYyMTQyODAzOGFlMjY5YTEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.894_v_qTHb2F_dO3klmvWunsG6Vvks2dZimzG98QoPc">
   
   Strange here, i think `psf/black@3702ba224ecffbcec30af640c149f231d90aebdb` already matched `*/*@[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9]+`


-- 
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: issues-unsubscribe@hugegraph.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] chore: introduce black for code format in github actions [incubator-hugegraph-ai]

Posted by "ChenZiHong-Gavin (via GitHub)" <gi...@apache.org>.
ChenZiHong-Gavin commented on code in PR #47:
URL: https://github.com/apache/incubator-hugegraph-ai/pull/47#discussion_r1626975412


##########
.github/workflows/black.yml:
##########
@@ -0,0 +1,17 @@
+name: "Black Code Formatter"
+
+on:
+  push:
+    branches:
+      - 'release-*'
+  pull_request:
+
+jobs:
+  lint:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: psf/black@stable

Review Comment:
   I think we have 2 approaches:
   1. follow the rules and use the specific git hash (SHA1) of the action, for example `psf/black@3702ba224ecffbcec30af640c149f231d90aebdb`
   2. use `pip install & bash` as https://github.com/apache/incubator-hugegraph-ai/blob/main/.github/workflows/pylint.yml did
   
   I prefer approach 1.
   
   Also, i found a  ASF repo which may not obey the restriction but still confused how they did it.
   In https://github.com/apache/shenyu/blob/master/.github/workflows/e2e-k8s.yml
   ![image](https://github.com/apache/incubator-hugegraph-ai/assets/58508660/9bdad9fc-32f2-4f57-9735-62bf1ab7e819)
   
   



-- 
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: issues-unsubscribe@hugegraph.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] chore: introduce black for code format in github actions [incubator-hugegraph-ai]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on code in PR #47:
URL: https://github.com/apache/incubator-hugegraph-ai/pull/47#discussion_r1624273049


##########
.github/workflows/black.yml:
##########
@@ -0,0 +1,17 @@
+name: "Black Code Formatter"
+
+on:
+  push:
+    branches:
+      - 'release-*'
+  pull_request:
+
+jobs:
+  lint:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: psf/black@stable

Review Comment:
   Come to think of it, ASF/Apache seems to have some rules about external **action**, and those don't meet the requirements may be banned 🚫 (I found ↓)
   
   <img width="1135" alt="image" src="https://github.com/apache/incubator-hugegraph-ai/assets/17706099/74cb7163-0e57-406f-8d29-6376529a7b36">
   
   https://infra.apache.org/github-actions-policy.html
   
   (maybe we could search some apache's python project that use the same action/step?)



-- 
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: issues-unsubscribe@hugegraph.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] chore: introduce black for code format in github actions [incubator-hugegraph-ai]

Posted by "ChenZiHong-Gavin (via GitHub)" <gi...@apache.org>.
ChenZiHong-Gavin commented on code in PR #47:
URL: https://github.com/apache/incubator-hugegraph-ai/pull/47#discussion_r1625217414


##########
.github/workflows/black.yml:
##########
@@ -0,0 +1,17 @@
+name: "Black Code Formatter"
+
+on:
+  push:
+    branches:
+      - 'release-*'
+  pull_request:
+
+jobs:
+  lint:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: psf/black@stable

Review Comment:
   Right, I'll check that later~



-- 
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: issues-unsubscribe@hugegraph.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] chore: introduce black for code format in github actions [incubator-hugegraph-ai]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on code in PR #47:
URL: https://github.com/apache/incubator-hugegraph-ai/pull/47#discussion_r1623876171


##########
.github/workflows/black.yml:
##########
@@ -0,0 +1,17 @@
+name: "Black"

Review Comment:
   > > The CI name could be easier to understand? 🤔
   > 
   > maybe "Black Code Formatter"?
   
   Fine & we could refer the existed(action) name: (u could choose one of them)
   - https://github.com/marketplace/actions/black-code-formatter
   - https://github.com/marketplace/actions/python-format-action
   - Python-Formatter
   - AutoCodeFormat / [auto-formatter](https://github.com/marketplace/actions/auto-formatter)
   - ...



-- 
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: issues-unsubscribe@hugegraph.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] chore: introduce black for code format in github actions [incubator-hugegraph-ai]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on code in PR #47:
URL: https://github.com/apache/incubator-hugegraph-ai/pull/47#discussion_r1624273049


##########
.github/workflows/black.yml:
##########
@@ -0,0 +1,17 @@
+name: "Black Code Formatter"
+
+on:
+  push:
+    branches:
+      - 'release-*'
+  pull_request:
+
+jobs:
+  lint:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: psf/black@stable

Review Comment:
   Come to think of it, ASF/Apache seems to have some rules about external **action**, and those don't meet the requirements may be banned 🚫 (I found ↓)
   
   <img width="1135" alt="image" src="https://github.com/apache/incubator-hugegraph-ai/assets/17706099/74cb7163-0e57-406f-8d29-6376529a7b36">
   
   https://infra.apache.org/github-actions-policy.html



-- 
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: issues-unsubscribe@hugegraph.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] chore: introduce black for code format in github actions [incubator-hugegraph-ai]

Posted by "ChenZiHong-Gavin (via GitHub)" <gi...@apache.org>.
ChenZiHong-Gavin commented on code in PR #47:
URL: https://github.com/apache/incubator-hugegraph-ai/pull/47#discussion_r1623788541


##########
.github/workflows/black.yml:
##########
@@ -0,0 +1,17 @@
+name: "Black"

Review Comment:
   > The CI name could be easier to understand? 🤔
   
   maybe "Black Code Formatter"?



-- 
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: issues-unsubscribe@hugegraph.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] chore: introduce black for code format in github actions [incubator-hugegraph-ai]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on code in PR #47:
URL: https://github.com/apache/incubator-hugegraph-ai/pull/47#discussion_r1624273049


##########
.github/workflows/black.yml:
##########
@@ -0,0 +1,17 @@
+name: "Black Code Formatter"
+
+on:
+  push:
+    branches:
+      - 'release-*'
+  pull_request:
+
+jobs:
+  lint:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: psf/black@stable

Review Comment:
   Come to think of it, ASF/Apache seems to have some rules about external **action**, and those don't meet the requirements may be banned 🚫 (I found ↓)
   
   <img width="1135" alt="image" src="https://github.com/apache/incubator-hugegraph-ai/assets/17706099/74cb7163-0e57-406f-8d29-6376529a7b36">
   
   https://infra.apache.org/github-actions-policy.html
   
   (maybe we could search some apache's python project that use the same action/step?)
   
   ---
   
   Perhaps this is also the reason why we didn't see Black in our PR CI? (But it works fine in a personal repo ↓)
   
   <img width="761" alt="image" src="https://github.com/apache/incubator-hugegraph-ai/assets/17706099/8cd01c9a-4203-4f5d-a4ee-28b45f67d812">
   



-- 
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: issues-unsubscribe@hugegraph.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] chore: introduce black for code format in github actions [incubator-hugegraph-ai]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on code in PR #47:
URL: https://github.com/apache/incubator-hugegraph-ai/pull/47#discussion_r1627266889


##########
.github/workflows/black.yml:
##########
@@ -0,0 +1,17 @@
+name: "Black Code Formatter"
+
+on:
+  push:
+    branches:
+      - 'release-*'
+  pull_request:
+
+jobs:
+  lint:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: psf/black@stable

Review Comment:
   > I think we have 2 approaches:
   > 
   > 1. follow the rules and use the specific git hash (SHA1) of the action, for example `psf/black@3702ba224ecffbcec30af640c149f231d90aebdb`
   > 2. use `pip install & bash` as [`main`/.github/workflows/pylint.yml](https://github.com/apache/incubator-hugegraph-ai/blob/main/.github/workflows/pylint.yml?rgh-link-date=2024-06-05T05%3A26%3A15Z) did
   > 
   > I prefer approach 1.
   > 
   > Also, i found a ASF repo which may not obey the restriction but still confused how they did it. In [apache/shenyu@`master`/.github/workflows/e2e-k8s.yml](https://github.com/apache/shenyu/blob/master/.github/workflows/e2e-k8s.yml?rgh-link-date=2024-06-05T05%3A26%3A15Z) ![image](https://private-user-images.githubusercontent.com/58508660/336698109-9bdad9fc-32f2-4f57-9735-62bf1ab7e819.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTc1NzY4MDYsIm5iZiI6MTcxNzU3NjUwNiwicGF0aCI6Ii81ODUwODY2MC8zMzY2OTgxMDktOWJkYWQ5ZmMtMzJmMi00ZjU3LTk3MzUtNjJiZjFhYjdlODE5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjA1VDA4MzUwNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTVjYjE4NmI5OGU1MGJhOTRkMWZhNTczNmI2MjUwYTU4NTMzOTMzYTg4NTFhNWQ1ZjM2ZmI1OWZkZDMxMDRjYjcmWC1BbXotU2lnbmVk
 SGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Q1nvhI9eVfoS_sgrxtLJ8Gz8Pyo8L_gcS0E_BNeUg6A)
   
   Thanks for ur feedback~
   
   U could try way1 first (This seems to be a new rule added this year, at least I didn't see it last year)
   
   



-- 
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: issues-unsubscribe@hugegraph.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] chore: introduce black for code format in github actions [incubator-hugegraph-ai]

Posted by "ChenZiHong-Gavin (via GitHub)" <gi...@apache.org>.
ChenZiHong-Gavin commented on code in PR #47:
URL: https://github.com/apache/incubator-hugegraph-ai/pull/47#discussion_r1625453099


##########
.github/workflows/black.yml:
##########
@@ -0,0 +1,17 @@
+name: "Black Code Formatter"
+
+on:
+  push:
+    branches:
+      - 'release-*'
+  pull_request:
+
+jobs:
+  lint:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: psf/black@stable

Review Comment:
   ![image](https://github.com/apache/incubator-hugegraph-ai/assets/58508660/66b52103-b7ee-47fd-8472-0c6d1f17147c)
   that is why Black action is not showing



-- 
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: issues-unsubscribe@hugegraph.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] chore: introduce black for code format in github actions [incubator-hugegraph-ai]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on PR #47:
URL: https://github.com/apache/incubator-hugegraph-ai/pull/47#issuecomment-2149268657

   😿 
   <img width="1204" alt="image" src="https://github.com/apache/incubator-hugegraph-ai/assets/17706099/3d8f3ca8-8631-4586-a7f8-0d69719a64cf"> 
   
   


-- 
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: issues-unsubscribe@hugegraph.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] chore: introduce black for code format in github actions [incubator-hugegraph-ai]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on code in PR #47:
URL: https://github.com/apache/incubator-hugegraph-ai/pull/47#discussion_r1625614639


##########
.github/workflows/black.yml:
##########
@@ -0,0 +1,17 @@
+name: "Black Code Formatter"
+
+on:
+  push:
+    branches:
+      - 'release-*'
+  pull_request:
+
+jobs:
+  lint:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: psf/black@stable

Review Comment:
   > ![image](https://private-user-images.githubusercontent.com/58508660/336337512-66b52103-b7ee-47fd-8472-0c6d1f17147c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTc0OTA4NzAsIm5iZiI6MTcxNzQ5MDU3MCwicGF0aCI6Ii81ODUwODY2MC8zMzYzMzc1MTItNjZiNTIxMDMtYjdlZS00N2ZkLTg0NzItMGM2ZDFmMTcxNDdjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MDQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjA0VDA4NDI1MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWM3MWJjODI5ZTcwNGY0YTE0NGJlODU5Njg2YmUzNTUzNWZjYmE5NjQwNzZmOTI5NWU3ZWUwNTdjZGZkMzlkMjMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.LngfZCygXuGSUosuGtKiyFvPe7fa_Q4igkVulX1ZVEM) that is why Black action is not showing
   
   @liuxiaocs7 @simon824 any suggestion?
   
   (I forgot in which ASF project I saw a way to indirectly reference an action, partially bypassing this restriction)



-- 
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: issues-unsubscribe@hugegraph.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] chore: introduce black for code format in github actions [incubator-hugegraph-ai]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on code in PR #47:
URL: https://github.com/apache/incubator-hugegraph-ai/pull/47#discussion_r1624273049


##########
.github/workflows/black.yml:
##########
@@ -0,0 +1,17 @@
+name: "Black Code Formatter"
+
+on:
+  push:
+    branches:
+      - 'release-*'
+  pull_request:
+
+jobs:
+  lint:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: psf/black@stable

Review Comment:
   Come to think of it, ASF/Apache seems to have some rules about external **action** references to use, and those that don't meet the requirements be disabled (I found ↓)
   
   <img width="1135" alt="image" src="https://github.com/apache/incubator-hugegraph-ai/assets/17706099/74cb7163-0e57-406f-8d29-6376529a7b36">
   
   https://infra.apache.org/github-actions-policy.html



-- 
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: issues-unsubscribe@hugegraph.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] chore: introduce black for code format in github actions [incubator-hugegraph-ai]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on code in PR #47:
URL: https://github.com/apache/incubator-hugegraph-ai/pull/47#discussion_r1625614639


##########
.github/workflows/black.yml:
##########
@@ -0,0 +1,17 @@
+name: "Black Code Formatter"
+
+on:
+  push:
+    branches:
+      - 'release-*'
+  pull_request:
+
+jobs:
+  lint:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: psf/black@stable

Review Comment:
   > ![image](https://private-user-images.githubusercontent.com/58508660/336337512-66b52103-b7ee-47fd-8472-0c6d1f17147c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTc0OTA4NzAsIm5iZiI6MTcxNzQ5MDU3MCwicGF0aCI6Ii81ODUwODY2MC8zMzYzMzc1MTItNjZiNTIxMDMtYjdlZS00N2ZkLTg0NzItMGM2ZDFmMTcxNDdjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MDQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjA0VDA4NDI1MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWM3MWJjODI5ZTcwNGY0YTE0NGJlODU5Njg2YmUzNTUzNWZjYmE5NjQwNzZmOTI5NWU3ZWUwNTdjZGZkMzlkMjMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.LngfZCygXuGSUosuGtKiyFvPe7fa_Q4igkVulX1ZVEM) that is why Black action is not showing
   
   @liuxiaocs7 @simon824 any suggestion?



-- 
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: issues-unsubscribe@hugegraph.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] chore: introduce black for code format in github actions [incubator-hugegraph-ai]

Posted by "ChenZiHong-Gavin (via GitHub)" <gi...@apache.org>.
ChenZiHong-Gavin commented on code in PR #47:
URL: https://github.com/apache/incubator-hugegraph-ai/pull/47#discussion_r1624018065


##########
.github/workflows/black.yml:
##########
@@ -0,0 +1,17 @@
+name: "Black"

Review Comment:
   ok, thanks



-- 
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: issues-unsubscribe@hugegraph.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org