Skip to content

Commit 1f8deea

Browse files
committed
Update to structure
1 parent 701e8f1 commit 1f8deea

File tree

120 files changed

+987
-107
lines changed

Some content is hidden

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

120 files changed

+987
-107
lines changed

.gitattributes

Lines changed: 6 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
11+
*.mlx binary merge=mlAutoMerge linguist-language=MATLAB
1212
*.p binary
1313
*.sfx binary
1414
*.sldd binary
@@ -26,3 +26,7 @@
2626
*.pdf binary
2727
*.png binary
2828
*.xlsx binary
29+
30+
# Ignore HTML
31+
32+
*.html linguist-detectable=false

.gitignore

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,48 @@
11
# List of untracked files to ignore
2+
3+
# Autosave files
4+
*.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
18+
*.zip
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

.gitlab-ci.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
stages:
2+
# Set up two testing paths
3+
- setup
4+
- test
5+
- release
6+
7+
setup-job:
8+
tags:
9+
- matlab
10+
stage: setup
11+
script:
12+
- cd ..
13+
- if (test-path utilities) { rm -r -force utilities }
14+
- git clone [email protected]:modular-curriculum-content/utilities.git
15+
- cd $CI_PROJECT_NAME
16+
allow_failure: false
17+
18+
19+
smoke-test:
20+
# Smoke tests should run all the time
21+
tags:
22+
# Add additional tags like (e.g. - arduino) as required
23+
# Make sure that the runner you plan to use matches the tags
24+
- matlab
25+
stage: test
26+
script:
27+
- matlab -batch "openProject(pwd);
28+
results = runtests(fullfile('SoftwareTests','SmokeTests.m'));
29+
disp(table(results)); assertSuccess(results);"
30+
when: always
31+
allow_failure: true
32+
33+
smoke-test-solution:
34+
tags:
35+
- matlab
36+
stage: release
37+
script:
38+
- matlab -batch "proj = openProject(pwd);
39+
addpath(genpath(proj.RootFolder));
40+
results = runtests(fullfile('InternalFiles','Tests','CI','SolnSmokeTests.m'));
41+
disp(table(results)); assertSuccess(results);"
42+
rules:
43+
# This test should always run when merging to main
44+
# And be available for manual running on any push
45+
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
46+
when: always
47+
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH
48+
when: manual
49+
allow_failure: true
50+
51+
file-test:
52+
tags:
53+
- matlab
54+
stage: release
55+
script:
56+
- matlab -batch "proj = openProject(pwd);
57+
addpath(proj.RootFolder+'/InternalFiles/Tests/CI');
58+
results = runtests('OpenCloseFileTest.m');
59+
disp(table(results)); assertSuccess(results);"
60+
rules:
61+
# This test should always run when merging to main
62+
# And be available for manual running on any push
63+
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
64+
when: always
65+
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH
66+
when: manual
67+
allow_failure: true
68+
69+
release-testing:
70+
tags:
71+
- matlab
72+
stage: release
73+
script:
74+
- matlab -batch "proj = openProject(pwd);
75+
cd ..;
76+
addpath(genpath(fullfile('utilities','TestingResources')));
77+
runCMTests"
78+
rules:
79+
# This test should always run when merging to main
80+
# And be available for manual running on any push
81+
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
82+
when: always
83+
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH
84+
when: manual
85+
allow_failure: true

Apps/RandomVariableApp.mlapp

202 KB
Binary file not shown.

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® 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® 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.

Images/AddOnsIcon.png

1.1 KB
Loading

Images/EndIcon.png

955 Bytes
Loading

Images/IntroProbIcon.png

29.9 KB
Loading

Images/OpenInFX.png

2.13 KB
Loading

0 commit comments

Comments
 (0)