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

Issue 479 template customization #482

Merged
merged 8 commits into from
Mar 9, 2019
Merged

Issue 479 template customization #482

merged 8 commits into from
Mar 9, 2019

Conversation

hallvard
Copy link
Contributor

@hallvard hallvard commented Mar 7, 2019

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.

@hallvard
Copy link
Contributor Author

hallvard commented Mar 7, 2019

The test succeeds when run locally using mvn clean test. jsplot defines the following dependency on junit:

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>

@benmccann
Copy link
Collaborator

Not anymore: https://github.com/jtablesaw/tablesaw/blob/master/jsplot/pom.xml#L65

We just upgraded to junit 5. Can you rebase against master?

@hallvard
Copy link
Contributor Author

hallvard commented Mar 7, 2019

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"

@hallvard
Copy link
Contributor Author

hallvard commented Mar 7, 2019

Strange, when I turned off VPN I suddenly could fetch the latest changes.

@hallvard
Copy link
Contributor Author

hallvard commented Mar 7, 2019

I use Assertions.assertTrue, isn't that good enough?

@benmccann
Copy link
Collaborator

Perhaps it doesn't have great support for junit 5 yet. Everywhere else we statically import assertTrue and I'm guessing that makes it happier. Can you try that?

}

public void setPlotlyJsLocation(String plotlyJsLocation) {
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

Copy link
Collaborator

@lwhite1 lwhite1 left a 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?

@hallvard
Copy link
Contributor Author

hallvard commented Mar 8, 2019

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.

@hallvard
Copy link
Contributor Author

hallvard commented Mar 8, 2019

I seemed to work as expected, I could use a different template located in the Eclipse workbench instead of the jsplot jar!

@lwhite1 lwhite1 merged commit d12526a into jtablesaw:master Mar 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants