From 36539c25ea08353001863cbddfa5f28a1beed4f6 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 24 Feb 2026 14:21:08 +0000 Subject: [PATCH] Pass ToolboxOptions as name-value pairs in constructor to fix CI error When creating `matlab.addons.toolbox.ToolboxOptions` from a folder, mandatory fields like `ToolboxIdentifier` must be provided immediately to avoid validation errors. This commit updates the `release.yml` workflow to pass all toolbox properties (Name, Version, Identifier, Author, Description, Files) directly to the constructor instead of setting them afterwards. --- .github/workflows/release.yml | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5e91577..8cbfdd3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -122,20 +122,15 @@ jobs: % 3. Initialize Options from the MATLAB source folder % This creates the object without needing a .prj file on disk yet - opts = matlab.addons.toolbox.ToolboxOptions(fullfile(pwd, 'src', 'matlab')); - - % 4. Set the Required Fields - opts.ToolboxName = toolboxName; - opts.ToolboxVersion = version; - opts.ToolboxIdentifier = guid; - opts.AuthorName = 'Pyraview Team'; - opts.AuthorEmail = ''; - opts.Description = 'High-performance multi-resolution decimation engine.'; - opts.OutputFile = fullfile(pwd, 'Pyraview.mltbx'); - - % 5. Map the files - % We want the root of the toolbox to be the src/matlab folder - opts.ToolboxFiles = {fullfile(pwd, 'src', 'matlab')}; + opts = matlab.addons.toolbox.ToolboxOptions(fullfile(pwd, 'src', 'matlab'), ... + 'ToolboxName', toolboxName, ... + 'ToolboxVersion', version, ... + 'ToolboxIdentifier', guid, ... + 'AuthorName', 'Pyraview Team', ... + 'AuthorEmail', '', ... + 'Description', 'High-performance multi-resolution decimation engine.', ... + 'OutputFile', fullfile(pwd, 'Pyraview.mltbx'), ... + 'ToolboxFiles', {fullfile(pwd, 'src', 'matlab')}); % 6. Package it fprintf('Packaging %s v%s [%s]...\n', toolboxName, version, guid);