Skip to content

Commit ed7c981

Browse files
authored
Merge branch 'main' into add-KonfAI
2 parents 62452bb + 781eb09 commit ed7c981

File tree

6 files changed

+15
-11
lines changed

6 files changed

+15
-11
lines changed

.github/workflows/extension-ai-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
timeout-minutes: 30
1818
steps:
1919
- name: Checkout the fork PR code
20-
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
20+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2121
with:
2222
repository: ${{ github.event.pull_request.head.repo.full_name }}
2323
ref: ${{ github.event.pull_request.head.ref }}
@@ -70,7 +70,7 @@ jobs:
7070
7171
- name: Run AI analysis
7272
env:
73-
NEBULA_API_KEY: ${{ secrets.NEBULA_API_KEY }}
73+
MEGANOVA_API_KEY: ${{ secrets.MEGANOVA_API_KEY }}
7474
id: ai-analysis
7575
run: |
7676
RESULT=$(python scripts/extension_ai_analysis.py \

.github/workflows/extension-validation.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
pull-requests: write
2020
timeout-minutes: 30
2121
steps:
22-
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
22+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2323
with:
2424
fetch-depth: 0 # Fetch full history for git diff
2525

@@ -103,7 +103,7 @@ jobs:
103103
104104
- name: Upload validation reports
105105
if: always()
106-
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
106+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
107107
with:
108108
name: validation-reports
109109
path: |

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
timeout-minutes: 5
1818
steps:
19-
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
19+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2020
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
2121
with:
2222
python-version: "3.12"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"build_dependencies": [],
44
"build_subdirectory": ".",
55
"category": "Utilities",
6-
"scm_revision": "v1.5.0",
6+
"scm_revision": "main",
77
"scm_url": "https://github.com/OpenwaterHealth/SlicerOpenLIFU.git",
88
"tier": 1
99
}

scripts/check_description_files.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,10 @@ def check_json_file_format(extension_name, metadata, extension_file_path):
105105
extension_name, check_name,
106106
f"Invalid JSON format: {str(e)}")
107107
# Force using LF-only line endings
108-
with open(extension_file_path, 'r', encoding='utf-8') as f:
108+
# Must open in binary mode to detect line endings
109+
with open(extension_file_path, 'rb') as f:
109110
content = f.read()
110-
if '\r\n' in content or '\r' in content:
111+
if b'\r\n' in content or b'\r' in content:
111112
raise ExtensionCheckError(
112113
extension_name, check_name,
113114
"File contains non-LF line endings (CR or CRLF). Please convert to LF-only line endings.")

scripts/extension_ai_analysis.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,17 @@
1515
import subprocess
1616
import shutil
1717

18-
# Use Nebula Block API endpoint for chat completions.
18+
# Use MegaNova API endpoint for chat completions.
1919
# It offers capable models for free with an OpenAI-compatible API.
20-
INFERENCE_URL = "https://inference.nebulablock.com/v1/chat/completions"
20+
INFERENCE_URL = "https://inference.meganova.ai/v1/chat/completions"
2121
INFERENCE_MODEL = "mistralai/Mistral-Small-3.2-24B-Instruct-2506"
2222
INFERENCE_RESPONSE_PER_MINUTE_LIMIT = 4 # slow down to not exceed token per minute (tpm) limit of 60k
23-
INFERENCE_API_KEY = os.getenv("NEBULA_API_KEY")
23+
INFERENCE_API_KEY = os.getenv("MEGANOVA_API_KEY")
2424
INFERENCE_MAX_CHARACTERS = 100000 # max characters in all files provided to the model, approximately 25k tokens (limit is 32k)
2525

26+
if not INFERENCE_API_KEY:
27+
raise ValueError("MEGANOVA_API_KEY environment variable is not set. Please set it before running the script.")
28+
2629
QUESTIONS = [
2730
["Is there a EXTENSION_DESCRIPTION variable in the CMakeLists.txt file that describes what the extension does in a few sentences that can be understood by a person knowledgeable in medical image computing?", ["cmake"]],
2831
["Does the README.md file contain a short description, 1-2 sentences, which summarizes what the extension is usable for?", ["doc"]],

0 commit comments

Comments
 (0)