Skip to content
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
1 change: 1 addition & 0 deletions .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Test the toolbox across all supported releases of MATLAB, package toolbox, create release
# Adapted from: https://github.com/mathworks/climatedatastore/blob/main/.github/workflows/release.yml
# See the THIRD_PARTY_NOTICES.md file distributed with MatBox for license terms.

name: Create new release

Expand Down
3 changes: 3 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Portions of this software are adapted from third-party code and are subject
to the original license terms; see THIRD_PARTY_NOTICES.md.
52 changes: 52 additions & 0 deletions THIRD_PARTY_NOTICES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Third-Party Notices

MatBox is licensed under the MIT License (see [LICENSE](LICENSE)), with the
exception of the portions listed below, which are adapted from third-party
code and remain subject to the original license terms reproduced here.

## mathworks/climatedatastore

The following files are adapted from build utilities and workflows in
[mathworks/climatedatastore](https://github.com/mathworks/climatedatastore),
Copyright (c) 2021-2022, The MathWorks, Inc.:

| MatBox file | Adapted from |
|---|---|
| `code/+matbox/+tasks/testToolbox.m` | `buildUtilities/testToolbox.m` |
| `code/+matbox/+tasks/codecheckToolbox.m` | `buildUtilities/codecheckToolbox.m` |
| `code/+matbox/+tasks/packageToolbox.m` | `buildUtilities/packageToolbox.m` |
| `code/+matbox/+tasks/createTestedWithBadgeforToolbox.m` | `buildUtilities/badgesforToolbox.m` |
| `code/+matbox/+utility/updateVersionNumber.m` | `buildUtilities/packageToolbox.m` |
| `code/+matbox/+utility/writeBadgeJSONFile.m` | `buildUtilities/writeBadgeJSONFile.m` |
| `.github/workflows/create_release.yml` | `.github/workflows/release.yml` |

These portions are distributed under the following license. Note that, per
condition 3, modifications and derivatives of this code are licensed solely
for use in conjunction with MathWorks products and service offerings; MatBox
is a MATLAB toolbox and is used exclusively with MATLAB.

```text
Copyright (c) 2021-2022, The MathWorks, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. In all cases, the software is, and all modifications and derivatives of
the software shall be, licensed to you solely for use in conjunction with
MathWorks products and service offerings.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
```
5 changes: 5 additions & 0 deletions code/+matbox/+tasks/codecheckToolbox.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
function issues = codecheckToolbox(projectRootDir, options)
% codecheckToolbox - Run MATLAB code analysis on project source files
%
% Adapted from: https://github.com/mathworks/climatedatastore/blob/main/buildUtilities/codecheckToolbox.m
% See the THIRD_PARTY_NOTICES.md file distributed with MatBox for license terms.

arguments
projectRootDir (1,1) string {mustBeFolder}
options.CreateBadge (1,1) logical = true
Expand Down
3 changes: 2 additions & 1 deletion code/+matbox/+tasks/createTestedWithBadgeforToolbox.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ function createTestedWithBadgeforToolbox(versionNumber, projectRootDirectory)
%createTestedWithBadgesforToolbox - Take the test reports from the runs against
% multiple MATLAB releases, and generate the "Tested with" badge
%
% Adapted from: https://github.com/mathworks/climatedatastore/tree/main/buildUtilities
% Adapted from: https://github.com/mathworks/climatedatastore/blob/main/buildUtilities/badgesforToolbox.m
% See the THIRD_PARTY_NOTICES.md file distributed with MatBox for license terms.

arguments
versionNumber (1,1) string
Expand Down
1 change: 1 addition & 0 deletions code/+matbox/+tasks/packageToolbox.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
% e.g. "RootFilesToPackage": ["LICENSE", "THIRD_PARTY_NOTICES.md"].
%
% Adapted from: https://github.com/mathworks/climatedatastore/blob/main/buildUtilities/packageToolbox.m
% See the THIRD_PARTY_NOTICES.md file distributed with MatBox for license terms.

% Todo:
% [聽] Create a matlab script that fills in toolbox options for path
Expand Down
6 changes: 4 additions & 2 deletions code/+matbox/+tasks/testToolbox.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
function testToolbox(projectRootDirectory, options)
%RUNTESTWITHCODECOVERAGE Summary of this function goes here
% Detailed explanation goes here
% testToolbox - Run project test suites with coverage and test reports
%
% Adapted from: https://github.com/mathworks/climatedatastore/blob/main/buildUtilities/testToolbox.m
% See the THIRD_PARTY_NOTICES.md file distributed with MatBox for license terms.

arguments
projectRootDirectory (1,1) string {mustBeFolder}
Expand Down
1 change: 1 addition & 0 deletions code/+matbox/+utility/updateVersionNumber.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
% updateVersionNumber - Utility function to update a version number
%
% Adapted from: https://github.com/mathworks/climatedatastore/blob/main/buildUtilities/packageToolbox.m
% See the THIRD_PARTY_NOTICES.md file distributed with MatBox for license terms.

arguments
previousVersion string {mustBeTextScalar} = "";
Expand Down
3 changes: 2 additions & 1 deletion code/+matbox/+utility/writeBadgeJSONFile.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ function writeBadgeJSONFile(label, message, color, projectRootDirectory, options
% necessary. The badge information is encoded as a JSON string and written
% to a file in the specified directory.
%
% CREDIT: https://github.com/mathworks/climatedatastore/tree/main/buildUtilities
% Adapted from: https://github.com/mathworks/climatedatastore/blob/main/buildUtilities/writeBadgeJSONFile.m
% See the THIRD_PARTY_NOTICES.md file distributed with MatBox for license terms.

arguments
label (1,1) string
Expand Down
1 change: 1 addition & 0 deletions tools/MLToolboxInfo.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"Namespace" : "matbox",
"RootFilesToPackage": ["LICENSE", "THIRD_PARTY_NOTICES.md"],
"ToolboxOptions": {
"Identifier": "dedfd78a-8fd1-4fca-9db3-f5eff64c7a88",
"ToolboxName": "MatBox",
Expand Down
Loading