Skip to content
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

projections.xml and sspsTemplate.xsl do not match #14

Open
mdales opened this issue Jul 3, 2019 · 7 comments
Open

projections.xml and sspsTemplate.xsl do not match #14

mdales opened this issue Jul 3, 2019 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@mdales
Copy link

mdales commented Jul 3, 2019

In sspsTemplate.xsl we are looking for XML of the form:

 <horizontallines>
  <g xmlns="http://www.w3.org/2000/svg">
   <line x1="0.0" y1="43.0" x2="1277.0" y2="43.0" style="stroke:black;stroke-width:1.0;"/>
  </g>
  <g xmlns="http://www.w3.org/2000/svg">
   <line x1="782.0" y1="413.0" x2="1262.0" y2="413.0" style="stroke:black;stroke-width:1.0;"/>
  </g>
 </horizontallines>

But in the generated projections.xml we have:

 <g class="horizontallines" xmlns="http://www.w3.org/2000/svg">
  <line x1="0.0" y1="33.0" x2="1266.0" y2="33.0" style="stroke:red;stroke-width:2.0;"/>
  <line x1="758.0" y1="310.0" x2="1252.0" y2="310.0" style="stroke:red;stroke-width:2.0;"/>
 </g>

As a result the ami-forestplot --segment stage fails, as there are missing border values.

@mdales mdales added the bug Something isn't working label Jul 3, 2019
@mdales
Copy link
Author

mdales commented Jul 3, 2019

I have a fix for this @petermr what do you want me to do with it?

@petermr
Copy link
Member

petermr commented Jul 3, 2019

I am currently working with stata forest plots and the second projections.xml is the latest version. The extraction of lines is messy and depends on thresholds. I want to get it working for stata and then transfer the logic to spss. Ideally it should be possible to create a single stylesheet with different modes.
The problem is that the 'ami-imageis in flux and I am updating thestatabut nospss`.

Is this critical? does a build fail? Or a test corpus? If so I can address it. But the current problem is getting the right projections.xml content!

@mdales
Copy link
Author

mdales commented Jul 3, 2019

Yes, changes like this, where you break thing to move forward, do stop me moving forward.

Breaking changes should only hit master once complete and tested - you actually have tests this breaks, so it should be obvious, no (AMIForestPlotTest.java spss tests surely must fail?)

I've been tasked currently with trying to come up with some way of repeatedly running PDFs through and I can't do that if master breaks so significantly.

@petermr
Copy link
Member

petermr commented Jul 3, 2019 via email

@petermr
Copy link
Member

petermr commented Jul 3, 2019 via email

@petermr
Copy link
Member

petermr commented Jul 5, 2019

Thanks @mdales
This was not a Java test issue - it was running the script in

/normami/src/test/java/org/contentmine/ami/tools/testStack.sh

this tests the ?Stata? files. I will amend the stylesheet so that it passes and alert you.
see
/normami/src/main/resources/org/contentmine/ami/tools/stataTemplate1.xsl
and will merge both

Michael,
where is the script you are running?

@petermr
Copy link
Member

petermr commented Jul 5, 2019

The following test in AMIForestPlotTest will be run before push'ing

	@Test
	public void testRegression() {
		testSPSSSimple();
		testStataSegmentAndAssert();
		testStataStack();
	}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants