Repository navigation
feat: set Readme and PackageName from MLToolboxInfo.json on R2026b - #81
Open
ehennestad wants to merge 3 commits into
Open
ehennestad wants to merge 3 commits into
ehennestad wants to merge 3 commits into
Conversation
From R2026b, ToolboxOptions has Readme and PackageName properties. Earlier releases reject them as unknown name-value arguments, so createToolboxOptions takes both fields out of the ToolboxOptions of MLToolboxInfo.json before the constructor and sets them afterwards on releases that have the properties. Readme is a path relative to the source folder. Listing README.md in RootFilesToPackage copies the project README there. A Readme that is not in the source folder raises MatBox:Package:ReadmeNotFound, and a PackageName that is not a valid MATLAB identifier raises MatBox:Package:InvalidPackageName, on every release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The help text named openMINDS_MATLAB and gave an example that calls getToolboxOptions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Test Results115 tests 114 ✅ 32s ⏱️ Results for commit ca208e5. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
From R2026b,
matlab.addons.toolbox.ToolboxOptionshasReadmeandPackageNameproperties.Readmenames the file that becomes the package readme.PackageNameis thenameinmpackage.json; it names the installation folder (<Add-Ons folder>/<PackageName>@<version>) and identifies the package inmpmlistand to packages that depend on it. Releases before R2026b reject both as unknown name-value arguments (MATLAB:InputParser:UnmatchedParameteron R2024b), soMLToolboxInfo.jsoncould not set them.Changes
createToolboxOptionstakesReadmeandPackageNameout of theToolboxOptionsofMLToolboxInfo.jsonbefore the constructor, and sets them afterwards whereispropfinds the property.Readmeis a path relative to the source folder, because the package holds only the files below it. ListingREADME.mdinRootFilesToPackagestages the project README there. AReadmethat is not in the source folder, or whose path contains.., raisesMatBox:Package:ReadmeNotFound.PackageNamethat is not a valid MATLAB identifier (isvarname) raisesMatBox:Package:InvalidPackageName.MatBox:Package:InvalidToolboxInfoField.docs/ci.mdand the help text ofpackageToolboxdescribe both fields.TasksTestgains four tests: packaging with both fields, thereadmeandnameofmpackage.jsonon R2026b (skipped on earlier releases), and the two errors.createToolboxOptions, which named openMINDS_MATLAB and gave agetToolboxOptionsexample.Context
Without
Readme, R2026b uses aREADME.mdat the root of the source folder, or else writesDescriptionto one. File Exchange refused an R2026b package that had neither (ehennestad/EBRAINS-MATLAB#100). WithoutPackageName, R2026b derives the name fromToolboxName: "NANSEN Two-Photon Module" becomesNANSENTwo0x2DPhotonModule.Removing badge lines and making relative links absolute in the staged README is a separate change.
🤖 Generated with Claude Code