IDAES/idaes-pse

Visualizer does not work outside of IDAES development environment

Opened this issue · 2 comments

When visualize() is called on a model in, e.g., a watertap development environment, the web server starts and web page displays, but the static JS files are not found and therefore the page is empty.

To reproduce:

  • Start a conda development environment for watertap
  • Load and build a model (see below)
  • Invoke visualize() on the model

Example model build and visualize:

from watertap.examples.flowsheets.case_studies.wastewater_resource_recovery.metab import metab
model = metab.build()
model.fs.visualize("metab")

My guess is that the JavaScript files are not being packaged when running pip install in non-editable mode; or the files are copied over, but in a location that's different to where the frontend code expects them to be.

We have checks that run the test suite after installing packages in non-editable mode, so the fact that this slipped through makes me think that we need more UI tests (probably not saying anything new here). Even before having "proper" UI tests in place, it might make sense to have at least a few smoke tests of sort that ensure that calling model.fs.visualize() doesn't immediately crash.

@elbashandy I'm moving this to the Nov release, let me know if that's not correct.