Issue 45 send back diagram image#51
Conversation
|
@lbianchi-lbl suggested a simpler way to approach all this, which I think makes sense. Use standard HTML5 browser APIs to convert the SVG element to a PNG in Javascript. Then the Playwright/Selenium etc. is not required |
…is invalid, add description to function
…e require for test and generate screenshot move to pyproject remove from requirement-dev
…r at jupyter env other env will save image not display
shell: bash -l {0}
run
…_create_save_path()
|
@dangunter when you have time please help me to review this. |
|
@CopyDemon will look into adding some documentation for this. |
|
@CopyDemon there are some conflicts in files |
fb318df to
0963887
Compare
|
@CopyDemon do you know why the windows tests are failing? I can try this on my Windows machine but my main dev environment is linux now. |
Will look it later on my VM |
|
@dangunter @CopyDemon I believe that error is due to the dictionary defined in the |
|
@CopyDemon I added a higher-level function that encapsulates the 2 steps of visualize and save in what I think is an easier interface, I called it |
|
@CopyDemon the tests are failing because of a bug in the way you are using try/except/finally. Remember that the finally clause is always executed, regardless of what happens in the except clause (including a return statement). This toy example (from an ipython shell) shows the problem: |
…ize is 10 better?
…agnostics on UI is not working address this issue with another ticket
…rectly call it prevent 'the loop_forever not call and server not up issue'
idaes_ui/fv/fsvis.py
Outdated
|
|
||
| print(f"SVG saved as {flowsheet_name}_svg.svg") | ||
|
|
||
| current_path = os.getcwd() |
|
@dangunter All the comments are on outdated code. |
Fixes
Related to issue
Project board link
Proposed changes:
User can get and view diagram screenshot in Jupyter notebook
Legal Acknowledgement
By contributing to this software project, I agree to the following terms and conditions for my contribution: