From e92dc1ee1e9e92ae4719d3f60fcfcd399031a6bf Mon Sep 17 00:00:00 2001 From: ehennestad Date: Mon, 14 Sep 2026 14:45:50 +0200 Subject: [PATCH 1/2] feat: fill codemeta release notes and runtime platform per release The codemeta update task now writes releaseNotes as a link to the GitHub releases page anchored on the released tag, reads the minimum MATLAB release from the toolbox packaging file into runtimePlatform, and stamps datePublished alongside dateModified. codemeta.json is updated by hand for v0.12.0 to match. It corrects the minimum release from R2022b to R2022a, replaces softwareRequirements with runtimePlatform, and adds url, readme, installUrl, keywords, maintainer and dateCreated. Co-Authored-By: Claude Fable 5.1 --- codemeta.json | 23 +++++++++++++++++++---- tools/tasks/updateCodeMetaFile.m | 19 ++++++++++++++++++- 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/codemeta.json b/codemeta.json index ad25d151a..9eda9a306 100644 --- a/codemeta.json +++ b/codemeta.json @@ -4,12 +4,21 @@ "license": "https://spdx.org/licenses/MIT", "isPartOf": "https://github.com/openMetadataInitiative", "codeRepository": "https://github.com/openMetadataInitiative/openMINDS_MATLAB", + "url": "https://openminds-documentation.readthedocs.io", + "readme": "https://github.com/openMetadataInitiative/openMINDS_MATLAB/blob/main/README.md", + "installUrl": "https://www.mathworks.com/matlabcentral/fileexchange/134212-openminds-metadata-models-for-matlab", "contIntegration": "https://github.com/openMetadataInitiative/openMINDS_MATLAB/actions", "issueTracker": "https://github.com/openMetadataInitiative/openMINDS_MATLAB/issues", "name": "openMINDS MATLAB", "description": "openMINDS MATLAB is a toolbox to support the creation and use of openMINDS metadata models and schemas in MATLAB, with import and export in JSON-LD format. The package contains all openMINDS schemas as MATLAB classes in addition to schema base classes and utility methods.", "applicationCategory": "neuroscience", - "releaseNotes": "https://github.com/openMetadataInitiative/openMINDS_MATLAB/releases", + "keywords": [ + "openMINDS", + "metadata", + "linked-data", + "neuroscience" + ], + "releaseNotes": "https://github.com/openMetadataInitiative/openMINDS_MATLAB/releases#release-v0.12.0", "funding": "https://cordis.europa.eu/project/id/945539", "developmentStatus": "active", "funder": { @@ -24,9 +33,7 @@ "Windows", "macOS" ], - "softwareRequirements": [ - "MATLAB R2022b or later" - ], + "runtimePlatform": "MATLAB R2022a or later", "relatedLink": [ "https://openminds-documentation.readthedocs.io" ], @@ -38,7 +45,15 @@ "familyName": "Hennestad" } ], + "maintainer": { + "@type": "Person", + "@id": "https://orcid.org/0000-0002-8297-1753", + "givenName": "Eivind", + "familyName": "Hennestad" + }, "version": "0.12.0", "downloadUrl": "https://github.com/openMetadataInitiative/openMINDS_MATLAB/releases/download/v0.12.0/openMINDS_MATLAB_v0_12_0.mltbx", + "dateCreated": "2023-08-22", + "datePublished": "2026-09-11", "dateModified": "2026-09-11" } diff --git a/tools/tasks/updateCodeMetaFile.m b/tools/tasks/updateCodeMetaFile.m index 4f650c938..5ef8be177 100644 --- a/tools/tasks/updateCodeMetaFile.m +++ b/tools/tasks/updateCodeMetaFile.m @@ -15,10 +15,27 @@ codeMetaFilePath = fullfile(projectRootDirectory, 'codemeta.json'); codeMetaInfo = jsondecode( fileread(codeMetaFilePath) ); + % The toolbox packaging file is the source of truth for the supported + % MATLAB releases, so read it from there instead of keeping a copy here. + toolboxInfoFilePath = fullfile(projectRootDirectory, 'tools', 'MLToolboxInfo.json'); + toolboxInfo = jsondecode( fileread(toolboxInfoFilePath) ); + assert(isempty(toolboxInfo.ToolboxOptions.MaximumMatlabRelease), ... + 'runtimePlatform assumes no maximum MATLAB release. Update this task if one is set.') + minimumMatlabRelease = string(toolboxInfo.ToolboxOptions.MinimumMatlabRelease); + + % This task runs on the day a version is released, so both dates are today. + releaseDate = string(datetime('today', 'Format', 'yyyy-MM-dd')); + codeMetaInfo.version = versionStringNumeric; codeMetaInfo.downloadUrl = sprintf("https://github.com/openMetadataInitiative/openMINDS_MATLAB/releases/download/%s/openMINDS_MATLAB_%s.mltbx", ... versionString, strrep(versionString, '.', '_')); - codeMetaInfo.dateModified = string(datetime('today', 'Format', 'yyyy-MM-dd')); + % GitHub anchors each release section on the releases page by its tag, + % so the release notes link can point at this version's notes directly. + releasesPageUrl = "https://github.com/openMetadataInitiative/openMINDS_MATLAB/releases"; + codeMetaInfo.releaseNotes = releasesPageUrl + "#release-" + versionString; + codeMetaInfo.runtimePlatform = "MATLAB " + minimumMatlabRelease + " or later"; + codeMetaInfo.datePublished = releaseDate; + codeMetaInfo.dateModified = releaseDate; if isscalar(codeMetaInfo.author) % Ensure author is encoded as an array From 038de162c6de013d110873a9bcbfaca5b887c629 Mon Sep 17 00:00:00 2001 From: ehennestad Date: Mon, 14 Sep 2026 14:56:20 +0200 Subject: [PATCH 2/2] fix: keep codemeta datePublished at the first release datePublished is the first release date, which the CodeMeta generator labels "First release date", so the update task no longer overwrites it each release. codemeta.json pins it to 2023-09-26, when v0.9.0 was published. Co-Authored-By: Claude Fable 5.1 --- codemeta.json | 2 +- tools/tasks/updateCodeMetaFile.m | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/codemeta.json b/codemeta.json index 9eda9a306..cc2691acb 100644 --- a/codemeta.json +++ b/codemeta.json @@ -54,6 +54,6 @@ "version": "0.12.0", "downloadUrl": "https://github.com/openMetadataInitiative/openMINDS_MATLAB/releases/download/v0.12.0/openMINDS_MATLAB_v0_12_0.mltbx", "dateCreated": "2023-08-22", - "datePublished": "2026-09-11", + "datePublished": "2023-09-26", "dateModified": "2026-09-11" } diff --git a/tools/tasks/updateCodeMetaFile.m b/tools/tasks/updateCodeMetaFile.m index 5ef8be177..86c89628d 100644 --- a/tools/tasks/updateCodeMetaFile.m +++ b/tools/tasks/updateCodeMetaFile.m @@ -23,9 +23,6 @@ 'runtimePlatform assumes no maximum MATLAB release. Update this task if one is set.') minimumMatlabRelease = string(toolboxInfo.ToolboxOptions.MinimumMatlabRelease); - % This task runs on the day a version is released, so both dates are today. - releaseDate = string(datetime('today', 'Format', 'yyyy-MM-dd')); - codeMetaInfo.version = versionStringNumeric; codeMetaInfo.downloadUrl = sprintf("https://github.com/openMetadataInitiative/openMINDS_MATLAB/releases/download/%s/openMINDS_MATLAB_%s.mltbx", ... versionString, strrep(versionString, '.', '_')); @@ -34,8 +31,8 @@ releasesPageUrl = "https://github.com/openMetadataInitiative/openMINDS_MATLAB/releases"; codeMetaInfo.releaseNotes = releasesPageUrl + "#release-" + versionString; codeMetaInfo.runtimePlatform = "MATLAB " + minimumMatlabRelease + " or later"; - codeMetaInfo.datePublished = releaseDate; - codeMetaInfo.dateModified = releaseDate; + % datePublished is the first release date, so it is left untouched here. + codeMetaInfo.dateModified = string(datetime('today', 'Format', 'yyyy-MM-dd')); if isscalar(codeMetaInfo.author) % Ensure author is encoded as an array