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

Updated API, added tests, docs, export_html method and generate_html method #104

Merged
merged 10 commits into from
Jul 22, 2018

Conversation

Prakriti-nith
Copy link
Contributor

@Prakriti-nith Prakriti-nith commented Jul 5, 2018

Right now, data is converted in the form of html table. I have shifted it to javascript array for the further server-side implementation (as datatable can take Array of Array). I will execute the server-side implementation (to load large set of data piece by piece) in this PR too. Parallel changes will be done accordingly in daru-datable in a separate PR.
I am also trying to resolve this issue. In this PR data is set correctly in the javascript array but the column names are overlapping for multiple tables.

@Prakriti-nith
Copy link
Contributor Author

This PR runs in parallel with changes in daru-data_tables#20. Those changes are not reflected here and will be seen after that PR gets merged. So some of the test cases failed due to that.
Fixes issue daru-data_tables#19. Now, datatable is working fine with javascript array as:

dt3

@Prakriti-nith
Copy link
Contributor Author

I have updated the implementation to load a large set of data here. As the changes are in parallel in both the PRs, some of the tests will not pass.

@Prakriti-nith
Copy link
Contributor Author

I haven't added tests for generate_html as generate_html and export_html_file will then have the redundant tests. I am adding the tests for to_html in daru-data_tables.

@coveralls
Copy link

coveralls commented Jul 12, 2018

Pull Request Test Coverage Report for Build 609

  • 37 of 99 (37.37%) changed or added relevant lines in 2 files are covered.
  • 14 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.6%) to 97.608%

Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/daru/view/adapters/datatables.rb 2 12 16.67%
spec/adapters/datatables_spec.rb 35 87 40.23%
Files with Coverage Reduction New Missed Lines %
lib/daru/view/adapters/datatables.rb 1 93.55%
spec/table_spec.rb 6 100.0%
spec/adapters/datatables_spec.rb 7 100.0%
Totals Coverage Status
Change from base Build 608: 0.6%
Covered Lines: 1061
Relevant Lines: 1087

💛 - Coveralls

@Prakriti-nith Prakriti-nith changed the title [WIP] Use javascript Array rather than html table in DataTables Use javascript Array rather than html table in DataTables Jul 14, 2018
@Shekharrajak
Copy link
Member

I haven't added tests for generate_html as generate_html and export_html_file will then have the redundant tests. I am adding the tests for to_html in daru-data_tables.

We should have testcases calling datatables adaptor here as well.

@Prakriti-nith
Copy link
Contributor Author

@Shekharrajak I have added the test cases in this PR also.

@Prakriti-nith
Copy link
Contributor Author

In this PR, I have updated the API, added docs and tests and added export_html and generate_html methods.
Below are the screenshots of the examples:
ddt1
ddt2

@Prakriti-nith Prakriti-nith changed the title Use javascript Array rather than html table in DataTables Updated API, added tests, docs, export_html method and generate_html method Jul 22, 2018
Copy link
Member

@Shekharrajak Shekharrajak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Please write examples and update the Wiki page accordingly.

Thanks!

@Shekharrajak Shekharrajak merged commit b3251fc into SciRuby:master Jul 22, 2018
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