Skip to content

Commit 9fb1109

Browse files
committed
Maintenance for R2024b and OpenWeather changes
1) Update GitHub CI 2) Update the .gitignore 3) Make the images have more descriptive titles, and update the README accordingly 4) Remove scripts and references to the OneCall API since OpenWeather has discontinued that entirely 5) Add InstructorResources with posted solutions
1 parent 043f8b1 commit 9fb1109

File tree

82 files changed

+985
-656
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+985
-656
lines changed

.github/workflows/ci.yml

+43-15
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,22 @@ on:
88
branches: [ release ]
99
workflow_dispatch:
1010

11+
# Add permission to write GitHub pages
12+
permissions:
13+
contents: write
14+
pages: write
15+
id-token: write
16+
1117
jobs:
1218
test:
1319
strategy:
1420
fail-fast: false
1521
matrix:
16-
MATLABVersion: [R2023b,R2024a]
22+
MATLABVersion: [R2024a,R2024b]
1723
runs-on: ubuntu-latest
1824
steps:
1925
# Checks-out your repository
20-
- uses: actions/checkout@v3
26+
- uses: actions/checkout@v4
2127

2228
# Sets up a display server
2329
- name: Start display server
@@ -32,9 +38,17 @@ jobs:
3238
uses: matlab-actions/setup-matlab@v2
3339
with:
3440
release: ${{ matrix.MATLABVersion }}
35-
products: Symbolic_Math_Toolbox
41+
products: >
42+
Symbolic_Math_Toolbox
3643
# Simulink Statistics_and_Machine_Learning_Toolbox
3744
# List required products above in the format shown (and uncomment them)
45+
# List of product strings:
46+
# Simulink
47+
# Statistics_and_Machine_Learning_Toolbox
48+
# Simulink_Coder
49+
# Econometrics_Toolbox
50+
# Deep_Learning_Toolbox
51+
3852

3953
# Run all the tests
4054
- name: Run SmokeTests
@@ -44,10 +58,12 @@ jobs:
4458

4559
# Upload the test results as artifact
4660
- name: Upload TestResults
47-
uses: actions/[email protected]
61+
if: ${{ always() }}
62+
uses: actions/upload-artifact@v4
4863
with:
49-
name: TestResults
50-
path: ./SoftwareTests/TestResults_${{ matrix.MATLABVersion }}.txt
64+
name: TestResults_${{ matrix.MATLABVersion }}
65+
path: ./public/*
66+
overwrite: true
5167

5268
badge:
5369
if: ${{ always() }}
@@ -58,26 +74,38 @@ jobs:
5874
steps:
5975

6076
# Checks-out your repository
61-
- uses: actions/checkout@v3
77+
- uses: actions/checkout@v4
6278

6379
# Sets up R2023b
6480
- name: Setup MATLAB
6581
uses: matlab-actions/setup-matlab@v2
6682
with:
67-
release: R2023b
83+
release: R2024b
6884

6985
# Download the test results from artifact
70-
- name: Download TestResults
71-
uses: actions/download-artifact@v2.1.1
86+
- name: Download All TestResults
87+
uses: actions/download-artifact@v4
7288
with:
73-
name: TestResults
74-
path: ./SoftwareTests/
75-
89+
path: public
90+
pattern: TestResults_*
91+
merge-multiple: true
92+
7693
# Create the test results badge
77-
- name: Run CreateBadge
94+
- name: Run PostSmokeTest
7895
uses: matlab-actions/run-command@v2
7996
with:
80-
command: openProject(pwd); CreateBadge;
97+
command: openProject(pwd); PostSmokeTest;
98+
99+
# Deploy reports to GitHub pages
100+
- name: Setup Pages
101+
uses: actions/configure-pages@v5
102+
- name: Upload pages artifact
103+
uses: actions/upload-pages-artifact@v3
104+
with:
105+
path: public
106+
- name: Deploy to GitHub Pages
107+
id: deployment
108+
uses: actions/deploy-pages@v4
81109

82110
# Commit the JSON for the MATLAB releases badge
83111
- name: Commit changed files

.gitignore

+10-13
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
# List of untracked files to ignore
2-
*.vs
3-
4-
# Prevent accidentally committing your API key
5-
myAPIkey.txt
6-
7-
# Live Task Repository
8-
MATLAB-Live-Task-for-Python
92

103
# Autosave files
114
*.asv
125
*.m~
136
*.autosave
147
*.slx.r*
158
*.mdl.r*
9+
__pycache__
10+
*.pyc
11+
*/*.pyc
1612

1713
# MATLAB Drive
1814
*.MATLABDriveTag
@@ -47,18 +43,19 @@ codegen/
4743
*.elf
4844
*.hex
4945
*.bin
50-
__pycache__
51-
*.pyc
52-
*/*.pyc
5346

5447
# Cache files
5548
*.slxc
5649

5750
# Project settings
5851
Utilities/ProjectSettings.mat
5952

60-
# Test results
61-
SoftwareTests/TestResults_*
62-
6353
# GitLab page folder
6454
public/
55+
56+
# Prevent accidentally committing your API key
57+
myAPIkey.txt
58+
59+
# Live Task Repository
60+
MATLAB-Live-Task-for-Python
61+
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
Binary file not shown.
Binary file not shown.

MainMenu.mlx

-125 Bytes
Binary file not shown.

README.md

+115-142
Large diffs are not rendered by default.

README.mlx

-226 Bytes
Binary file not shown.

Scripts/CheckingTheWeather.mlx

-15.2 KB
Binary file not shown.

Scripts/CreateCurrentWeatherApp.mlx

11 Bytes
Binary file not shown.

Scripts/SampleWeatherDashboard.mlx

-6.86 KB
Binary file not shown.

Scripts/UsingMATLABwithPython.mlx

33 Bytes
Binary file not shown.

Scripts/WeatherForecast.mlx

-32.7 KB
Binary file not shown.

Scripts/checkweather.py

-111
This file was deleted.

SoftwareTests/CheckTestResults.m

+7-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
end
55

66
properties (ClassSetupParameter)
7-
Project = {''};
7+
Project = {currentProject()};
88
end
99

1010
properties (TestParameter)
@@ -15,8 +15,8 @@
1515
methods (TestParameterDefinition,Static)
1616

1717
function Version = GetResults(Project)
18-
RootFolder = currentProject().RootFolder;
19-
Version = dir(fullfile(RootFolder,"SoftwareTests","TestResults*.txt"));
18+
RootFolder = Project.RootFolder;
19+
Version = dir(fullfile(RootFolder,"public","TestResults*.txt"));
2020
Version = extractBetween([Version.name],"TestResults_",".txt");
2121
end
2222

@@ -37,9 +37,11 @@ function SetUpSmokeTest(testCase,Project)
3737
methods(Test)
3838

3939
function CheckResults(testCase,Version)
40-
File = fullfile("SoftwareTests","TestResults_"+Version+".txt");
40+
File = fullfile("public","TestResults_"+Version+".txt");
4141
Results = readtable(File,TextType="string");
42-
testCase.verifyTrue(all(Results.Passed));
42+
if ~all(Results.Passed)
43+
error("Some of the tests did not pass.")
44+
end
4345
end
4446

4547
end

SoftwareTests/FunctionTests.m

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
classdef FunctionTests < matlab.unittest.TestCase
22

3+
% https://www.mathworks.com/help/matlab/matlab_prog/use-parameters-in-class-based-tests.html
4+
35
methods(Test)
46

57
end % methods

0 commit comments

Comments
 (0)