diff --git a/.github/workflows/extension-ai-analysis.yml b/.github/workflows/extension-ai-analysis.yml index b1c948ce2..7b47ec005 100644 --- a/.github/workflows/extension-ai-analysis.yml +++ b/.github/workflows/extension-ai-analysis.yml @@ -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 }} @@ -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 \ diff --git a/.github/workflows/extension-validation.yml b/.github/workflows/extension-validation.yml index 3dd47a601..0ec71a386 100644 --- a/.github/workflows/extension-validation.yml +++ b/.github/workflows/extension-validation.yml @@ -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 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 55f4d1883..0e0722c66 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -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" diff --git a/SlicerOpenLIFU.json b/OpenLIFU.json similarity index 91% rename from SlicerOpenLIFU.json rename to OpenLIFU.json index 37dc71dcd..4fcbc3ec9 100644 --- a/SlicerOpenLIFU.json +++ b/OpenLIFU.json @@ -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 } diff --git a/SlicerVolBrain.json b/SlicerVolBrain.json new file mode 100644 index 000000000..97f250b16 --- /dev/null +++ b/SlicerVolBrain.json @@ -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" +} diff --git a/TutorialMaker.json b/TutorialMaker.json index 9252a3752..202a992c6 100644 --- a/TutorialMaker.json +++ b/TutorialMaker.json @@ -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 } diff --git a/scripts/check_description_files.py b/scripts/check_description_files.py index 3fbda2b6b..ef8f854d3 100644 --- a/scripts/check_description_files.py +++ b/scripts/check_description_files.py @@ -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.") diff --git a/scripts/extension_ai_analysis.py b/scripts/extension_ai_analysis.py index a682f5dd5..624f59e60 100644 --- a/scripts/extension_ai_analysis.py +++ b/scripts/extension_ai_analysis.py @@ -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"]],