Skip to content

Follow MATLAB Toolbox Best Practices #95

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 10, 2023
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
21 changes: 0 additions & 21 deletions .github/workflows/octave-tests.yml

This file was deleted.

20 changes: 20 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Tests

on:
workflow_dispatch:
pull_request:
push:
branches: [master]

jobs:
octave:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Install Octave
run: |
sudo apt-get update
sudo apt-get install -y octave
- name: Run OTP tests
run: octave --eval "addpath(genpath('.')); runalltests"
4 changes: 2 additions & 2 deletions OTP.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
properties (Access = private, Constant)
Octave = exist('OCTAVE_VERSION', 'builtin') > 0
Name = 'ODE Test Problems';
SrcDir = 'src';
SrcDir = 'toolbox';
BuildDir = 'build';
end

Expand All @@ -18,7 +18,7 @@ function build()
OTP.processFiles(OTP.SrcDir, fullfile(OTP.BuildDir, 'inst'), ...
{}, {});
copyfile('DESCRIPTION', OTP.BuildDir);
copyfile('LICENSE', fullfile(OTP.BuildDir, 'COPYING'));
copyfile('license.txt', fullfile(OTP.BuildDir, 'COPYING'));
zip(OTP.packagePath(), OTP.BuildDir);
else
OTP.processFiles(OTP.SrcDir, OTP.BuildDir, ...
Expand Down
7 changes: 2 additions & 5 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,12 @@ html: problems
problems:
python3 generate_problem_rst.py

problems: clean
mkdir -p build/problems
python3 generate_problem_rst.py

install:
pip3 install -r requirements.txt

serve:
sphinx-autobuild "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) --watch ../src --pre-build 'make problems' --re-ignore '$(PROBLEMSDIR)/*'
sphinx-autobuild "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) --watch '../toolbox' --pre-build 'make problems' \
--re-ignore '$(PROBLEMSDIR)/*'

clean:
rm -rf $(BUILDDIR) $(PROBLEMSDIR)
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
]

primary_domain = 'mat'
matlab_src_dir = '../src'
matlab_src_dir = '../toolbox'
matlab_keep_package_prefix = False

autodoc_default_options = {
Expand Down
2 changes: 1 addition & 1 deletion docs/generate_problem_rst.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
for file in problem_dir.glob('*'):
file.unlink()

for problem in cwd.glob('../src/+otp/*/*Problem.m'):
for problem in cwd.glob('../toolbox/+otp/*/*Problem.m'):
with problem.open() as stream:
problem_name = search("@otp\\.Problem\\('(.+)',",
stream.read()).groups()[0]
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ TODO: put abstract here

contributing
GitHub <https://github.com/ComputationalScienceLaboratory/ODE-Test-Problems>
License <https://github.com/ComputationalScienceLaboratory/ODE-Test-Problems/blob/master/LICENSE>
License <https://github.com/ComputationalScienceLaboratory/ODE-Test-Problems/blob/master/license.txt>
references
File renamed without changes.
File renamed without changes
File renamed without changes.
2 changes: 1 addition & 1 deletion src/tests/getpresets.m → tests/getpresets.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function presets = getpresets()

entry = "+otp/";
entry = "toolbox/+otp/";

if isempty(dir(entry))
entry = dir(which('otp.RHS'));
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.