-
Notifications
You must be signed in to change notification settings - Fork 646
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
Issue 479 template customization #482
Issue 479 template customization #482
Conversation
The test succeeds when run locally using mvn clean test. jsplot defines the following dependency on junit:
|
Not anymore: https://github.com/jtablesaw/tablesaw/blob/master/jsplot/pom.xml#L65 We just upgraded to junit 5. Can you rebase against master? |
Hm, for some reason I don't get the changes, I'm told my upstream/master branch pointing to https://github.com/jtablesaw/tablesaw.git is up-to-date and the last commit I see is "Use static imports for junit asserts" |
Strange, when I turned off VPN I suddenly could fetch the latest changes. |
I use Assertions.assertTrue, isn't that good enough? |
Perhaps it doesn't have great support for junit 5 yet. Everywhere else we statically import |
} | ||
|
||
public void setPlotlyJsLocation(String plotlyJsLocation) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we remove this since it's unused and make plotlyJsLocation
final?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course, with a builder it is nonsense.
setter (since we use a builder).
global variable, but at least we validate the technique of using DelegatingLoader and FileLoader.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hallvard i take it you decided against setting a loader in the builders. Is this good to go then?
I thought about several designs, one involved a global (singleton) TemplateManager that configured the engine and loader and that had the setTemplateLocations method. But I couldn't come up with other reasons for exposing the engine and loader than this method, so I decided on just introducing the method as a start. We can still keep the method if we need to introduce a (replaceable) singleton later. I haven't tried the method it in Eclipse, yet, but will do it now. |
I seemed to work as expected, I could use a different template located in the Eclipse workbench instead of the jsplot jar! |
property.
Thanks for contributing.
Description
Modified the template to support setting location of plotly js library, and Page and PageBuilder accordingly.
Testing
There are tests for both cases, the default and custom cases.