Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/extension-ai-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
timeout-minutes: 30
steps:
- name: Checkout the fork PR code
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:

- name: Run AI analysis
env:
NEBULA_API_KEY: ${{ secrets.NEBULA_API_KEY }}
MEGANOVA_API_KEY: ${{ secrets.MEGANOVA_API_KEY }}
id: ai-analysis
run: |
RESULT=$(python scripts/extension_ai_analysis.py \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/extension-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
pull-requests: write
timeout-minutes: 30
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0 # Fetch full history for git diff

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: "3.12"
Expand Down
2 changes: 1 addition & 1 deletion SlicerOpenLIFU.json → OpenLIFU.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"build_dependencies": [],
"build_subdirectory": ".",
"category": "Utilities",
"scm_revision": "v1.5.0",
"scm_revision": "main",
"scm_url": "https://github.com/OpenwaterHealth/SlicerOpenLIFU.git",
"tier": 1
}
19 changes: 19 additions & 0 deletions SlicerVolBrain.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"scm": "git",
"scmurl": "https://github.com/niyaziacer/SlicerVolBrain.git",
"scmrevision": "main",
"build_subdirectory": ".",
"name": "SlicerVolBrain",
"description": "3D Slicer extension for comprehensive brain structure volume calculation and 3D visualization from volBrain segmentation outputs. Supports 108+ cortical regions, tissue classification, lobes, and macrostructures.",
"iconurl": "https://raw.githubusercontent.com/niyaziacer/SlicerVolBrain/main/VolBrainIcon.png",
"category": "Quantification",
"contributors": ["Niyazi Acer (Sanko University)"],
"dependencies": [],
"screenshoturls": [
"https://raw.githubusercontent.com/niyaziacer/SlicerVolBrain/main/Screenshots/interface.png",
"https://raw.githubusercontent.com/niyaziacer/SlicerVolBrain/main/Screenshots/3d_visualization.png"
],
"enabled": true,
"homepage": "https://github.com/niyaziacer/SlicerVolBrain",
"status": "stable"
}
2 changes: 1 addition & 1 deletion TutorialMaker.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"build_subdirectory": ".",
"category": "Developer Tools",
"scm_revision": "main",
"scm_url": "https://github.com/SlicerLatinAmerica/SlicerTutorialMaker.git",
"scm_url": "https://github.com/SoniaPujolLab/SlicerTutorialMaker.git",
"tier": 1
}
5 changes: 3 additions & 2 deletions scripts/check_description_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,10 @@ def check_json_file_format(extension_name, metadata, extension_file_path):
extension_name, check_name,
f"Invalid JSON format: {str(e)}")
# Force using LF-only line endings
with open(extension_file_path, 'r', encoding='utf-8') as f:
# Must open in binary mode to detect line endings
with open(extension_file_path, 'rb') as f:
content = f.read()
if '\r\n' in content or '\r' in content:
if b'\r\n' in content or b'\r' in content:
raise ExtensionCheckError(
extension_name, check_name,
"File contains non-LF line endings (CR or CRLF). Please convert to LF-only line endings.")
Expand Down
9 changes: 6 additions & 3 deletions scripts/extension_ai_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,17 @@
import subprocess
import shutil

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

if not INFERENCE_API_KEY:
raise ValueError("MEGANOVA_API_KEY environment variable is not set. Please set it before running the script.")

QUESTIONS = [
["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"]],
["Does the README.md file contain a short description, 1-2 sentences, which summarizes what the extension is usable for?", ["doc"]],
Expand Down
Loading