signac-dashboard icon indicating copy to clipboard operation
signac-dashboard copied to clipboard

Add interactive plots with Plotly

Open javierbg opened this issue 2 years ago • 5 comments

Description

This pull request adds a new module to the dashboard for showing interactive plots in the browser.

Motivation and Context

See issue #162

Checklist:

javierbg avatar Nov 25 '22 11:11 javierbg

Do you consider that a new test is needed for the module?

javierbg avatar Nov 25 '22 11:11 javierbg

Codecov Report

Merging #163 (24a9aa2) into master (21c3cb7) will decrease coverage by 0.19%. The diff coverage is 70.58%.

:exclamation: Current head 24a9aa2 differs from pull request most recent head 121578f. Consider uploading reports for the commit 121578f to get more accurate results

@@            Coverage Diff             @@
##           master     #163      +/-   ##
==========================================
- Coverage   73.83%   73.64%   -0.20%     
==========================================
  Files          20       21       +1     
  Lines         795      846      +51     
==========================================
+ Hits          587      623      +36     
- Misses        208      223      +15     
Impacted Files Coverage Δ
signac_dashboard/modules/plotly_viewer.py 70.00% <70.00%> (ø)
signac_dashboard/modules/__init__.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov[bot] avatar Nov 27 '22 04:11 codecov[bot]

Do you consider that a new test is needed for the module?

Explicit tests aren't needed -- the testing framework is pretty weak right now, and this should be automatically covered by the "kitchen sink" tests. However, an example would be good to include.

bdice avatar Nov 27 '22 04:11 bdice

I agree with Bradley. This seems very useful. Thank you for the implementation! If you could include an example, I'll also test it locally on my machine.

Charlottez112 avatar Nov 27 '22 15:11 Charlottez112

I'm not familiarized with Flask, so when it came to add the routes and assets I just used other modules as reference (I think it was the DocumentEditor module).

When adding the Plotly CDN URL I realized that the "filename" attribute in line 104 was not used, apparently, so I removed it. Is this ok?

javierbg avatar Nov 28 '22 09:11 javierbg