-
Notifications
You must be signed in to change notification settings - Fork 245
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
Simple quality measurement tool - Java adaptation #563
base: development
Are you sure you want to change the base?
Simple quality measurement tool - Java adaptation #563
Conversation
This version's Mxl.Input closes the underlying resources, allowing regression test execution to clean up afterwards
This frees the underlying log file, allowing regression test execution to clean up afterwards
Java/Junit adaptation of PR by Alexander Myltsev (@avm). Test cases can be configured using ConversionScoreTestCase.java. Tests are executed using ConversionScoreRegressionTest.java. The similarity of actual output and expected output is calculated in ScoreSimilarity.java.
As provided in PR Audiveris#122 by Alexander Myltsev (@avm).
Hi Peter, First I need to apologize:
I had a look at your Java code. I'd suggest you limit source line length at 100 characters, it's a minor point but it would make code reading much more comfortable for me. I'm sure you can ask your IDE to take care of this automagically. Then, I checked out your PR to test it locally. I did so via a Running test ConversionScoreRegressionTest failed with an exception.
Reading the code around line 170, I understand that the program did not find a .xml file, but which one precisely? I opened a file manager and there is indeed a input.mxl file in build/resources/test/conversion/score/01-klavier folder I'd suggest you modify I need some help. |
Hard wrap at 100 chars.
Hi Hervé,
you don't have to apologize. I think it's wonderful that you put your time into this project, especially helping others with their needs :)
Sure, I set a hard wrap at 100 characters and reformatted my changes again. I initially spent some time configuring IntelliJ to autoformat consistently to the existing code, but here and there deviations still exist.
Good point, thanks for the suggestion. All asserts now have a (hopefully understandable) message. I'm surprised that the test is failing for you. I just successfully tried it with Github CLI and a clean copy of Audiveris. I'm working on Windows with jdk 17.0.2 installed. I used exactly these commands: gh repo clone https://github.com/Audiveris/audiveris
cd audiveris
gh pr checkout 563
gradlew test --tests conversion.score.ConversionScoreRegressionTest --rerun-tasks The test command produces the following output:
Maybe this helps :) |
Hi Peter, I repeated exactly the same commands as yours:
I'm puzzled by this Now, the exception is raised on the line 184 below:
I'm a bit lost. |
Hold on, I think the problem is on my side. |
OK, the guilty item is the constant BookManager.useInputBookFolder whose text tip is "Should we store book outputs next to book input?" I use that strategy a lot to organize files related to Audiveris issues. For example, say Issue 123 relates to foo.pdf and bar.pdf files, then I create an Issue-123 folder into which I store foo.pdf and bar.pdf. Then all processing files related to these input files will be stored in the same Issue-123 folder. By default (your case) the switch is set to false, in my case it was set to true. Hence the "file not found" errors. In my defense :-(, I can say that I created issue #555 on this point, last February. And it is still on the TODO list... So now, I can successfully run your test case. |
Hi Peter, So, we have to be careful on results analysis.
Today, Audiveris project is published with a small number of score examples, located in
More generally, I think your work can be the basis for something we lack today in Audiveris project: a "continuous integration" à la Jenkins. Is it something you are familiar with (or simply interested in) and could take the lead on? |
Hi Hervé,
Perfect! 😃
You are right, I understand the benefits. I think it would be possible to store test outputs in subfolders of the
We have to find the output file nevertheless. Is using
The conversion scores will certainly go up and down over time. The score for the
I think this is a good idea for starting with these kind of tests 👍
The original author (of the equivalent PR in python) decided to provide an
Yes! 😄 I created a discussion for that: #581 Looking forward to hearing your thoughts 👍 |
The |
This is the Java/Junit adaptation of #122:
The proposed workflow is this (updated):
src/test/resources/conversion/score
(source.png or source.pdf and target.xml);conversion.score.ConversionScoreRegressionTest
;