janklab / MatlabProjectTemplate

A template for creating repos for Matlab library and application projects
BSD 3-Clause "New" or "Revised" License
12 stars 1 forks source link
continuous-integration deployment matlab packaging

MatlabProjectTemplate

Travis Build Status CircleCI Build Status Azure Build Status View MatlabProjectTemplate on File Exchange

MatlabProjectTemplate ("MPT") is a template repo for creating Matlab library and application projects. It defines a "standard" project structure that should be suitable for many projects, including those intended for redistribution / open source.

It is suitable for both libraries and applications, and includes coding and organizational conventions that make it safe to use this project's code in a Matlab environment that uses code from other projects, too.

Features

MatlabProjectTemplate supports the following features. You don't have to use any of them; you can just ignore the ones you don't care about. But they're there if you need them! MPT's philosophy is "support but do not require".

Requirements

Just Matlab, for most things.

Building custom Java code requires Mac or Linux plus a Java JDK and Apache Maven. If you're a Java developer, you know how to set theseup.

Usage

To create a new project from this template, go to its repo on GitHub and create a new repo by clicking the green "Use this template" button.

NOTE: Don't "fork" or "clone" the MatlabProjectTemplate repo. That will leave your project's Git repo set up wrong! Do the "Use this template" thing.

Then:

And then:

When you're developing code for your project, you should add the dev-kit/ directory to your Matlab path.

See the User Guide for more information.

Unit tests

You should write unit tests for your project! Use the Matlab Unit Test Framework and put your tests in Mcode/+<myproject>/+test. Run them with make test in the shell or with dev-kit/launchtests.m in Matlab.

License

MatlabProjectTemplate is multi-licensed under all of: BSD 3-Clause License, BSD 2-Clause License, Apache License, MIT License, and GPLv3. You can use it in any project with a license compatible with any of those licenses. This includes commercial and proprietary software, and contemporary postings to MathWorks File Exchange.

If you have a licensing scenario which is not covered by the above (and jeez, what are you doing that would require that?), just contact me, and I'll probably add support for it. My intention is that everybody can use MatlabProjectTemplate.

About MatlabProjectTemplate

MatlabProjectTemplate was written by Andrew Janke.

You can read the online documentation on the project website and or find the code and get support at the repo on GitHub. Bug reports, feature requests, and other feedback are welcome.

See the FAQ or the stuff in the MatlabProjectTemplate/doc directory for more info.