diff --git a/.github/workflows/extension-ai-analysis.yml b/.github/workflows/extension-ai-analysis.yml index 6aedadf2f..f335f5449 100644 --- a/.github/workflows/extension-ai-analysis.yml +++ b/.github/workflows/extension-ai-analysis.yml @@ -70,7 +70,9 @@ jobs: - name: Run AI analysis env: - NEBULA_API_KEY: ${{ secrets.NEBULA_API_KEY }} + INFERENCE_URL: ${{ vars.INFERENCE_URL }} + INFERENCE_MODEL: ${{ vars.INFERENCE_MODEL }} + INFERENCE_API_KEY: ${{ secrets.INFERENCE_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 be8b360ba..474c35b2f 100644 --- a/.github/workflows/extension-validation.yml +++ b/.github/workflows/extension-validation.yml @@ -70,6 +70,9 @@ jobs: - name: Run extension validation id: extension-validation continue-on-error: true + env: + # Used by scripts/check_description_files.py for authenticated GitHub topics API requests. + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | mkdir -p /tmp/validation-reports python scripts/check_description_files.py \ diff --git a/BoneMat.json b/BoneMat.json new file mode 100644 index 000000000..7e5d9106c --- /dev/null +++ b/BoneMat.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://raw.githubusercontent.com/Slicer/Slicer/main/Schemas/slicer-extension-catalog-entry-schema-v1.0.1.json#", + "build_dependencies": [], + "build_subdirectory": ".", + "category": "Surface Models", + "scm_revision": "main", + "scm_url": "https://github.com/modenaxe/SlicerBoneMat.git", + "tier": 1 +} diff --git a/ImpactReg.json b/ImpactReg.json new file mode 100644 index 000000000..f9edc6655 --- /dev/null +++ b/ImpactReg.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://raw.githubusercontent.com/Slicer/Slicer/main/Schemas/slicer-extension-catalog-entry-schema-v1.0.1.json#", + "build_dependencies": [ + "KonfAI" + ], + "build_subdirectory": ".", + "category": "Registration", + "scm_revision": "main", + "scm_url": "https://github.com/vboussot/SlicerImpactReg", + "tier": 3 +} diff --git a/ImpactSynth.json b/ImpactSynth.json new file mode 100644 index 000000000..25b287f3c --- /dev/null +++ b/ImpactSynth.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://raw.githubusercontent.com/Slicer/Slicer/main/Schemas/slicer-extension-catalog-entry-schema-v1.0.1.json#", + "build_dependencies": [ + "KonfAI" + ], + "build_subdirectory": ".", + "category": "Image Synthesis", + "scm_revision": "main", + "scm_url": "https://github.com/vboussot/SlicerImpactSynth", + "tier": 3 +} diff --git a/KonfAI.json b/KonfAI.json new file mode 100644 index 000000000..a12c14db3 --- /dev/null +++ b/KonfAI.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://raw.githubusercontent.com/Slicer/Slicer/main/Schemas/slicer-extension-catalog-entry-schema-v1.0.1.json#", + "build_dependencies": [], + "build_subdirectory": ".", + "category": "Pipelines", + "scm_revision": "main", + "scm_url": "https://github.com/vboussot/SlicerKonfAI", + "tier": 3 +} diff --git a/LanguagePacks.json b/LanguagePacks.json index 9fb85c9ef..cfea46d82 100644 --- a/LanguagePacks.json +++ b/LanguagePacks.json @@ -4,6 +4,6 @@ "build_subdirectory": ".", "category": "Utilities", "scm_revision": "main", - "scm_url": "https://github.com/Slicer/SlicerLanguagePacks", + "scm_url": "https://github.com/SoniaPujolLab/SlicerLanguagePacks", "tier": 5 } diff --git a/MHubRunner.json b/MHubRunner.json index bbd78aa0f..b2927c58a 100644 --- a/MHubRunner.json +++ b/MHubRunner.json @@ -6,6 +6,6 @@ "build_subdirectory": ".", "category": "Examples", "scm_revision": "main", - "scm_url": "https://github.com/LennyN95/SlicerMHubRunner", + "scm_url": "https://github.com/MHubAI/SlicerMHubRunner", "tier": 3 } diff --git a/MONAIPhysio.json b/MONAIPhysio.json new file mode 100644 index 000000000..af8ce39a3 --- /dev/null +++ b/MONAIPhysio.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://raw.githubusercontent.com/Slicer/Slicer/main/Schemas/slicer-extension-catalog-entry-schema-v1.0.2.json#", + "build_dependencies": [], + "build_subdirectory": ".", + "category": "Simulation", + "enabled": true, + "scm_revision": "5.10", + "scm_type": "git", + "scm_url": "https://github.com/Project-MONAI/monai-physio-slicer.git", + "tier": 1 +} diff --git a/MorphoDepot.json b/MorphoDepot.json index 8853a7dbe..ba35cc075 100644 --- a/MorphoDepot.json +++ b/MorphoDepot.json @@ -5,7 +5,7 @@ ], "build_subdirectory": ".", "category": "SlicerMorph", - "scm_revision": "main", - "scm_url": "https://github.com/MorphoCloud/SlicerMorphoDepot.git", + "scm_revision": "5.10", + "scm_url": "https://github.com/SlicerMorph/SlicerMorphoDepot.git", "tier": 1 } 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/PETDICOMExtension.json b/PETDICOMExtension.json index dd4bc99b4..52d74ce23 100644 --- a/PETDICOMExtension.json +++ b/PETDICOMExtension.json @@ -3,7 +3,7 @@ "build_dependencies": [], "build_subdirectory": ".", "category": "Converters", - "scm_revision": "master", + "scm_revision": "5.10", "scm_url": "https://github.com/QIICR/Slicer-PETDICOMExtension.git", "tier": 3 } diff --git a/Photogrammetry.json b/Photogrammetry.json index 91801d9e4..8e2f6ff3f 100644 --- a/Photogrammetry.json +++ b/Photogrammetry.json @@ -6,7 +6,7 @@ ], "build_subdirectory": ".", "category": "Photogrammetry", - "scm_revision": "master", + "scm_revision": "stable-5.10", "scm_url": "https://github.com/SlicerMorph/SlicerPhotogrammetry.git", "tier": 1 } diff --git a/QuantitativeReporting.json b/QuantitativeReporting.json index 6c1577c68..5a45fbd02 100644 --- a/QuantitativeReporting.json +++ b/QuantitativeReporting.json @@ -7,7 +7,7 @@ ], "build_subdirectory": ".", "category": "Informatics", - "scm_revision": "master", + "scm_revision": "2c0112785c9ba3af9be6a1f86d5ed7bb8b700705", "scm_url": "https://github.com/QIICR/QuantitativeReporting.git", "tier": 5 } diff --git a/RadReirradiation.json b/RadReirradiation.json new file mode 100644 index 000000000..c8d9fa0fb --- /dev/null +++ b/RadReirradiation.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://raw.githubusercontent.com/Slicer/Slicer/main/Schemas/slicer-extension-catalog-entry-schema-v1.0.1.json#", + "build_subdirectory": ".", + "category": "Radiotherapy", + "scm_revision": "main", + "scm_url": "https://github.com/LuisParedesOcampo/SlicerRadReirradiation", + "tier": 1 +} diff --git a/SEEGContactDetector.json b/SEEGContactDetector.json new file mode 100644 index 000000000..79cbf56f9 --- /dev/null +++ b/SEEGContactDetector.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://raw.githubusercontent.com/Slicer/Slicer/main/Schemas/slicer-extension-catalog-entry-schema-v1.0.1.json#", + "category": "IGT", + "tier": 3, + "scm_url": "https://github.com/EpiReC-ISARG/SlicerSEEGContactDetector", + "scm_type": "git", + "scm_revision": "5.10", + "build_dependencies": [ + "HDBrainExtraction" + ], + "build_subdirectory": "." +} diff --git a/SimVascular.json b/SimVascular.json new file mode 100644 index 000000000..a7070f08a --- /dev/null +++ b/SimVascular.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://raw.githubusercontent.com/Slicer/Slicer/main/Schemas/slicer-extension-catalog-entry-schema-v1.0.1.json#", + "build_dependencies": [], + "build_subdirectory": ".", + "category": "Simulation", + "scm_revision": "main", + "scm_url": "https://github.com/SimVascular/SlicerSimVascular", + "tier": 3 +} diff --git a/SlicerANTsPy.json b/SlicerANTsPy.json index 72ef77cc2..185b05368 100644 --- a/SlicerANTsPy.json +++ b/SlicerANTsPy.json @@ -3,7 +3,7 @@ "build_dependencies": [], "build_subdirectory": ".", "category": "Registration", - "scm_revision": "main", + "scm_revision": "stable-5.10", "scm_url": "https://github.com/SlicerMorph/SlicerANTsPy.git", "tier": 3 } diff --git a/SlicerMorph.json b/SlicerMorph.json index 4ef56fb50..af2eb1890 100644 --- a/SlicerMorph.json +++ b/SlicerMorph.json @@ -6,7 +6,7 @@ ], "build_subdirectory": ".", "category": "SlicerMorph", - "scm_revision": "master", + "scm_revision": "stable-5.10", "scm_url": "https://github.com/SlicerMorph/SlicerMorph.git", "tier": 5 } 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/VoxTell.json b/VoxTell.json new file mode 100644 index 000000000..58dd02a4f --- /dev/null +++ b/VoxTell.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://raw.githubusercontent.com/Slicer/Slicer/main/Schemas/slicer-extension-catalog-entry-schema-v1.0.1.json#", + "build_dependencies": [ + "PyTorch" + ], + "build_subdirectory": ".", + "category": "Segmentation", + "scm_revision": "main", + "scm_url": "https://github.com/lassoan/SlicerVoxTell", + "tier": 5 +} diff --git a/WebSubInterface.json b/WebSubInterface.json new file mode 100644 index 000000000..1c52e7ab4 --- /dev/null +++ b/WebSubInterface.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://raw.githubusercontent.com/Slicer/Slicer/main/Schemas/slicer-extension-catalog-entry-schema-v1.0.2.json#", + "build_dependencies": [], + "build_subdirectory": ".", + "category": "Informatics", + "scm_revision": "main", + "scm_url": "https://github.com/mbellehumeur/SlicerWebSub.git", + "tier": 1 +} diff --git a/scripts/check_description_files.py b/scripts/check_description_files.py index 3fbda2b6b..d65a7fbdd 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.") @@ -255,13 +256,36 @@ def check_git_repository_topics(extension_name, metadata): headers = { "Accept": "application/vnd.github+json" } - response = requests.get(url, headers=headers) + + # Use authenticated requests when available to reduce rate-limit issues in CI. + github_token = os.environ.get("GITHUB_TOKEN") + if github_token: + headers["Authorization"] = f"Bearer {github_token}" + + try: + response = requests.get(url, headers=headers, timeout=30) + except requests.RequestException as exc: + return textwrap.dedent(f""" + Skipping repository topics check for {owner}/{repo}: Failed to query GitHub API ({exc}). + """) + topics = [] if response.status_code == 200: data = response.json() topics = data.get("names", []) + elif response.status_code in (403, 429): + try: + message = response.json().get("message", response.text) + except ValueError: + message = response.text + return textwrap.dedent(f""" + Skipping repository topics check for {owner}/{repo}: GitHub API rate limit reached ({response.status_code}: {message}). + To enforce this check in CI, set GITHUB_TOKEN for authenticated API requests. + """) else: - raise ValueError(f"Failed to get github topics for {owner}/{repo}: Error {response.status_code}: {response.text}") + raise ExtensionCheckError( + extension_name, check_name, + f"Failed to get github topics for {owner}/{repo}: Error {response.status_code}: {response.text}") if "3d-slicer-extension" not in topics: raise ExtensionCheckError( @@ -669,6 +693,7 @@ def main(): "MeshStatisticsExtension", "MeshToLabelMap", "ModelClip", + "monai-physio-slicer", "MONAILabel", "mpReview", "NeedleFinder", diff --git a/scripts/extension_ai_analysis.py b/scripts/extension_ai_analysis.py index a682f5dd5..b0460bb96 100644 --- a/scripts/extension_ai_analysis.py +++ b/scripts/extension_ai_analysis.py @@ -15,13 +15,20 @@ import subprocess import shutil -# Use Nebula Block 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_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_MAX_CHARACTERS = 100000 # max characters in all files provided to the model, approximately 25k tokens (limit is 32k) + +# Get inference server configuration from environment variables +INFERENCE_URL = os.getenv("INFERENCE_URL") +if not INFERENCE_URL: + raise ValueError("INFERENCE_URL environment variable is not set. Please set it before running the script.") +INFERENCE_MODEL = os.getenv("INFERENCE_MODEL") +if not INFERENCE_MODEL: + raise ValueError("INFERENCE_MODEL environment variable is not set. Please set it before running the script.") +INFERENCE_API_KEY = os.getenv("INFERENCE_API_KEY") +if not INFERENCE_API_KEY: + raise ValueError("INFERENCE_API_KEY environment variable is not set. Please set it before running the script.") + +INFERENCE_RESPONSE_PER_MINUTE_LIMIT = 10 # slow down to not exceed token per minute (tpm) limit +INFERENCE_MAX_CHARACTERS = 400000 # max characters in all files provided to the model, approximately 100k tokens 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"]], @@ -130,7 +137,9 @@ def collect_analyzed_files(folder): def ask_question(system_msg, question): headers = { "Content-Type": "application/json", - "Authorization": f"Bearer {INFERENCE_API_KEY}" + "Authorization": f"Bearer {INFERENCE_API_KEY}", + "HTTP-Referer": "slicer.org", # Optional. Site URL for rankings on openrouter.ai. + "X-Title": "3D Slicer", # Optional. Site title for rankings on openrouter.ai. } messages = [ @@ -157,6 +166,11 @@ def ask_question(system_msg, question): try: answer = response.json()["choices"][0]["message"]["content"] except Exception as e: + import traceback + traceback.print_exc() + print(f"Request data: {data}", file=sys.stderr) + print(f"Response status code: {response.status_code}", file=sys.stderr) + print(f"Response content: {response.text}", file=sys.stderr) raise RuntimeError(f"Error or unexpected response: {response.json()["error"]["message"]}") return answer