Skip to content

Commit 9d06800

Browse files
committed
Update to new structure
1 parent a493743 commit 9d06800

File tree

121 files changed

+1037
-548
lines changed

Some content is hidden

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

121 files changed

+1037
-548
lines changed

.gitattributes

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
*.mexa64 binary
66
*.mexw64 binary
77
*.mexmaci64 binary
8-
*.mlapp binary
8+
*.mlapp binary linguist-language=MATLAB
99
*.mldatx binary
1010
*.mlproj binary
11-
*.mlx binary merge=mlAutoMerge
11+
*.mlx binary merge=mlAutoMerge linguist-language=MATLAB
1212
*.p binary
1313
*.sfx binary
1414
*.sldd binary

.github/workflows/ci.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: MATLAB Build
2+
3+
# Controls when the action will run.
4+
on:
5+
push:
6+
branches: [ release ]
7+
pull_request:
8+
branches: [ release ]
9+
workflow_dispatch:
10+
11+
jobs:
12+
test:
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
MATLABVersion: [R2023a,R2023b]
17+
runs-on: ubuntu-latest
18+
steps:
19+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
20+
- uses: actions/checkout@v3
21+
22+
# Sets up MATLAB on the GitHub Actions runner
23+
- name: Setup MATLAB
24+
uses: matlab-actions/setup-matlab@v1
25+
with:
26+
release: ${{ matrix.MATLABVersion }}
27+
28+
# Run SmokeTests
29+
- name: Run SmokeTests
30+
uses: matlab-actions/run-command@v1
31+
with:
32+
command: openProject(pwd); results = runtests(fullfile("SoftwareTests","SmokeTests.m")); assertSuccess(results);
33+
34+
# Run FunctionTests
35+
- name: Run FunctionTests
36+
uses: matlab-actions/run-command@v1
37+
with:
38+
command: openProject(pwd); results = runtests(fullfile("SoftwareTests","FunctionTests.m")); assertSuccess(results);
39+
40+
# Upload the test results as artifact
41+
- name: Upload TestResults
42+
uses: actions/[email protected]
43+
with:
44+
name: TestResults
45+
path: ./SoftwareTests/TestResults_${{ matrix.MATLABVersion }}.txt
46+
47+
# Download the test results from artifact
48+
- name: Download TestResults
49+
uses: actions/[email protected]
50+
with:
51+
name: TestResults
52+
path: ./SoftwareTests/
53+
54+
# Create the test results badge
55+
- name: Run CreateBadge
56+
uses: matlab-actions/run-command@v1
57+
with:
58+
command: openProject(pwd); results = runtests(fullfile("SoftwareTests","CreateBadge.m"));
59+
60+
# Commit the JSON for the MATLAB releases badge
61+
- name: Commit changed files
62+
continue-on-error: true
63+
run: |
64+
git config user.name "${{ github.workflow }} by ${{ github.actor }}"
65+
git config user.email "<>"
66+
git commit Images/TestedWith.json -m "Update CI badges ${{ github.ref_name }}"
67+
git fetch
68+
git push

.gitignore

Lines changed: 47 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,51 @@
11
# List of untracked files to ignore
22

3+
# Autosave files
34
*.asv
5+
*.m~
6+
*.autosave
7+
*.slx.r*
8+
*.mdl.r*
9+
10+
# MATLAB Drive
11+
*.MATLABDriveTag
12+
13+
# Compiled files
14+
*.mex*
15+
*.p
16+
17+
# Compressed files
418
*.zip
5-
*.pyc
6-
*.pyc
7-
*.vs
8-
*TestOutput
19+
20+
# Packaged app and toolbox files
21+
*.mlappinstall
22+
*.mltbx
23+
24+
# Deployable archives
25+
*.ctf
26+
27+
# Generated helpsearch folders
28+
helpsearch*/
29+
30+
# Defined Simulink cache folder
31+
Utilities/SimulinkCache/*
32+
33+
# Standard code generation folders
34+
slprj/
35+
sccprj/
36+
codegen/
37+
38+
# Code generation file
39+
*.eep
40+
*.elf
41+
*.hex
42+
*.bin
43+
44+
# Cache files
45+
*.slxc
46+
47+
# Project settings
48+
Utilities/ProjectSettings.mat
49+
50+
# Test results
51+
SoftwareTests/TestResults_*

.gitlab-ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
stages:
2+
- test
3+
4+
matlab-test-job:
5+
tags:
6+
- matlab
7+
stage: test
8+
script:
9+
- matlab -batch "openProject('OrganizingData.prj'); results = runtests('IncludeSubfolders', true); assertSuccess(results);"

CONTRIBUTING.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Contributing
2+
3+
>_If you believe you have discovered a security vulnerability, please **do not** open an issue or make a pull request. Follow the instructions in the [SECURITY.md](SECURITY.md) file in this repository._
4+
5+
Thank you for your interest in contributing to a MathWorks repository! We encourage contributions large and small to this repository.
6+
7+
**Contributions do not have to be code!** If you see a way to explain things more clearly or a great example of how to use something, please contribute it (or a link to your content). We welcome issues even if you don't code the solution. We also welcome pull requests to resolve issues that we haven't gotten to yet!
8+
9+
## How to give feedback
10+
* **Send us an email:** Contact the [MathWorks teaching resources team.](mailto:[email protected])
11+
* **Open an issue:** Start by [creating an issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/creating-an-issue) in the repository that you're interested in. That will start a conversation with the maintainer. When you are creating a bug report, please include as many details as possible. Please remember that other people do not have your background or understanding of the issue; make sure you are clear and complete in your description.
12+
13+
## How to contribute to the repository
14+
* **Work in your own public fork:** If you choose to make a contribution, you should [fork the repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo). This creates an editable copy on GitHub where you can write, test, and refine your changes. We suggest that you keep your changes small and focused on the issue you submitted.
15+
* **Sign a Contributor License Agreement (CLA):** We require that all outside contributors sign a [CLA](https://en.wikipedia.org/wiki/Contributor_License_Agreement) before we can accept your contribution. When you create a pull request (see below), we'll reach out to you if you do not already have one on file. Essentially, the CLA gives us permission to publish your contribution as part of the repository.
16+
* **Make a pull request:** "[Pull Request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests)" is a confusing term, but it means exactly what it says: You're requesting that the maintainers of the repository pull your changes in. If you don't have a CLA on file, we'll reach out to you. Your contribution will be reviewed, and we may ask you to revise your pull request based on our feedback. Once everyone is satisfied, we'll merge your pull request into the repository.
17+
18+
## Guidelines
19+
20+
We don't have best practices for writing MATLAB&reg; code, but we do have some recommendations:
21+
22+
* You should not have any warnings or errors in the [code analyzer report](http://www.mathworks.com/help/matlab/matlab_prog/matlab-code-analyzer-report.html)
23+
* [Loren Shure's blog](https://blogs.mathworks.com/loren) has [great advice on improving your MATLAB code](https://blogs.mathworks.com/loren/category/best-practice/)
24+
* Examples should be written as [live scripts](https://www.mathworks.com/help/matlab/matlab_prog/what-is-a-live-script-or-function.html) or [Simulink&reg; models](https://www.mathworks.com/help/simulink/index.html).
25+
* We adhere to the [CommonMark](https://commonmark.org/) specification where it does not conflict with GitHub rendering. If you edit your Markdown in Visual Studio Code or a similar editor, it uses [markdownlint](https://github.com/DavidAnson/markdownlint) to highlight issues in your Markdown.
26+
27+
**Again, thanks for contributing, and we look forward to your issues and pull requests!**

Data/.gitkeep

Whitespace-only changes.

FunctionLibrary/.gitkeep

Whitespace-only changes.

FunctionLibrary/checkExercise1.mlx

4.64 KB
Binary file not shown.

HelperFunctions/Navigation.mlx

-154 KB
Binary file not shown.

HelperFunctions/OpenOverview.m

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)