Skip to content

Commit e5620a8

Browse files
committed
Documentation for mp_disp(), mp_printf(), mp.logger.
1 parent 0aaa988 commit e5620a8

16 files changed

Lines changed: 99 additions & 17 deletions

File tree

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ of MATLAB or Octave, including setting up your MATLAB/Octave path.
3636
t_test_fcns.......ok
3737
t_debug_assert....ok
3838
t_have_feature....ok
39-
All tests successful (37 of 37)
40-
Elapsed time 0.13 seconds.
39+
t_mp_logger.......ok
40+
All tests successful (51 of 51)
41+
Elapsed time 0.20 seconds.
4142
```
4243

4344
Usage
@@ -273,14 +274,14 @@ particular function.
273274
(all char arrays). Calling `mptestver` without assigning the return value
274275
prints the version and release date of the current installation of MP-Test.
275276

276-
- __mp.disp__ — drop-in replacement for `disp()`
277+
- __mp_disp__ — drop-in replacement for `disp()`
277278
```
278279
mp_disp(obj)
279280
```
280281
Optionally redirects the output of `disp()` to a file via an `mp.logger`
281282
object, or elsewhere via a custom `mp.logger` subclass.
282283

283-
- __mp.printf__ — drop-in replacement for `fprintf()`
284+
- __mp_printf__ — drop-in replacement for `fprintf()`
284285
```
285286
mp_printf(format_str, arg1, ...)
286287
mp_printf(fid, format_str, arg1, ...)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.. currentmodule:: mptest.+mp
2+
3+
:raw-html:`<div style="float: right"><a href="https://github.com/MATPOWER/mptest/blob/master/lib/+mp/logger.m" target=_blank><svg height="32" aria-hidden="true" viewBox="0 0 16 16" version="1.1" width="32" data-view-component="true" class="octicon octicon-mark-github v-align-middle color-fg-default"><path d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path></svg></a></div>`
4+
5+
mp.logger
6+
---------
7+
8+
.. autoclass:: logger
9+
:show-inheritance:
10+
:members:
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.. currentmodule:: mptest
2+
3+
:raw-html:`<div style="float: right"><a href="https://github.com/MATPOWER/mptest/blob/master/lib/mp_disp.m" target=_blank><svg height="32" aria-hidden="true" viewBox="0 0 16 16" version="1.1" width="32" data-view-component="true" class="octicon octicon-mark-github v-align-middle color-fg-default"><path d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path></svg></a></div>`
4+
5+
mp_disp
6+
-------
7+
8+
.. autofunction:: mp_disp
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.. currentmodule:: mptest
2+
3+
:raw-html:`<div style="float: right"><a href="https://github.com/MATPOWER/mptest/blob/master/lib/mp_printf.m" target=_blank><svg height="32" aria-hidden="true" viewBox="0 0 16 16" version="1.1" width="32" data-view-component="true" class="octicon octicon-mark-github v-align-middle color-fg-default"><path d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path></svg></a></div>`
4+
5+
mp_printf
6+
---------
7+
8+
.. autofunction:: mp_printf
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.. currentmodule:: mptest
2+
3+
:raw-html:`<div style="float: right"><a href="https://github.com/MATPOWER/mptest/blob/master/lib/t/t_mp_logger.m" target=_blank><svg height="32" aria-hidden="true" viewBox="0 0 16 16" version="1.1" width="32" data-view-component="true" class="octicon octicon-mark-github v-align-middle color-fg-default"><path d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path></svg></a></div>`
4+
5+
t_mp_logger
6+
-----------
7+
8+
.. autofunction:: t_mp_logger

docs/sphinx/source/index.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,11 @@ of MATLAB or Octave, including setting up your MATLAB/Octave path.
4545

4646
>> test_mptest
4747
t_test_fcns.......ok
48+
t_debug_assert....ok
4849
t_have_feature....ok
49-
All tests successful (29 of 29)
50-
Elapsed time 0.18 seconds.
50+
t_mp_logger.......ok
51+
All tests successful (51 of 51)
52+
Elapsed time 0.20 seconds.
5153

5254

5355
Usage
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../../../lib/+mp/logger.m
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../../lib/mp_disp.m
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../../lib/mp_printf.m
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../../lib/t/t_mp_logger.m

0 commit comments

Comments
 (0)