diff --git a/buildUtilities/codecheckToolbox.m b/buildUtilities/codecheckToolbox.m index b76abab..d3bbeea 100644 --- a/buildUtilities/codecheckToolbox.m +++ b/buildUtilities/codecheckToolbox.m @@ -16,7 +16,7 @@ function codecheckToolbox(rootDir) error("climatedatastore:codeissues","No files to check.") end - if verLessThan('matlab','9.13') + if verLessThan('matlab','9.13') %#ok % Use the old check code before R2022b issues = checkcode(filesToCheck); issues = [issues{:}]; @@ -41,7 +41,7 @@ function codecheckToolbox(rootDir) writeBadgeJSONFile("code issues",string(issueCount), color) if issueCount ~= 0 - if verLessThan('matlab','9.13') + if verLessThan('matlab','9.13') %#ok % pre R2022b, run checkcode without a RHS argument to display issues checkcode(filesToCheck) else diff --git a/buildUtilities/packageToolbox.m b/buildUtilities/packageToolbox.m index e4074fe..474119e 100644 --- a/buildUtilities/packageToolbox.m +++ b/buildUtilities/packageToolbox.m @@ -69,7 +69,7 @@ oldVersion = string(matlab.addons.toolbox.toolboxVersion(packagingProjectFile)); pat = digitsPattern; versionParts = extract(oldVersion,pat); - if numel(versionParts) == 1 + if numel(versionParts) == 1 %#ok Using numel == 1 for symmetry versionParts(2) = "0"; end if numel(versionParts) == 2 diff --git a/buildUtilities/testToolbox.m b/buildUtilities/testToolbox.m index 9f5264b..5aec32d 100644 --- a/buildUtilities/testToolbox.m +++ b/buildUtilities/testToolbox.m @@ -50,7 +50,7 @@ function testToolbox(options) results = runner.run(suite); cdsapi_Factory.useMocks(false); - if ~verLessThan('matlab','9.9') && ~isMATLABReleaseOlderThan("R2022a") + if ~verLessThan('matlab','9.9') && ~isMATLABReleaseOlderThan("R2022a") %#ok % This report is only available in R2022a and later. isMATLABReleaseOlderThan wasn't added until MATLAB 2020b / version 9.9 results.generateHTMLReport(outputDirectory,'MainFile',"testreport.html"); end diff --git a/resources/project/uuid-eeeb8db5-54c0-45fd-908a-5b68d68bdd0a.xml b/resources/project/uuid-eeeb8db5-54c0-45fd-908a-5b68d68bdd0a.xml new file mode 100644 index 0000000..4356a6a --- /dev/null +++ b/resources/project/uuid-eeeb8db5-54c0-45fd-908a-5b68d68bdd0a.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/tests/smokeTest.m b/tests/smokeTest.m index 5b52cb9..d3b92e9 100644 --- a/tests/smokeTest.m +++ b/tests/smokeTest.m @@ -177,7 +177,7 @@ function gribAsyncTest(testCase) verifyClass(testCase, cdsFuture.RunningDuration,?duration) % This can take a long time. Limit the test to 10 seconds. cdsFuture.wait(10); - catch e %#ok + catch assumeFail(testCase,"Timeout waiting for response"); return end diff --git a/toolbox/internal/setupPythonIfNeeded.m b/toolbox/internal/setupPythonIfNeeded.m index b3bd2ce..784fc50 100644 --- a/toolbox/internal/setupPythonIfNeeded.m +++ b/toolbox/internal/setupPythonIfNeeded.m @@ -58,7 +58,13 @@ function setupPythonIfNeeded() % but for now.... % This is based on % https://www.mathworks.com/content/dam/mathworks/mathworks-dot-com/support/sysreq/files/python-compatibility.pdf - versionInfo = ver('matlab'); + if verLessThan('matlab','9.9') %#ok + versionInfo = ver('matlab'); %#ok + else + % matlabRelease ws introduced in R2020b + versionInfo = matlabRelease(); + versionInfo = versionInfo.Release; + end MATLABrelease = extract(string(versionInfo.Release),alphanumericBoundary + alphanumericsPattern + alphanumericBoundary); switch MATLABrelease case "R2023a"