Open apjanke opened 8 months ago
It's running through the files recursively and I think alphabetically. calendarDuration
is the first classdef file it's hitting. Then categorical
. I'm wondering if my use of "@node calendarDuration.unique
or @node categorical.removecats
is confusing it?
Like, these errors for calendarDuration.unique? I don't have those statements anywhere in my calendarDuration code. The word "stable" doesn't appear in the whole calendarDuration.m
file. I wonder if it's running the tests for regular Octave unique
instead here. And in categorical, it thinks it's a package, because... ???
calendarDuration.unique ................................ FAIL 4/4
>> unique ([3, 1, 1, 2])
expected: [1, 2, 3]
got : ans =
1 2 3
>> unique ([3, 1, 1, 2], "stable")
expected: [3, 1, 2]
got : ans =
3 1 2
Kinda looks the same for the core unique
function. And I see corresponding @example
blocks in its code.
>> doctest unique
Doctest v0.8.0: this is Free Software without warranty, see source.
unique ................................................. FAIL 4/4
>> unique ([3, 1, 1, 2])
expected: [1, 2, 3]
got : ans =
1 2 3
>> unique ([3, 1, 1, 2], "stable")
expected: [3, 1, 2]
got : ans =
3 1 2
Yeah, I think something like that. Here's the code in doctest's doctest_collect()
where that erorr for categorical
is being raised.
function [docstring, error] = extract_docstring(name)
if is_octave()
[docstring, format] = get_help_text(name);
if strcmp(format, 'texinfo')
[docstring, error] = parse_texinfo(docstring);
In execution:
>> dbstop if error
>> doctest categorical
Doctest v0.8.0+: this is Free Software without warranty, see source.
error: unknown package 'categorical'
error: called from
<unknown>
doctest_collect>extract_docstring at line 367 column 25
doctest_collect>collect_targets_class at line 330 column 38
doctest_collect at line 167 column 11
doctest at line 356 column 11
stopped in doctest_collect>extract_docstring at line 367 [/Users/janke/repos/octave-doctest/inst/private/doctest_collect.m]
367: [docstring, format] = get_help_text(name);
debug> whos
Variables visible from the current scope:
variables in scope: extract_docstring: /Users/janke/repos/octave-doctest/inst/private/doctest_collect.m
Attr Name Size Bytes Class
==== ==== ==== ===== =====
f name 1x19 19 char
Total is 19 elements using 19 bytes
debug> name
name = categorical.missing
debug>
Looks like Octave's get_help_text
doesn't like categorical.missing
, maybe due to something special about the name "missing"? The categorical.undefined
right next to it works okay.
>> [docstring, format] = get_help_text('categorical.missing')
error: unknown package 'categorical'
error: called from
<unknown>
>> [docstring, format] = get_help_text('categorical.undefined')
docstring =
@node categorical.undefined
@deftypefn {Static Method} {@var{out} =} categorical.undefined ()
@deftypefnx {Static Method} {@var{out} =} categorical.undefined (sz)
Create an array of undefined categoricals.
Creates a categorical array whose elements are all <undefined>.
@var{sz} is the size of the array to create. If omitted or empty, creates
a scalar.
Returns a categorical array.
@seealso{categorical.missing}
@end deftypefn
format = texinfo
>>
Running
doctest
on Tablicious raises some test failures. I'm not familiar with doctest, so I don't know exactly what's going on here. Check them out.The failures
The doctest output is really long, but here's what I see skimming through it. Full output attached.
TODO
References
octave-doctest
repo on GitHubdoctest
OF package doco