Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add r2024a support #21

Merged
merged 2 commits into from
Sep 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
MATLABVersion: [R2020a, R2020b, R2021a, R2021b, R2022a, R2022b, R2023a, R2023b]
MATLABVersion: [R2020a, R2020b, R2021a, R2021b, R2022a, R2022b, R2023a, R2023b, R2024a]
# The type of runner that the job will run on
runs-on: ubuntu-latest

Expand Down
4 changes: 2 additions & 2 deletions buildUtilities/codecheckToolbox.m
Original file line number Diff line number Diff line change
Expand Up @@ -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<VERLESSMATLAB>
% Use the old check code before R2022b
issues = checkcode(filesToCheck);
issues = [issues{:}];
Expand All @@ -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<VERLESSMATLAB>
% pre R2022b, run checkcode without a RHS argument to display issues
checkcode(filesToCheck)
else
Expand Down
2 changes: 1 addition & 1 deletion buildUtilities/packageToolbox.m
Original file line number Diff line number Diff line change
Expand Up @@ -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<ISCL> Using numel == 1 for symmetry
versionParts(2) = "0";
end
if numel(versionParts) == 2
Expand Down
2 changes: 1 addition & 1 deletion buildUtilities/testToolbox.m
Original file line number Diff line number Diff line change
Expand Up @@ -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<VERLESSMATLAB>
% 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
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<Info/>
2 changes: 1 addition & 1 deletion tests/smokeTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -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<NASGU>
catch
assumeFail(testCase,"Timeout waiting for response");
return
end
Expand Down
8 changes: 7 additions & 1 deletion toolbox/internal/setupPythonIfNeeded.m
Original file line number Diff line number Diff line change
Expand Up @@ -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<VERLESSMATLAB>
versionInfo = ver('matlab'); %#ok<VERMATLAB>
else
% matlabRelease ws introduced in R2020b
versionInfo = matlabRelease();
versionInfo = versionInfo.Release;
end
MATLABrelease = extract(string(versionInfo.Release),alphanumericBoundary + alphanumericsPattern + alphanumericBoundary);
switch MATLABrelease
case "R2023a"
Expand Down
Loading