From c0a558924da71d925e7b17e0be644aeb0baaf88f Mon Sep 17 00:00:00 2001 From: nqhu Date: Tue, 2 Dec 2025 09:27:41 +0100 Subject: [PATCH 1/9] review fixes --- .github/workflows/check_licenses.yml | 39 ++++++++++++++++------------ 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/.github/workflows/check_licenses.yml b/.github/workflows/check_licenses.yml index 72b1f024fc..05cf9ddd13 100644 --- a/.github/workflows/check_licenses.yml +++ b/.github/workflows/check_licenses.yml @@ -2,7 +2,7 @@ name: Check and update licenses on: push: - branches: [ "main" ] + branches: [ "main", "licenses" ] pull_request: branches: [ "main", "licenses" ] # types: [opened, synchronized] @@ -132,41 +132,48 @@ jobs: module load Python-bundle-PyPI/2023.06-GCCcore-12.3.0 module load BeautifulSoup/4.12.2-GCCcore-12.3.0 module load PyYAML/6.0-GCCcore-12.3.0 - python licenses/parse_licenses.py --debug modules_results.json - cat licenses_test.yaml + python licenses/parse_licenses.py modules_results.json + cat licenses_aux.yaml else echo "modules_results.json file does not exist, skipping license fetch." fi - - name: Check for missing licenses + - name: Check and generate report on missing licenses run: | - grep -3 "not found" licenses_test.yaml - exit_code=$? - if [[ ${exit_code} -ne 0 ]]; then - echo "No missing licenses found." + echo "" + # Look for missing licences in licenses_aux.yaml + OUTPUT=$(yq eval '.. | select(has("License")) | select(.License == "not found" or .License == "Other") | (path | join(" --> ")) + ": " + .License' licenses_aux.yaml) + + # Check if the variable is NOT empty (-n) + if [[ -n "$OUTPUT" ]]; then + echo "Missing licenses found, please check the missing_report.yaml file." + echo "$OUTPUT" + echo "$OUTPUT" > missing_report.yaml else - echo "Missing licenses found, please check the licenses.json file." - #exit 1 + echo "No missing licenses found." fi + # Create a patch file + python licenses/reformat_yaml.py licenses/licenses.yaml #Reformat licenses.yaml to match the structure of licenses_aux.yaml + diff -Naur reformatted_licenses.yaml licenses_aux.yaml > patch.txt || true + echo -e "\npatch.txt file generated." + - name: Generate artifacts uses: actions/upload-artifact@v4 with: name: license-results-${{ matrix.NO_SLASH_NAME }} path: | - licenses_test.yaml - modules_results.json - missing_modules.txt + missing_report.yaml + patch.txt - name: How to edit artifacts run: | - echo "Artifacts generated. To resolve the missing licenses, please edit 'licenses_test.yaml' manually, making sure you follow the following format: " + echo "Artifacts generated. To resolve the missing licenses, please edit 'patch.txt' manually, making sure you follow the following format: " echo "" echo ":" echo " :" echo " License: " echo " Permission to redistribute: " - echo " Retrieved from: " - + echo " Retrieved from: " \ No newline at end of file From 4cff99c1d83a75664fc07b114eaf8d61d4b53196 Mon Sep 17 00:00:00 2001 From: nqhu Date: Tue, 2 Dec 2025 12:50:08 +0100 Subject: [PATCH 2/9] merge bug fix --- .github/workflows/check_licenses.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/check_licenses.yml b/.github/workflows/check_licenses.yml index fc359094aa..8ec38ff771 100644 --- a/.github/workflows/check_licenses.yml +++ b/.github/workflows/check_licenses.yml @@ -3,7 +3,6 @@ name: Check and update licenses on: push: branches: [ "main", "licenses" ] - branches: [ "main", "licenses" ] pull_request: branches: [ "main", "licenses" ] # types: [opened, synchronized] From 4b68e5724c18f89911a19cc44f5b3ec11fbb1ca7 Mon Sep 17 00:00:00 2001 From: nqhu Date: Thu, 4 Dec 2025 11:48:40 +0100 Subject: [PATCH 3/9] new AI help on licenses --- licenses/processing_licenses_with_ai.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 licenses/processing_licenses_with_ai.py diff --git a/licenses/processing_licenses_with_ai.py b/licenses/processing_licenses_with_ai.py new file mode 100644 index 0000000000..eb3a583905 --- /dev/null +++ b/licenses/processing_licenses_with_ai.py @@ -0,0 +1,20 @@ +import google.generativeai as genai +import warnings +import os + +warnings.filterwarnings("ignore", category=FutureWarning) +genai.configure(api_key=os.environ.get("GOOGLE_API_KEY")) + +file = genai.upload_file("temporal_print.yaml", mime_type="text/plain") +model = genai.GenerativeModel("gemini-2.5-pro") +response = model.generate_content([file, "I want you to search ALL the 'not found' OR 'other' licenses on the temporal_print.yml, make a deep search on google or wherever to found this licenses and if they can be redistributed or not PLEASE. If there is another type of licenses which is not 'not found' OR 'other', PLEASE IGNORE IT. I need this to be 1000000000000000000 percent accurate, if you are NOT sure or didn't found something, DO NOT INVENT IT. Please, only search in official pages!!! Not a blog or something, I want the official pages of the program asked. By the way, PLEASE, GIVE ONLY THE INFORMATION, I DONT NEED MORE THINGS LIKE YOU TEXTING AND WRITING THINGS, JUST THE FORMAT ASKED, NOT EVEN IN PARENTHESES, I WANT THE SIMPLIEST NAME POSSIBLE, FOR EXAMPLE, IF ITS PROPIETARY LICENSE, DONT TELL ME THE WHOLE NAME, JUST PROPIETARY, AND THE SAME WITH OTHER EXAMPLES TOO, NOT JUST THIS ONE. IF YOU CANT FIND THE LICENSE LINK, PLEASE DONT PUT THE LICENSE TYPE, I NEED SO BAD THE RETRIEVED FROM INFORMATION, IF YOU DONT HAVE THAT, THE LICENSE TYPE MUST BE NOT FOUND. ALSO, THE NAMES MUST BE IN A SPECIFIC FORMAT, FIRST LETTER CAPITALS, THEN IN LOWERCASE LIKE THIS EXAMPLE: Apache-2.0, Propietary... IF ITS SOME TYPE OF ACRONYM, ALL CAPS PLEASE. JUST WRITE IT IN COMMON SENSE BASICALY, PLEASE, DONT IGNORE ANY 'other' OR 'not found' LICENSE, DO NOT IGNORE. IN THE LINK YOU RETRIEVED IT FROM, I NEED TO SEE THE DIRECT LINK, I DON'T NEED THE MAIN PAGE, JUST THE PAGE WHERE IT SAYS THE LICENSE. FINALLY, PLEASE PLEASE AND PLEASE, I NEED YOU TO BE CONSISTENT, SO YOU NEED TO BE 10000 PERCENT SURE, DONT TRY TO ACT COOL BY INVENTING SOME LICENSES, 10000000000 PERCENT ACCURACY, I WILL EXECUTE THIS CODE THOUSANDS OF TIMES, SO I NEED CONSISTENCY. PLEASE, DO NOT SEND ME 404 ERROR PAGES (not found), VERY IMPORTANT, IF YOU ARE NOT 100 PERCENT SURE ABOUT THE PAGE EXISTING, PLEASE, JUST SEND ME THE MAIN PAGE, PLEASE DO NOT TRY TO GUESS THE ROUTE TO THE LICENSE. IF THE LICENSE IS PROPIETARY, I JUST WANT TO KNOW ITS PROPIETARY, NOT A CUSTOM OR SOMETHING LIKE THAT, JUST PROPIETARY PLEASE. IF ANY CASE, IT GIVES OUT 2 LICENSES (or more), PLEASE, JUST WRITE ONE, THE MOST ACCURATE ONE, DONT ADD AND or SOMETHING LIKE THAT PLEASE, RESPECT THE yaml FORMAT, NO ANDs or ORs PLEASE. LAST THING, PLEASE DOUBLE CHECK (even TRIPLE if you can) BEFORE SENDING ME THIS. IN THIS FORMAT:\n : \n : \n License: \n Permission to redistribute: \n Retrieved from: "]) +print(response.text) +text = response.text.replace("```yaml", "").replace("```", "").strip() +with open("licenses_aux_llm.yaml", "w", encoding="utf-8") as f: + f.write(text) + +# This is to know which models are available with the API which is being used. +# print("--- AVAILABLE MODELS ---") +# for m in genai.list_models(): +# if 'generateContent' in m.supported_generation_methods: +# print(m.name) \ No newline at end of file From d68af1868f8465b816e4116a7806f0a99ba24392 Mon Sep 17 00:00:00 2001 From: RJO798 Date: Thu, 4 Dec 2025 12:15:57 +0100 Subject: [PATCH 4/9] Add new workflow step: process missing licenses with AI --- .github/workflows/check_licenses.yml | 33 +++++++++++++++++++++------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/.github/workflows/check_licenses.yml b/.github/workflows/check_licenses.yml index f9973cb350..8cf5f1be66 100644 --- a/.github/workflows/check_licenses.yml +++ b/.github/workflows/check_licenses.yml @@ -155,14 +155,31 @@ jobs: diff -Naur licenses/licenses.yml licenses_aux.yaml > patch.txt || true echo "patch.txt file generated." - - - name: Generate artifacts - uses: actions/upload-artifact@v4 - with: - name: license-results-${{ matrix.NO_SLASH_NAME }} - path: | - missing_report.yaml - patch.txt + - name: Process missing licenses with AI + env: + GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} + run: | + if [ -s temporal_print.yaml ]; then + echo "Asking Gemini about missing licenses..." + # Install Google library + pip install google-generativeai + + # Execute AI script + python licenses/enrich_licenses_ai.py temporal_print.yaml + + # Create a patch file for licences found by AI + diff -Naur licenses/licenses.yml licenses_aux_llm.yaml > patch_llm.txt || true + fi + + - name: Generate artifacts + uses: actions/upload-artifact@v4 + with: + name: license-results-${{ matrix.NO_SLASH_NAME }} + path: | + missing_report.yaml + patch.txt + licenses_aux_llm.yaml + patch_llm.txt - name: How to edit artifacts and apply patch From 7facbbfb7f66b504fcd8a6cf8b5e05d8a07079c9 Mon Sep 17 00:00:00 2001 From: RJO798 Date: Thu, 4 Dec 2025 12:20:52 +0100 Subject: [PATCH 5/9] add easystack for testing --- .../2025.06/eessi-2025.06-eb-5.1.2-2023a.yml\342\200\216" | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 "easystacks/software.eessi.io/2025.06/eessi-2025.06-eb-5.1.2-2023a.yml\342\200\216" diff --git "a/easystacks/software.eessi.io/2025.06/eessi-2025.06-eb-5.1.2-2023a.yml\342\200\216" "b/easystacks/software.eessi.io/2025.06/eessi-2025.06-eb-5.1.2-2023a.yml\342\200\216" new file mode 100644 index 0000000000..11a038392e --- /dev/null +++ "b/easystacks/software.eessi.io/2025.06/eessi-2025.06-eb-5.1.2-2023a.yml\342\200\216" @@ -0,0 +1,2 @@ +easyconfigs: + - AlphaFold-2.3.2-foss-2023a-CUDA-12.1.1.eb \ No newline at end of file From c756a36c405e484574b9f63bd54e6c749e915aa3 Mon Sep 17 00:00:00 2001 From: RJO798 Date: Thu, 4 Dec 2025 12:28:27 +0100 Subject: [PATCH 6/9] tiny fixes --- .github/workflows/check_licenses.yml | 18 +++++++++--------- ...ssi-2025.06-eb-5.1.2-2023a.yml\342\200\216" | 3 ++- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/check_licenses.yml b/.github/workflows/check_licenses.yml index 8cf5f1be66..d6c5cc1487 100644 --- a/.github/workflows/check_licenses.yml +++ b/.github/workflows/check_licenses.yml @@ -171,15 +171,15 @@ jobs: diff -Naur licenses/licenses.yml licenses_aux_llm.yaml > patch_llm.txt || true fi - - name: Generate artifacts - uses: actions/upload-artifact@v4 - with: - name: license-results-${{ matrix.NO_SLASH_NAME }} - path: | - missing_report.yaml - patch.txt - licenses_aux_llm.yaml - patch_llm.txt + - name: Generate artifacts + uses: actions/upload-artifact@v4 + with: + name: license-results-${{ matrix.NO_SLASH_NAME }} + path: | + missing_report.yaml + patch.txt + licenses_aux_llm.yaml + patch_llm.txt - name: How to edit artifacts and apply patch diff --git "a/easystacks/software.eessi.io/2025.06/eessi-2025.06-eb-5.1.2-2023a.yml\342\200\216" "b/easystacks/software.eessi.io/2025.06/eessi-2025.06-eb-5.1.2-2023a.yml\342\200\216" index 11a038392e..1b74f8ca29 100644 --- "a/easystacks/software.eessi.io/2025.06/eessi-2025.06-eb-5.1.2-2023a.yml\342\200\216" +++ "b/easystacks/software.eessi.io/2025.06/eessi-2025.06-eb-5.1.2-2023a.yml\342\200\216" @@ -1,2 +1,3 @@ easyconfigs: - - AlphaFold-2.3.2-foss-2023a-CUDA-12.1.1.eb \ No newline at end of file + - AlphaFold-2.3.2-foss-2023a-CUDA-12.1.1.eb + \ No newline at end of file From f389c2abca61821fc808ed2c686fccfedb87e0ac Mon Sep 17 00:00:00 2001 From: RJO798 Date: Thu, 4 Dec 2025 12:52:19 +0100 Subject: [PATCH 7/9] add easystack for testing --- .../software.eessi.io/2025.06/eessi-2025.06-eb-5.1.1-2024a.yml | 1 - .../2025.06/eessi-2025.06-eb-5.1.2-2023a.yml\342\200\216" | 3 --- 2 files changed, 4 deletions(-) delete mode 100644 "easystacks/software.eessi.io/2025.06/eessi-2025.06-eb-5.1.2-2023a.yml\342\200\216" diff --git a/easystacks/software.eessi.io/2025.06/eessi-2025.06-eb-5.1.1-2024a.yml b/easystacks/software.eessi.io/2025.06/eessi-2025.06-eb-5.1.1-2024a.yml index 2d0555424b..f5f4832e94 100644 --- a/easystacks/software.eessi.io/2025.06/eessi-2025.06-eb-5.1.1-2024a.yml +++ b/easystacks/software.eessi.io/2025.06/eessi-2025.06-eb-5.1.1-2024a.yml @@ -7,4 +7,3 @@ easyconfigs: - ollama-0.6.0-GCCcore-13.3.0.eb - MetaBAT-2.17-GCC-13.3.0.eb - p7zip-17.05-GCCcore-13.3.0.eb - diff --git "a/easystacks/software.eessi.io/2025.06/eessi-2025.06-eb-5.1.2-2023a.yml\342\200\216" "b/easystacks/software.eessi.io/2025.06/eessi-2025.06-eb-5.1.2-2023a.yml\342\200\216" deleted file mode 100644 index 1b74f8ca29..0000000000 --- "a/easystacks/software.eessi.io/2025.06/eessi-2025.06-eb-5.1.2-2023a.yml\342\200\216" +++ /dev/null @@ -1,3 +0,0 @@ -easyconfigs: - - AlphaFold-2.3.2-foss-2023a-CUDA-12.1.1.eb - \ No newline at end of file From 945108137f2d00f18b4cff3d7bf54c9493d0d6b4 Mon Sep 17 00:00:00 2001 From: nqhu Date: Thu, 4 Dec 2025 13:13:14 +0100 Subject: [PATCH 8/9] update AI .py file --- .github/workflows/check_licenses.yml | 2 +- licenses/processing_licenses_with_ai.py | 40 ++++++++++++++++++++++++- 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check_licenses.yml b/.github/workflows/check_licenses.yml index d6c5cc1487..bf2797bb9d 100644 --- a/.github/workflows/check_licenses.yml +++ b/.github/workflows/check_licenses.yml @@ -165,7 +165,7 @@ jobs: pip install google-generativeai # Execute AI script - python licenses/enrich_licenses_ai.py temporal_print.yaml + python licenses/processing_licenses_with_ai.py temporal_print.yaml # Create a patch file for licences found by AI diff -Naur licenses/licenses.yml licenses_aux_llm.yaml > patch_llm.txt || true diff --git a/licenses/processing_licenses_with_ai.py b/licenses/processing_licenses_with_ai.py index eb3a583905..8a6219a2c0 100644 --- a/licenses/processing_licenses_with_ai.py +++ b/licenses/processing_licenses_with_ai.py @@ -7,7 +7,45 @@ file = genai.upload_file("temporal_print.yaml", mime_type="text/plain") model = genai.GenerativeModel("gemini-2.5-pro") -response = model.generate_content([file, "I want you to search ALL the 'not found' OR 'other' licenses on the temporal_print.yml, make a deep search on google or wherever to found this licenses and if they can be redistributed or not PLEASE. If there is another type of licenses which is not 'not found' OR 'other', PLEASE IGNORE IT. I need this to be 1000000000000000000 percent accurate, if you are NOT sure or didn't found something, DO NOT INVENT IT. Please, only search in official pages!!! Not a blog or something, I want the official pages of the program asked. By the way, PLEASE, GIVE ONLY THE INFORMATION, I DONT NEED MORE THINGS LIKE YOU TEXTING AND WRITING THINGS, JUST THE FORMAT ASKED, NOT EVEN IN PARENTHESES, I WANT THE SIMPLIEST NAME POSSIBLE, FOR EXAMPLE, IF ITS PROPIETARY LICENSE, DONT TELL ME THE WHOLE NAME, JUST PROPIETARY, AND THE SAME WITH OTHER EXAMPLES TOO, NOT JUST THIS ONE. IF YOU CANT FIND THE LICENSE LINK, PLEASE DONT PUT THE LICENSE TYPE, I NEED SO BAD THE RETRIEVED FROM INFORMATION, IF YOU DONT HAVE THAT, THE LICENSE TYPE MUST BE NOT FOUND. ALSO, THE NAMES MUST BE IN A SPECIFIC FORMAT, FIRST LETTER CAPITALS, THEN IN LOWERCASE LIKE THIS EXAMPLE: Apache-2.0, Propietary... IF ITS SOME TYPE OF ACRONYM, ALL CAPS PLEASE. JUST WRITE IT IN COMMON SENSE BASICALY, PLEASE, DONT IGNORE ANY 'other' OR 'not found' LICENSE, DO NOT IGNORE. IN THE LINK YOU RETRIEVED IT FROM, I NEED TO SEE THE DIRECT LINK, I DON'T NEED THE MAIN PAGE, JUST THE PAGE WHERE IT SAYS THE LICENSE. FINALLY, PLEASE PLEASE AND PLEASE, I NEED YOU TO BE CONSISTENT, SO YOU NEED TO BE 10000 PERCENT SURE, DONT TRY TO ACT COOL BY INVENTING SOME LICENSES, 10000000000 PERCENT ACCURACY, I WILL EXECUTE THIS CODE THOUSANDS OF TIMES, SO I NEED CONSISTENCY. PLEASE, DO NOT SEND ME 404 ERROR PAGES (not found), VERY IMPORTANT, IF YOU ARE NOT 100 PERCENT SURE ABOUT THE PAGE EXISTING, PLEASE, JUST SEND ME THE MAIN PAGE, PLEASE DO NOT TRY TO GUESS THE ROUTE TO THE LICENSE. IF THE LICENSE IS PROPIETARY, I JUST WANT TO KNOW ITS PROPIETARY, NOT A CUSTOM OR SOMETHING LIKE THAT, JUST PROPIETARY PLEASE. IF ANY CASE, IT GIVES OUT 2 LICENSES (or more), PLEASE, JUST WRITE ONE, THE MOST ACCURATE ONE, DONT ADD AND or SOMETHING LIKE THAT PLEASE, RESPECT THE yaml FORMAT, NO ANDs or ORs PLEASE. LAST THING, PLEASE DOUBLE CHECK (even TRIPLE if you can) BEFORE SENDING ME THIS. IN THIS FORMAT:\n : \n : \n License: \n Permission to redistribute: \n Retrieved from: "]) +# response = model.generate_content([file, "I want you to search ALL the 'not found' OR 'other' licenses on the temporal_print.yml, make a deep search on google or wherever to found this licenses and if they can be redistributed or not PLEASE. If there is another type of licenses which is not 'not found' OR 'other', PLEASE IGNORE IT. I need this to be 1000000000000000000 percent accurate, if you are NOT sure or didn't found something, DO NOT INVENT IT. Please, only search in official pages!!! Not a blog or something, I want the official pages of the program asked. By the way, PLEASE, GIVE ONLY THE INFORMATION, I DONT NEED MORE THINGS LIKE YOU TEXTING AND WRITING THINGS, JUST THE FORMAT ASKED, NOT EVEN IN PARENTHESES, I WANT THE SIMPLIEST NAME POSSIBLE, FOR EXAMPLE, IF ITS PROPIETARY LICENSE, DONT TELL ME THE WHOLE NAME, JUST PROPIETARY, AND THE SAME WITH OTHER EXAMPLES TOO, NOT JUST THIS ONE. IF YOU CANT FIND THE LICENSE LINK, PLEASE DONT PUT THE LICENSE TYPE, I NEED SO BAD THE RETRIEVED FROM INFORMATION, IF YOU DONT HAVE THAT, THE LICENSE TYPE MUST BE NOT FOUND. ALSO, THE NAMES MUST BE IN A SPECIFIC FORMAT, FIRST LETTER CAPITALS, THEN IN LOWERCASE LIKE THIS EXAMPLE: Apache-2.0, Propietary... IF ITS SOME TYPE OF ACRONYM, ALL CAPS PLEASE. JUST WRITE IT IN COMMON SENSE BASICALY, PLEASE, DONT IGNORE ANY 'other' OR 'not found' LICENSE, DO NOT IGNORE. IN THE LINK YOU RETRIEVED IT FROM, I NEED TO SEE THE DIRECT LINK, I DON'T NEED THE MAIN PAGE, JUST THE PAGE WHERE IT SAYS THE LICENSE. FINALLY, PLEASE PLEASE AND PLEASE, I NEED YOU TO BE CONSISTENT, SO YOU NEED TO BE 10000 PERCENT SURE, DONT TRY TO ACT COOL BY INVENTING SOME LICENSES, 10000000000 PERCENT ACCURACY, I WILL EXECUTE THIS CODE THOUSANDS OF TIMES, SO I NEED CONSISTENCY. PLEASE, DO NOT SEND ME 404 ERROR PAGES (not found), VERY IMPORTANT, IF YOU ARE NOT 100 PERCENT SURE ABOUT THE PAGE EXISTING, PLEASE, JUST SEND ME THE MAIN PAGE, PLEASE DO NOT TRY TO GUESS THE ROUTE TO THE LICENSE. IF THE LICENSE IS PROPIETARY, I JUST WANT TO KNOW ITS PROPIETARY, NOT A CUSTOM OR SOMETHING LIKE THAT, JUST PROPIETARY PLEASE. IF ANY CASE, IT GIVES OUT 2 LICENSES (or more), PLEASE, JUST WRITE ONE, THE MOST ACCURATE ONE, DONT ADD AND or SOMETHING LIKE THAT PLEASE, RESPECT THE yaml FORMAT, NO ANDs or ORs PLEASE. LAST THING, PLEASE DOUBLE CHECK (even TRIPLE if you can) BEFORE SENDING ME THIS. IN THIS FORMAT:\n : \n : \n License: \n Permission to redistribute: \n Retrieved from: "]) + +prompt = """ +I want you to search ALL the 'not found' OR 'other' licenses on the temporal_print.yml, +make a deep search on google or wherever to found this licenses and if they can be redistributed or not PLEASE. +If there is another type of licenses which is not 'not found' OR 'other', PLEASE IGNORE IT. + +I need this to be 1000000000000000000 percent accurate, if you are NOT sure or didn't found something, DO NOT INVENT IT. +Please, only search in official pages!!! Not a blog or something, I want the official pages of the program asked. + +By the way, PLEASE, GIVE ONLY THE INFORMATION, I DONT NEED MORE THINGS LIKE YOU TEXTING AND WRITING THINGS, JUST THE FORMAT ASKED, +NOT EVEN IN PARENTHESES, I WANT THE SIMPLIEST NAME POSSIBLE. +FOR EXAMPLE, IF ITS PROPIETARY LICENSE, DONT TELL ME THE WHOLE NAME, JUST PROPIETARY, AND THE SAME WITH OTHER EXAMPLES TOO. + +IF YOU CANT FIND THE LICENSE LINK, PLEASE DONT PUT THE LICENSE TYPE, I NEED SO BAD THE RETRIEVED FROM INFORMATION, +IF YOU DONT HAVE THAT, THE LICENSE TYPE MUST BE NOT FOUND. +ALSO, THE NAMES MUST BE IN A SPECIFIC FORMAT, FIRST LETTER CAPITALS, THEN IN LOWERCASE LIKE THIS EXAMPLE: Apache-2.0, Propietary... +IF ITS SOME TYPE OF ACRONYM, ALL CAPS PLEASE. JUST WRITE IT IN COMMON SENSE BASICALY. + +PLEASE, DONT IGNORE ANY 'other' OR 'not found' LICENSE, DO NOT IGNORE. +IN THE LINK YOU RETRIEVED IT FROM, I NEED TO SEE THE DIRECT LINK, I DON'T NEED THE MAIN PAGE, JUST THE PAGE WHERE IT SAYS THE LICENSE. + +FINALLY, PLEASE, I NEED YOU TO BE CONSISTENT, SO YOU NEED TO BE 10000 PERCENT SURE, DONT TRY TO ACT COOL BY INVENTING SOME LICENSES. +PLEASE, DO NOT SEND ME 404 ERROR PAGES (not found), VERY IMPORTANT, IF YOU ARE NOT 100 PERCENT SURE ABOUT THE PAGE EXISTING, +PLEASE, JUST SEND ME THE MAIN PAGE, PLEASE DO NOT TRY TO GUESS THE ROUTE TO THE LICENSE. + +IF THE LICENSE IS PROPIETARY, I JUST WANT TO KNOW ITS PROPIETARY, NOT A CUSTOM OR SOMETHING LIKE THAT, JUST PROPIETARY PLEASE. +IF ANY CASE, IT GIVES OUT 2 LICENSES (or more), PLEASE, JUST WRITE ONE, THE MOST ACCURATE ONE, DONT ADD AND or SOMETHING LIKE THAT PLEASE, +RESPECT THE yaml FORMAT, NO ANDs or ORs PLEASE. LAST THING, PLEASE DOUBLE CHECK (even TRIPLE if you can) BEFORE SENDING ME THIS. + +IN THIS FORMAT: + : + : + License: + Permission to redistribute: + Retrieved from: +""" + +response = model.generate_content([file, prompt]) print(response.text) text = response.text.replace("```yaml", "").replace("```", "").strip() with open("licenses_aux_llm.yaml", "w", encoding="utf-8") as f: From d5c40306fd069f96e925876fe658e7aa692a527e Mon Sep 17 00:00:00 2001 From: nqhu Date: Fri, 5 Dec 2025 09:16:55 +0100 Subject: [PATCH 9/9] api key secret fix --- licenses/processing_licenses_with_ai.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/licenses/processing_licenses_with_ai.py b/licenses/processing_licenses_with_ai.py index 8a6219a2c0..e6d44162ed 100644 --- a/licenses/processing_licenses_with_ai.py +++ b/licenses/processing_licenses_with_ai.py @@ -2,8 +2,10 @@ import warnings import os +secret = os.environ['GOOGLE_API_KEY'] + warnings.filterwarnings("ignore", category=FutureWarning) -genai.configure(api_key=os.environ.get("GOOGLE_API_KEY")) +genai.configure(api_key=secret) file = genai.upload_file("temporal_print.yaml", mime_type="text/plain") model = genai.GenerativeModel("gemini-2.5-pro") @@ -24,7 +26,7 @@ IF YOU CANT FIND THE LICENSE LINK, PLEASE DONT PUT THE LICENSE TYPE, I NEED SO BAD THE RETRIEVED FROM INFORMATION, IF YOU DONT HAVE THAT, THE LICENSE TYPE MUST BE NOT FOUND. ALSO, THE NAMES MUST BE IN A SPECIFIC FORMAT, FIRST LETTER CAPITALS, THEN IN LOWERCASE LIKE THIS EXAMPLE: Apache-2.0, Propietary... -IF ITS SOME TYPE OF ACRONYM, ALL CAPS PLEASE. JUST WRITE IT IN COMMON SENSE BASICALY. +IF ITS SOME TYPE OF ACRONYM, ALL CAPS PLEASE. JUST WRITE IT IN COMMON SENSE BASICALLY. PLEASE, DONT IGNORE ANY 'other' OR 'not found' LICENSE, DO NOT IGNORE. IN THE LINK YOU RETRIEVED IT FROM, I NEED TO SEE THE DIRECT LINK, I DON'T NEED THE MAIN PAGE, JUST THE PAGE WHERE IT SAYS THE LICENSE.