Closed in3otd closed 9 years ago
nice.
would it be possible to compare the print results against a reference? i suspect a glitch in axis ranges in dbS11 of sparam.sch (still in dbd3376). it would be of great advantage to catch things like that immediately...
This looks good! Allow me some more time to test it. Some of the print failures are crashes in qucs
...
I will try to get a better backtrace than this:
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 org.qucs 0x000000010ad14047 QHash<QString, QString>::value(QString const&) const + 23
1 org.qucs 0x000000010ad13c8c 0x10ac0b000 + 1084556
Some remarks:
run.py
.If we default to .png (or allow to pass a suffix as parameter) we could use some sort of visual regression test against reference images. We could use .pdf as well, but it might need to be rasterized to be able to get pixel differences.
Something like this: http://twolfson.com/2014-02-25-visual-regression-testing-in-travis-ci http://www.imagemagick.org/script/compare.php http://tex.stackexchange.com/questions/36351/comparing-the-output-of-two-pdfs
I don't know what changed since then with the qucs --print
but I recall (a9dd434) an issue that older schematics would not print. Doing a load-print was giving different results than load-save-print.
I noticed some trailing white-space in
run.py
oops! forgot to clean that up...
It does not abort (ctrl+c) after script is fired up?
yes, it does not. AFAIU, I think it's due to the fact that it always uses multiprocessing
(even for a single process), so you have to manually kill the main process to terminate all the threads, at present.
I saw there are several proposed solutions around, but apparently no one really working in all cases, need to try some and see.
I didn't know about the visual regression testing with Travis, looks quite interesting. It will make sense to move to .png
anyway, I wanted to add a command-line option to select the output format... later.
As you saw, many of the schematics in skip-print.txt
can actually be printed now, but I didn't check if the output is correct, though.
A question I had since some time is whether the visual appearance of the schematics is actually the same on all platforms; some of the test schematics have components (simulations, equations, text) which partly superposes, as if they were smaller when the schematics was created.
Printing (this PR) or netlisting raises the gives crash reported by @ra3xdh in https://github.com/Qucs/qucs/issues/333.
The crashes should be fixed with https://github.com/Qucs/qucs/pull/351
Adding the file format options sound like a nice idea. I was thinking about using subparser with argparse to improve the CLI commands.
The schematic and the printed version are slightly different... not sure why.
I have expanded the print function to generate a small report, similar to the one used for
qucsator
, in order to have a summary of the results and check easily if some of the print failed. Similarly, twoqucs
versions can be compared for the print output. At present there is no reference result for printing, but only the comparison table is generated. Not sure how we could compare the print output, as we should probably allow for some "fuzzy factor". I have also fixed a couple of small things around.The comparison report for print looks like this:
the comparison is between the current
qucs
and the one before https://github.com/felix-salfelder/qucs/commit/dbd3376652d815bea86bb0a142f8012386d6db7f and you can see the failing S-parameters diagram printing there.The overall code is not really nice but seems to work. It seems I didn't break anything in the existing code, but please double check.