Closed j-emberton closed 3 weeks ago
I've had an initial look at modularising and testing cpdBootstrap.
I think the use of varargin in some functions is breaking the regression tests somehow. The problem is that 'Stats2' can no longer be interrogated properly. However all unit tests pass.
Would appreciate a 2nd pair of eyes on it.
I've had an initial look at modularising and testing cpdBootstrap.
I think the use of varargin in some functions is breaking the regression tests somehow. The problem is that 'Stats2' can no longer be interrogated properly. However all unit tests pass.
Would appreciate a 2nd pair of eyes on it.
It turns out that the output Stats2
is a double string '"..."'
, so after json decoding it's still a string.
It's because in setup_Stats.m
you added
if size(varargin)>0;
Stats = jsonencode(Stats);
end
And in the cpdBootstrap....m
file there is also another jsonencode
if size(varargin) > 0
.
Hm my tests are failing with a lot of Undefined function 'XXX' for input arguments of type 'int64'
(or `double').
Still tests failing after your commit @tztsai , it's just different tests now. Did you run the test suite before you committed your change?
The tests were passed on my machine
I run 58 tests, whereas you have only run 52. Have you synced all tests locally?
It's up to date with origin. But I only ran the unit tests. Now there are 58 tests.
It's up to date with origin. But I only ran the unit tests. Now there are 58 tests.
Do they all pass?
Some of them failed because of this error. It's due to the getfield
function and seems unrelated to Stats
. Others are due to the extra input arguments to setup_Stats
in the test, so I restored the varargin
in setup_Stats
. Current only the dot indexing errors are left.
Some of them failed because of this error. It's due to the
getfield
function and seems unrelated toStats
. Others are due to the extra input arguments tosetup_Stats
in the test, so I restored thevarargin
insetup_Stats
. Current only the dot indexing errors are left.
Have you looked at the cpdAssign function? There's a section in it where it parses the stats2 data to extract certain fields. I think that's where it's failing.
@dorchard , did you say you had written some comments on this PR. I don't see any here.
@dorchard , did you say you had written some comments on this PR. I don't see any here.
Sorry forgot to submit the review. Done now.
all tests pass
I think we can merge this now.
initial modularisation of 'cpdBootstrap'
Currently breaks regression tests - unknown why
Added pytest-xdist to parallelise running of tests (currently set to 1 in pyproject.toml)